Getting this port in use error even though i have no running geth instances:
MacBook-Pro:~ joeykrug2$ sudo killall ethereum
No matching processes were found
MacBook-Pro:~ joeykrug2$ sudo killall geth
No matching processes were found
MacBook-Pro:~ joeykrug2$ geth --rpc --rpccorsdomain 'http://localhost:8080' --shh --networkid 1010101 --protocolversion 59 --datadir Documents/geth --unlock primary console
I0615 14:05:46.373267 5842 backend.go:269] Protocol Version: 59, Network Id: 1010101
I0615 14:05:46.373316 5842 backend.go:279] Blockchain DB Version: 3
I0615 14:05:46.376114 5842 chain_manager.go:247] Last block (#0) fd4af92a79c7fc2fd8bf0d342f2e832e1d4f485c85b9152d2039e03bc604fdca TD=131072
I0615 14:05:46.381351 5842 cmd.go:148] Starting Geth/v0.9.31/darwin/go1.4.2
I0615 14:05:46.381504 5842 server.go:293] Starting Server
Fatal: Error starting Ethereum: listen udp :30303: bind: address already in use
Fatal: Error starting Ethereum: listen udp :30303: bind: address already in use
Same here, only happens on OSX:(
I have seen this issue if the firewall is enabled and geth was previously running with the same port.
The firewall seems to hold on to the port for some reason.
We will address this by listening on a random UDP port if the requested port is not available.
This requires some restructuring, but should definitely be doable.
Is there a way to pass port assignment manually with an argument today?
The protocol port can be configured with --port "35555"
works. OSX Yosemite 10.10.4
Just encountered this on 10.10.5 with geth 1.0.2.
I don't think this is a real issue. If you'd like to use a different port use the --port flag and explicitly supply a different port or use --port 0 to let the OS decide on the port number.
I don't think this is a real issue.
@obscuren As someone with a background in low-level network programming, I am certain, this is a real issue.
Please see this stackoverflow question for how to fix this properly:
https://stackoverflow.com/questions/6380057/python-binding-socket-address-already-in-use
Go sets REUSEADDR by default for TCP sockets. It does not seem to help with UDP sockets on OS X.
The solution to this problem is to let the OS select the port. This used to be not possible when UDP/TCP ports were required to be the same number but should work now. I'll have time to look into this again soon-ish.
Use port 0 as a temporary work around
Go sets REUSEADDR by default for TCP sockets.
If so then it sounds more like a kernel bug than a geth bug.
Even if it's a kernel bug, it would be great to have a fix / workaround for it. It is really annoying.
Unfortunately I don't know much about networking, so I am just a pig here :)
It's being worked on. We're going to let the kernel decide what port to use.
I'm having this issue on El Capitan (10.11.4) and the wallet 0.7.3
Specify the port: geth --port "35555" console
i had this problem. It turns out I had my Ethereum-Wallet running which was using the port.
Now once I had geth console running, Ethereum-Wallet started fine as well. I wonder if Wallet uses eth rather than geth if geth is used?
Try this workaround: In Etherium Wallet, select Develop > Ethereum Node > Eth. When you make this change, the wallet switches from using Geth to Eth and starts syncing the blocks from the beginning.
I'm still running into this issue, sadly :(
@Syirrus I'm sure one of my other apps is hogging the port number assigned to geth. When I installed geth using the command line, and set --port=0, it automatically picked an unused port and worked just fine. To speed things up, I did this:
geth --fast --cache=2048 --jitvm --port=0
Same issue
geth --port 0 --datadir /Volumes/Chains/Testnet/ --testnet console
Results in
Fatal: Error starting protocol stack: listen unix /Volumes/Chains/Testnet/testnet/geth.ipc: bind: invalid argument
Edit: Seems to be if the data dir is my USB Drive. Doing geth --testnet works
Fix: I created a sym link to my USB.
ln -s /Volumes/Chains/testnet testnetdata
Then
geth --testnet --datadir= ~testnetdata
I had the same issue.
Fatal: Error starting protocol stack: listen unix /Volumes/USBDeviceA/Ethereum/geth.ipc: bind: invalid argument
The cause was that the USB device was formatted with MS-DOS(FAT). I have formatted it for Mac in the following way.
After that, I succeeded in successfully starting geth on the USB device.
I got same issue when I input below command:
geth --datadir data0 --networkid 1108 console
Fatal: Error starting protocol stack: listen tcp :30303: bind: address already in use
And in my case, I just close Ethereum Wallet. And input the command again. It works.
YES,I'am use --port=0 hava slove this question.
Most helpful comment
The protocol port can be configured with
--port "35555"