monero-project / monero-gui

Monero: the secure, private, untraceable cryptocurrency
Other
1.68k stars 760 forks source link

GUI hangs if `monerod` cannot bind #4240

Open hinto-janai opened 8 months ago

hinto-janai commented 8 months ago

When starting monero-wallet-gui and starting a local node, it will hang with no indication/error/log if monerod itself cannot bind, e.g:

2023-11-07 17:44:20.109 E ZMQ bind failed: Address already in use
2023-11-07 17:44:20.121 E Exception in main! Failed to add TCP socket(127.0.0.1:18082) to ZMQ RPC Server

Reproduce

  1. Start something on ZMQ/RPC port
  2. Start monero-wallet-gui and launch local node
  3. monero-wallet-gui hangs forever attempting to launch monerod which cannot bind

image

Something could be logged if monerod exits with non-zero.

plowsof commented 8 months ago

after 120 seconds i get a notification that the daemon failed to start. does this scenario fool the checks? (i bound an rpc wallet to 18083 and launched monerod in from the gui with --zmq-pub tcp://127.0.0.1:18083 )

hinto-janai commented 8 months ago

Interesting - if that flag (or any flag I'm assuming) is passed, it will properly error:

image

This doesn't happen without a flag though, port blocked with no flag will hang forever - maybe this error should be copy+pasted here. I'll try fixing this later.