Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't connect to server. dns issues. getaddrinfo failed #5638

Closed
SomberNight opened this issue Sep 13, 2019 · 6 comments
Closed

can't connect to server. dns issues. getaddrinfo failed #5638

SomberNight opened this issue Sep 13, 2019 · 6 comments
Labels
topic-network 🕸 related to logic in network.py (etc)

Comments

@SomberNight
Copy link
Member

Hi,
I don't want to open new issue, when this one is not solved. I have same problem, can't connect to server. I have tried standalone version from 3.3.5 to 3.3.8. All of them show same message "Not Connected" and this I found in logs:

20190913T073024.547791Z |     INFO | logging | Electrum version: 3.3.8 - https://electrum.org - https://github.com/spesmilo/electrum
20190913T073024.548768Z |     INFO | logging | Python version: 3.6.8 (tags/v3.6.8:3c6b436a57, Dec 23 2018, 23:31:17) [MSC v.1916 32 bit (Intel)]. On platform: Windows-10-10.0.17763
20190913T073024.548768Z |     INFO | logging | Logging to file: C:\Users\elct\AppData\Roaming\Electrum\logs\electrum_log_20190913T073024Z_10556.log
20190913T073024.548768Z |     INFO | logging | Log filters: verbosity '', verbosity_shortcuts ''
20190913T073025.552601Z |     INFO | daemon | failed to connect to JSON-RPC server: [WinError 10061] No connection could be made because the target machine actively refused it
20190913T073025.562362Z |     INFO | plugin.Plugins | registering hardware coldcard: ('hardware', 'coldcard', 'Coldcard Wallet')
20190913T073025.563338Z |     INFO | plugin.Plugins | registering hardware digitalbitbox: ('hardware', 'digitalbitbox', 'Digital Bitbox wallet')
20190913T073025.566299Z |     INFO | plugin.Plugins | registering hardware keepkey: ('hardware', 'keepkey', 'KeepKey wallet')
20190913T073025.700954Z |     INFO | gui.qt.history_list | could not import electrum.plot. This feature needs matplotlib to be installed.
20190913T073025.704858Z |     INFO | plugin.Plugins | loaded labels
20190913T073025.705834Z |     INFO | plugin.Plugins | registering hardware ledger: ('hardware', 'ledger', 'Ledger wallet')
20190913T073025.706810Z |     INFO | plugin.Plugins | registering hardware safe_t: ('hardware', 'safe_t', 'Safe-T mini wallet')
20190913T073025.707786Z |     INFO | plugin.Plugins | registering hardware trezor: ('hardware', 'trezor', 'Trezor wallet')
20190913T073025.708762Z |     INFO | plugin.Plugins | registering wallet type ('2fa', 'trustedcoin')
20190913T073025.709738Z |    DEBUG | util.profiler | Plugins.__init__ 0.1493
20190913T073025.711725Z |     INFO | network | blockchains [0]
20190913T073025.711725Z |     INFO | exchange_rate.FxThread | using exchange CoinGecko
20190913T073025.712707Z |     INFO | network | starting network
20190913T073025.712707Z |     INFO | network | connecting to electrum-server.ninja:50002:s as new interface
20190913T073025.714648Z |     INFO | exchange_rate.CoinGecko | getting fx quotes for EUR
20190913T073025.715617Z |    DEBUG | util.profiler | Daemon.__init__ 0.0059
20190913T073026.372438Z |    DEBUG | util.profiler | ElectrumGui.__init__ 0.6559
20190913T073026.378295Z |     INFO | storage.WalletStorage | wallet path c:\users\radoslav.chovan\appdata\roaming\electrum\wallets\osx
20190913T073026.788214Z |     INFO | storage.WalletStorage | wallet path c:\users\radoslav.chovan\appdata\roaming\electrum\wallets\osx
20190913T073026.789189Z |     INFO | storage.WalletStorage | wallet path c:\users\radoslav.chovan\appdata\roaming\electrum\wallets\osx
20190913T073026.891670Z |     INFO | interface.[electrum-server.ninja:50002] | disconnecting due to: ErrorGettingSSLCertFromServer(ConnectError(gaierror(11001, 'getaddrinfo failed'),),)
20190913T073026.891670Z |     INFO | interface.[enode.duckdns.org:50002] | disconnecting due to: ErrorGettingSSLCertFromServer(ConnectError(gaierror(11001, 'getaddrinfo failed'),),)
20190913T073026.891670Z |     INFO | interface.[electrumx.erbium.eu:50002] | disconnecting due to: ErrorGettingSSLCertFromServer(ConnectError(gaierror(11001, 'getaddrinfo failed'),),)
20190913T073026.892645Z |     INFO | interface.[qtornadoklbgdyww.onion:50002] | disconnecting due to: ErrorGettingSSLCertFromServer(ConnectError(gaierror(11001, 'getaddrinfo failed'),),)
20190913T073026.892645Z |     INFO | interface.[electrum2.villocq.com:50002] | disconnecting due to: ErrorGettingSSLCertFromServer(ConnectError(gaierror(11001, 'getaddrinfo failed'),),)
20190913T073026.893623Z |     INFO | interface.[electrumx.ml:50002] | disconnecting due to: ConnectError(gaierror(11001, 'getaddrinfo failed'),)
20190913T073026.893623Z |     INFO | interface.[fedaykin.goip.de:50002] | disconnecting due to: ErrorGettingSSLCertFromServer(ConnectError(gaierror(11001, 'getaddrinfo failed'),),)
20190913T073026.894597Z |     INFO | interface.[btchub.fr:50002] | disconnecting due to: ConnectError(gaierror(11001, 'getaddrinfo failed'),)
20190913T073026.894597Z |     INFO | interface.[hsmiths4fyqlw5xw.onion:50002] | disconnecting due to: ErrorGettingSSLCertFromServer(ConnectError(gaierror(11001, 'getaddrinfo failed'),),)
20190913T073026.894597Z |     INFO | exchange_rate.CoinGecko | failed fx quotes: ClientConnectorError(11001, 'getaddrinfo failed')
20190913T073026.895572Z |     INFO | network | couldn't launch iface electrum-server.ninja:50002:s -- CancelledError()
20190913T073026.896550Z |     INFO | network | couldn't launch iface enode.duckdns.org:50002:s -- CancelledError()
20190913T073026.896550Z |     INFO | network | couldn't launch iface electrumx.erbium.eu:50002:s -- CancelledError()
20190913T073026.896550Z |     INFO | network | couldn't launch iface qtornadoklbgdyww.onion:50002:s -- CancelledError()
20190913T073026.896550Z |     INFO | network | couldn't launch iface electrum2.villocq.com:50002:s -- CancelledError()
20190913T073026.896550Z |     INFO | network | couldn't launch iface electrumx.ml:50002:s -- CancelledError()
20190913T073026.897535Z |     INFO | network | couldn't launch iface fedaykin.goip.de:50002:s -- CancelledError()
20190913T073026.897535Z |     INFO | network | couldn't launch iface btchub.fr:50002:s -- CancelledError()
20190913T073026.898508Z |     INFO | network | couldn't launch iface hsmiths4fyqlw5xw.onion:50002:s -- CancelledError()
20190913T073026.904359Z |     INFO | interface.[xray587.startdedicated.de:50002] | disconnecting due to: ErrorGettingSSLCertFromServer(ConnectError(gaierror(11001, 'getaddrinfo failed'),),)
20190913T073026.905333Z |     INFO | network | couldn't launch iface xray587.startdedicated.de:50002:s -- CancelledError()
20190913T073027.203395Z |     INFO | interface.[VPS.hsmiths.com:50002] | disconnecting due to: ErrorGettingSSLCertFromServer(ConnectError(gaierror(11001, 'getaddrinfo failed'),),)
20190913T073027.203395Z |     INFO | interface.[hsmiths5mjk6uijs.onion:50002] | disconnecting due to: ErrorGettingSSLCertFromServer(ConnectError(gaierror(11001, 'getaddrinfo failed'),),)
20190913T073027.203395Z |     INFO | interface.[bitcoins.sk:50002] | disconnecting due to: ErrorGettingSSLCertFromServer(ConnectError(gaierror(11001, 'getaddrinfo failed'),),)
20190913T073027.203395Z |     INFO | interface.[electrumx.bot.nu:50002] | disconnecting due to: ErrorGettingSSLCertFromServer(ConnectError(gaierror(11001, 'getaddrinfo failed'),),)
20190913T073027.203395Z |     INFO | interface.[bitcoin.corgi.party:50002] | disconnecting due to: ErrorGettingSSLCertFromServer(ConnectError(gaierror(11001, 'getaddrinfo failed'),),)
20190913T073027.203395Z |     INFO | interface.[electrum.eff.ro:50002] | disconnecting due to: ErrorGettingSSLCertFromServer(ConnectError(gaierror(11001, 'getaddrinfo failed'),),)
20190913T073027.203395Z |     INFO | interface.[vmd27610.contaboserver.net:50002] | disconnecting due to: ErrorGettingSSLCertFromServer(ConnectError(gaierror(11001, 'getaddrinfo failed'),),)
20190913T073027.204371Z |     INFO | interface.[bitcoin3nqy3db7c.onion:50002] | disconnecting due to: ErrorGettingSSLCertFromServer(ConnectError(gaierror(11001, 'getaddrinfo failed'),),)
20190913T073027.204371Z |     INFO | interface.[electrum2.eff.ro:50002] | disconnecting due to: ErrorGettingSSLCertFromServer(ConnectError(gaierror(11001, 'getaddrinfo failed'),),)
20190913T073027.204371Z |     INFO | network | couldn't launch iface VPS.hsmiths.com:50002:s -- CancelledError()
20190913T073027.204371Z |     INFO | network | couldn't launch iface hsmiths5mjk6uijs.onion:50002:s -- CancelledError()
20190913T073027.204371Z |     INFO | network | couldn't launch iface bitcoins.sk:50002:s -- CancelledError()
20190913T073027.204371Z |     INFO | network | couldn't launch iface electrumx.bot.nu:50002:s -- CancelledError()
20190913T073027.204371Z |     INFO | network | couldn't launch iface bitcoin.corgi.party:50002:s -- CancelledError()
20190913T073027.205388Z |     INFO | network | couldn't launch iface electrum.eff.ro:50002:s -- CancelledError()
20190913T073027.205388Z |     INFO | network | couldn't launch iface vmd27610.contaboserver.net:50002:s -- CancelledError()
20190913T073027.205388Z |     INFO | network | couldn't launch iface bitcoin3nqy3db7c.onion:50002:s -- CancelledError()
20190913T073027.205388Z |     INFO | network | couldn't launch iface electrum2.eff.ro:50002:s -- CancelledError()

Log is repeating and equal for all versions. I have tried to run electrum as admin user too.

Windows 10/64bit

Originally posted by @rchovan in #5368 (comment)

@SomberNight
Copy link
Member Author

This is to do with DNS resolution.

Do you have python3 installed separately? It might be useful to debug this.

In Electrum, go to the Console tab (View>Show Console), and then run this:
(it tries to connect to google.com on https port 443)

import socket; sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM); sock.settimeout(10); sock.connect(("google.com", 443)); print("it worked")

if it prints it worked on the next line, then it managed to connect; otherwise there will probably be a traceback/error

If you get an error, besides pasting it here, it would be useful if now you could test running the same line in a separate python3 interpreter.

@rchovan
Copy link

rchovan commented Sep 13, 2019

Hi,
it worked on console and python cli too. Green image is python CLI in ConEmu.

image

but still can't connect.

@SomberNight
Copy link
Member Author

Could you try running this too?

import dns; print([str(answer) for answer in dns.resolver.query("google.com", dns.rdatatype.A)])

@rchovan
Copy link

rchovan commented Sep 14, 2019

Hi,
yes, I'm ready to help. Feel free to leave comment if you need anything to test. Here is result, again green window is python CLI.

image

@SomberNight
Copy link
Member Author

This is related to the DNS hacks we do on Windows (e.g. #4486) due to #4421

dnspython fails for OP and we fail to fallback to the original (socket.getaddrinfo) resolver

@SomberNight
Copy link
Member Author

@rchovan until there is a new release, one workaround you can try is using a proxy

For example, open the Tor Browser in the background, and in Electrum in the network settings (orb in bottom right), Proxy > Use Tor proxy at port ...

y-chan pushed a commit to VIPSTARCOIN-electrum/electrum-vips that referenced this issue Sep 27, 2019
closes spesmilo#5638

(cherry picked from commit 8c1adc2)
ghost pushed a commit to XRCPlatform/electrum-xrc that referenced this issue Jan 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic-network 🕸 related to logic in network.py (etc)
Projects
None yet
Development

No branches or pull requests

2 participants