chris-belcher / electrum-personal-server

Maximally lightweight electrum server for a single user
MIT License
595 stars 109 forks source link

Electrum won't connect to EPS anymore #192

Open otaviobonder-deel opened 4 years ago

otaviobonder-deel commented 4 years ago

I had EPS and Electrum working for a while. Everything was working fine, however the Electrum stopped connecting to EPS. Already tried to reinstall both Electrum and EPS, and the problem persists.

I connect Electrum to EPS by Tor. Tor is running on both machines, server and client. EPS is configured to listen to 127.0.0.1:50002 and on the server the Tor is listening port 50002 and routing the connection to 127.0.0.1:50002, so it's configured right.

EPS log shows it's listening:

Apr 16 10:05:45 node electrum-personal-server[29658]: INFO:2020-04-16 10:05:45,616: Obtaining bitcoin addresses to monitor . . .
Apr 16 10:07:46 node electrum-personal-server[29658]: INFO:2020-04-16 10:07:46,259: Obtained list of addresses to monitor in 120.92948031425476sec
Apr 16 10:07:46 node electrum-personal-server[29658]: INFO:2020-04-16 10:07:46,260: Building history with 8000 addresses . . .
Apr 16 10:07:49 node electrum-personal-server[29658]: INFO:2020-04-16 10:07:49,550: Found 400 txes. History built in 2.6385152339935303sec
Apr 16 10:07:49 node electrum-personal-server[29658]: INFO:2020-04-16 10:07:49,551: Starting electrum server
Apr 16 10:07:49 node electrum-personal-server[29658]: INFO:2020-04-16 10:07:49,700: Listening for Electrum Wallet on ('127.0.0.1', 50002)

However Electrum can't connect to it:

20200416T131257.241344Z |     INFO | network | connecting to xxxxxx.onion:50002:t as new interface
20200416T131259.347902Z |     INFO | interface.[xxxxxx.onion:50002] | disconnecting due to: CancelledError()
20200416T131259.349079Z |     INFO | network | couldn't launch iface xxxxxx.onion:50002:t -- CancelledError()

On another server I have Electrs running over Tor as well and Electrum connects fine. I'm not sure what's causing this issue

chris-belcher commented 4 years ago

Thanks for the issue.

Do this: run electrum with the command line argument -v, then go the Qt console and type network.debug = True. Then you should get lots more debug information on the command line. Hopefully that will provide more clues.

otaviobonder-deel commented 4 years ago

This is the log from Electrum:

I/n | network | network: retrying connections
I/n | network | connecting to xxxxxxx.onion:50002:t as new interface
D/i | interface.[xxxxxxxx.onion:50002] | <-- ('server.version', ['electrum/3.3.8', '1.4']) {} (id: 1)
I/i | interface.[xxxxxxxxx.onion:50002] | disconnecting due to: CancelledError()
I/n | network | couldn't launch iface xxxxxxxxx.onion:50002:t -- CancelledError()
realSConway commented 2 years ago

I'm getting the same, running EPS version 0.1.6. Bitcoin version 0.21.2.0 and Electrum version 4.1.5.

Electrum shows red dot for network connection.

EPS logging:

INFO:2022-01-09 23:07:09,916: Obtaining bitcoin addresses to monitor . . .
INFO:2022-01-09 23:07:22,583: Obtained list of addresses to monitor in 12.708663940429688sec
INFO:2022-01-09 23:07:22,584: Building history with 2000 addresses . . .
INFO:2022-01-09 23:07:22,792: Found xx txes. History built in 0.14480090141296387sec
INFO:2022-01-09 23:07:22,978: Starting electrum server
INFO:2022-01-09 23:07:22,978: Listening for Electrum Wallet on ('127.0.0.1', 50002)
INFO:2022-01-09 23:07:25,477: Electrum connected from ('127.0.0.1', 53104)
INFO:2022-01-09 23:07:25,479: Electrum wallet disconnected
INFO:2022-01-09 23:07:27,826: Electrum connected from ('127.0.0.1', 53106)
INFO:2022-01-09 23:07:27,827: Electrum wallet disconnected
INFO:2022-01-09 23:07:32,638: Electrum connected from ('127.0.0.1', 53108)
INFO:2022-01-09 23:07:32,639: Electrum wallet disconnected
INFO:2022-01-09 23:07:41,071: Electrum connected from ('127.0.0.1', 53110)
INFO:2022-01-09 23:07:41,071: Electrum wallet disconnected

electrum -v logging:

I | simple_config.SimpleConfig | electrum directory /home/test/.electrum
I | logging | Electrum version: 4.1.5 - https://electrum.org - https://github.com/spesmilo/electrum
I | logging | Python version: 3.8.12 (default, Aug 31 2021, 01:23:42) [GCC]. On platform: Linux-5.15.12-1-default-x86_64-with-glibc2.34
I | logging | Logging to file: None
I | logging | Log filters: verbosity '*', verbosity_shortcuts ''
I/p | plugin.Plugins | registering hardware bitbox02: ('hardware', 'bitbox02', 'BitBox02')
I/p | plugin.Plugins | registering hardware coldcard: ('hardware', 'coldcard', 'Coldcard Wallet')
I/p | plugin.Plugins | registering hardware digitalbitbox: ('hardware', 'digitalbitbox', 'Digital Bitbox wallet')
I/p | plugin.Plugins | registering hardware keepkey: ('hardware', 'keepkey', 'KeepKey wallet')
I/p | plugin.Plugins | registering hardware ledger: ('hardware', 'ledger', 'Ledger wallet')
I/p | plugin.Plugins | registering hardware safe_t: ('hardware', 'safe_t', 'Safe-T mini wallet')
I/p | plugin.Plugins | registering hardware trezor: ('hardware', 'trezor', 'Trezor wallet')
I/p | plugin.Plugins | registering wallet type ('2fa', 'trustedcoin')
D | util.profiler | Plugins.__init__ 0.0068
I/n | network | blockchains [0]
I | exchange_rate.FxThread | using exchange CoinGecko
D | util.profiler | Daemon.__init__ 0.0012
I | daemon.Daemon | launching GUI: qt
I/n | network | starting network
I/n | network | setting proxy None
I | daemon.Daemon | starting taskgroup.
I/n | network | connecting to 127.0.0.1:50002:s as new interface
I/n | network | starting taskgroup.
I/i | interface.[127.0.0.1:50002] | disconnecting due to GracefulDisconnect("server violated protocol-version-negotiation. we asked for '1.4', they sent 1.4")
I/n | network | couldn't launch iface 127.0.0.1:50002:s -- CancelledError()
I | gui.qt.history_list | could not import electrum.plot. This feature needs matplotlib to be installed.
I | gui.qt.ElectrumGui | Qt GUI starting up... Qt=5.15.2, PyQt=5.15.6
D | util.profiler | ElectrumGui.__init__ 0.0564
I | storage.WalletStorage | wallet path /home/test/.electrum/wallets/watch
I | storage.WalletStorage | wallet path /home/test/.electrum/wallets/watch
I/n | network | connecting to 127.0.0.1:50002:s as new interface
I/i | interface.[127.0.0.1:50002] | disconnecting due to GracefulDisconnect("server violated protocol-version-negotiation. we asked for '1.4', they sent 1.4")
I/n | network | couldn't launch iface 127.0.0.1:50002:s -- CancelledError()
I/n | network | connecting to 127.0.0.1:50002:s as new interface
I/i | interface.[127.0.0.1:50002] | disconnecting due to GracefulDisconnect("server violated protocol-version-negotiation. we asked for '1.4', they sent 1.4")
I/n | network | couldn't launch iface 127.0.0.1:50002:s -- CancelledError()
D | util.profiler | WalletDB._load_transactions 0.0122
D | util.profiler | AddressSynchronizer.load_local_history 0.0006
D | util.profiler | AddressSynchronizer.check_history 0.0010
D | util.profiler | AddressList.update 0.0000
D | util.profiler | Deterministic_Wallet.try_detecting_internal_addresses_corruption 0.0113
D | util.profiler | ElectrumWindow.load_wallet 0.0251
I | gui.qt.history_list.HistoryModel | refreshing... reason: update_tabs
D | util.profiler | Abstract_Wallet.get_full_history 0.0057
D | util.profiler | HistoryModel.refresh 0.0118
D | util.profiler | AddressList.update 0.0000
I | gui.qt.update_checker.UpdateCheckThread | valid sig for version announcement '4.1.5' from address '13xjmVAB1EATPP8RshTE8S8sNwwSUM9p1P'
I | gui.qt.ElectrumGui | starting Qt main loop
I/n | network | connecting to 127.0.0.1:50002:s as new interface
I/i | interface.[127.0.0.1:50002] | disconnecting due to GracefulDisconnect("server violated protocol-version-negotiation. we asked for '1.4', they sent 1.4")
I/n | network | couldn't launch iface 127.0.0.1:50002:s -- CancelledError()
I/n | network | connecting to 127.0.0.1:50002:s as new interface
I/i | interface.[127.0.0.1:50002] | disconnecting due to GracefulDisconnect("server violated protocol-version-negotiation. we asked for '1.4', they sent 1.4")
I/n | network | couldn't launch iface 127.0.0.1:50002:s -- CancelledError()
I/n | network | connecting to 127.0.0.1:50002:s as new interface
I/i | interface.[127.0.0.1:50002] | disconnecting due to GracefulDisconnect("server violated protocol-version-negotiation. we asked for '1.4', they sent 1.4")
I/n | network | couldn't launch iface 127.0.0.1:50002:s -- CancelledError()
I/n | network | connecting to 127.0.0.1:50002:s as new interface
I/i | interface.[127.0.0.1:50002] | disconnecting due to GracefulDisconnect("server violated protocol-version-negotiation. we asked for '1.4', they sent 1.4")
I/n | network | couldn't launch iface 127.0.0.1:50002:s -- CancelledError()
I | gui.qt.main_window.[watch] | close_wallet /home/test/.electrum/wallets/watch
I | storage.WalletStorage | saved /home/test/.electrum/wallets/watch
D | util.profiler | WalletDB._write 0.0554
I | daemon.Daemon | on_stop() entered. initiating shutdown
I | gui.qt.ElectrumGui | closing GUI
I | daemon.Daemon | stopping all wallets
I | daemon.Daemon | stopping network and taskgroup
I/n | network | stopping network
I | daemon.Daemon | taskgroup stopped.
I/n | network | taskgroup stopped.
I | daemon.Daemon | removing lockfile
I | daemon.Daemon | stopped
I/p | plugin.Plugins | stopped

Firewall is turned off.

chris-belcher commented 2 years ago

Thanks for the report @realSConway

realSConway commented 2 years ago

SOLVED (at my end): upgraded EPS version 0.2.2 (I was on 0.1.6)