1

I am currently using geth in windows and 1.9.10LTS version of geth.

I have to Open geth console, but when i try to implement geth console or geth attach or geth attach ipc:\\ .\pipe\geth.ipc it doesn't work. Shows an error given below.

enter image description here

5
  • The first two error might appear to indicate a previous instance of geth is not running (Perhaps it is runnig as administrator or it is hanged). The last error message says there's other program listening port 30303 (likely another the instance of geth). What command did you use to launch the first instance of geth?
    – Ismael
    Commented Jan 23, 2020 at 16:16
  • @Ismael No, I did not run as administrator. I used this command for lauching my geth > geth --rinkeby --rpc --rpcapi="personal,eth,network,web3,net" --ipcpath="geth attach ipc:\\.\pipe\geth.ipc"
    – bignums
    Commented Jan 23, 2020 at 16:22
  • The --ipcpath in windows only accept the name of the pipe. For example if you launch geth.exe --ipcpath julia you can attach with geth attach ipc:\\.\pipe\julia. You are passing spaces, : and \ in the ipcpath name so it might not work correctly.
    – Ismael
    Commented Jan 23, 2020 at 16:28
  • So, What i shold do now?
    – bignums
    Commented Jan 24, 2020 at 2:35
  • 2
    Do not use --ipcpath, unless you have a reason, and use the default path. Launch geth with geth --rinkeby --rpc --rpcapi="personal,eth,network,web3,net", then you can attach with geth attach ipc:\\.\pipe\geth.ipc.
    – Ismael
    Commented Jan 24, 2020 at 3:16

1 Answer 1

2

Using geth attach, you need to provide the IP:PORT

Example:

geth attach 'http://localhost:8501'

Your geth must provide RPC interface with something like this in the geth execution command:

--rpc --rpcaddr '0.0.0.0' --rpcport 8501 --rpcapi 'personal,db,eth,net,web3,txpool,miner,admin,clique'
5
  • 1
    But when i declare port in geth attach "localhost:8501" , it shows me an error. Fatal: Failed to start the JavaScript console: api modules: Post localhost:8501: dial tcp [::1]:8501: connectex: No connection could be made because the target machine actively refused it. @FlorianCastelain
    – bignums
    Commented Jan 23, 2020 at 10:27
  • @bignums Make sure TCP is enabled on this port. Make sure your geth is actually listening on this port. What is the command you are using to launch geth ? Commented Jan 23, 2020 at 10:29
  • I am using this command for launching my geth as so i am on the windows. geth --rinkeby --rpc --rpcapi="personal,eth,network,web3,net" --ipcpath="geth attach ipc:\\.\pipe\geth.ipc" @FlorianCastelain
    – bignums
    Commented Jan 23, 2020 at 10:31
  • @bignums You do not specify a port. Default port is 8545 if I remember well. Try geth attach "http:localhost:8545" Commented Jan 23, 2020 at 10:46
  • @FlorianCastelian No, it also not working same error occur. Fatal: Failed to start the JavaScript console: api modules: Post localhost:8545: dial tcp [::1]:8545: connectex: No connection could be made because the target machine actively refused it.
    – bignums
    Commented Jan 23, 2020 at 13:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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