go-ethereum icon indicating copy to clipboard operation
go-ethereum copied to clipboard

Geth not start bind: address already in use

Open Piradoxlanieve opened this issue 3 years ago • 3 comments

System information

Geth version: Geth/v1.10.21-stable-67109427/linux-amd64/go1.18.4 OS & Version: Ubuntu 20.04.4

Hi. I had my geth node working perfectly, I restarted the pc and now I have this error

ago 07 12:09:46 nodoeth geth[11482]: WARN [08-07|12:09:46.352] IPC opening failed url=/mnt/ssd/geth.ipc error="listen unix /mnt/ssd/geth.ipc: bind: address already in use"

ago 07 12:09:47 nodoeth geth[11482]: Fatal: Error starting protocol stack: listen unix /mnt/ssd/geth.ipc: bind: address already in use

ago 07 12:09:47 nodoeth systemd[1]: eth1.service: Main process exited, code=exited, status=1/FAILURE

ago 07 12:09:47 nodoeth systemd[1]: eth1.service: Failed with result 'exit-code'.

ago 07 12:09:48 nodoeth systemd[1]: Stopped geth execution client service.

root@nodoeth:/mnt/ssd# ps ax | grep geth

11893 pts/2 S+ 0:00 grep --color=auto geth

root@nodoeth:/mnt/ssd#

the only solution I find is to change the geth directory and re-synchronize or also --ipcdisable but I don't know what affects this flag. Any ideas. I've been several hours and I don't see what address is using geth.ipc

Sorry my bad english.

Piradoxlanieve avatar Aug 07 '22 10:08 Piradoxlanieve

Unsure what it could be. Perhaps you could check to make sure the SSD is mounted with the proper permissions? Haven't seen this issue until now. Perhaps you could try deleting the socket file /mnt/ssd/geth.ipc and restarting your machine. Can't imagine what is off, but I'd guess some permission somewhere.

karalabe avatar Aug 08 '22 09:08 karalabe

Yes, before opening the error I tried to delete geth.ipc, give it 777 permissions, but without success, I also looked to see if it was a port in use but there was nothing, I had never had that error, it has been very rare. I think it's some locked file inside the chaindata folder, maybe manifest, lock, current file, because when they were renamed the SSD started working at 400mb/s but I prefer to generate everything again. I have decided to delete the entire folder and re-synchronize snap again, maybe if I had changed the location without deleting the files, but well it's too late.

Piradoxlanieve avatar Aug 08 '22 09:08 Piradoxlanieve

next time this happens: can you do a lsof | grep "geth.ipc" ?

ligi avatar Aug 09 '22 07:08 ligi

hello, This is the same problem as me, but this problem has been resolved, please click this link

https://github.com/ethereum/go-ethereum/issues/25438#issuecomment-1199434922

ekawibisono avatar Aug 12 '22 07:08 ekawibisono

Looks like this was resolved (by deleting and resyncing). Will close for now. If you experience it again, pls open another issue and do the lsof so we can investigate. thx

MariusVanDerWijden avatar Jan 02 '23 12:01 MariusVanDerWijden