While setting environment for ethereum , I got an Error that port 8545 is listened by another process, Actually testrpc and embark simulator both are using the same port. If i kill one process and give to another then it is not the case. I want to use both process using different port . How do I change the port number of that process (Either testrpc or embark) . How do I Change the port for embark simulator (or port of testrpc) ?
You can set the port in which embark blockchain is listening at config/blockchain.json
's rpcPort
param of the used network (i.e. livenet/testnet/privatenet
) as explained here: https://github.com/iurimatias/embark-framework#working-with-different-chains
You can set testrpc
's port using the -p
(or --port
) option, as per the usage details:
$ testrpc <options>
Options:
-a or --accounts: Specify the number of accounts to generate at startup.
-b or --blocktime: Specify blocktime in seconds for automatic mining. Default is 0 and no auto-mining.
-d or --deterministic: Generate deterministic addresses based on a pre-defined mnemonic.
-n or --secure: Lock available accounts by default (good for third party transaction signing)
-m or --mnemonic: Use a specific HD wallet mnemonic to generate initial addresses.
-p or --port: Port number to listen on. Defaults to 8545.
-h or --hostname: Hostname to listen on. Defaults to Node's server.listen() default.
-s or --seed: Use arbitrary data to generate the HD wallet mnemonic to be used.
-g or --gasPrice: Use a custom Gas Price (defaults to 20000000000)
-l or --gasLimit: Use a custom Gas Limit (defaults to 0x47E7C4)
-f or --fork: Fork from another currently running Ethereum client at a given block. Input should be the HTTP location and port of the other client, e.g. http://localhost:8545. You can optionally specify the block to fork from using an @ sign: http://localhost:8545@1599200.
-i or --network-id: Specify the network id the TestRPC will use to identify itself (defaults to the current time or the network id of the forked blockchain if configured)
--db: Specify a path to a directory to save the chain database. If a database already exists, the TestRPC will initialize that chain instead of creating a new one.
--debug: Output VM opcodes for debugging
--mem: Output TestRPC memory usage statistics. This replaces normal output.