1

I have just finished syncing to the testnet, but I'm having trouble running geth console on it.

Storing the blockchain on an external usb drive, this is the command I used to start geth on the testnet $ geth --testnet --datadir /media/removable/Lexar/ethereum/ --ipcpath ~/.ethereum/geth.ipc

and attempting to attach to the network with geth console geth --testnet attach http://127.0.0.1:8545 gave me this error:

Fatal: Failed to start the JavaScript console: api modules: Post http://127.0.0.1:8545: dial tcp 127.0.0.1:8545: getsockopt: connection refused

I read this answer here, but even with the --ipcpath flag as suggested, it doesn't work.

Please advise. Any help would be appreciated.

1

Once a geth node is already running on your machine then to attach you don't need to give rpcaddr once again, you can use below command to attach console to your already running geth node -

geth attach ipc://path/to/ipc/datadir/geth.ipc

You just need to know your IPC file and then you can attach it using above command.

Hope this helps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.