0

Fatal: Failed to create the protocol stack: datadir already used by another process

I have geth running in tmux in one tab:

geth --ws --mainnet --syncmode snap

In another tab I'm trying to connect to the console and I get this error:

$ geth console    
INFO [09-02|20:25:33.433] Starting Geth on Ethereum mainnet... INFO [09-02|20:25:33.433] Bumping default cache on mainnet         provided=1024 updated=4096INFO [09-02|20:25:33.434] Maximum peer count                       ETH=50 LES=0 total=50
INFO [09-02|20:25:33.434] Smartcard socket not found, disabling    err="stat /run/pcscd/pcscd.comm: no such file or directory"
Fatal: Failed to create the protocol stack: datadir already used by another process
➜  ~ $ geth consoleINFO [09-02|20:26:54.885] Starting Geth on Ethereum mainnet... 
INFO [09-02|20:26:54.885] Bumping default cache on mainnet         provided=1024 updated=4096
INFO [09-02|20:26:54.886] Maximum peer count                       ETH=50 LES=0 total=50
INFO [09-02|20:26:54.886] Smartcard socket not found, disabling    err="stat /run/pcscd/pcscd.comm: no such file or directory"
Fatal: Failed to create the protocol stack: datadir already used by another process
➜  ~ 

1 Answer 1

1

You need to run

geth attach

Instead of

geth console

Attach is used to connect to a running instance. Console is used to start an instance and get a console into that instance.

0

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.