[Ethereum] Deploying contracts on geth returns Error: connect ECONNREFUSED 127.0.0.1:8545

contract-deploymentgo-ethereumtruffle

I'm using truffle (which uses pudding) to deploy contracts to my testrpc.

No I'm running a geth instance locally with:

geth –mine -rpccorsdomain "*" –ipcapi "admin,eth,miner" –rpcapi
"eth,web3" –networkid 1100 –maxpeers 5 –minerthreads 1 –unlock "0xXXXXXXXXetc.." console

Now when I try to deploy my contracts, I get:

Invalid JSON RPC response: "Error: connect ECONNREFUSED 127.0.0.1:8545 at..."

What am I missing here? How does truffle/pudding identify itself to the node, when it deploys? (i.e. truffle deploy) I can't see anything to configure this.

Best Answer

Turned out that the default port is not 8545, and had to add these options:

--rpc --rpcport 8545

Related Topic