vergecurrency / verge

Official Verge Core Source Code Repository :muscle:
https://VergeCurrency.com
MIT License
1.41k stars 394 forks source link

4.0.2 Windows QT - 0 Connections / Tor related errors #718

Closed jrsikors closed 6 years ago

jrsikors commented 6 years ago

I've been helping a few people via Discord, and there is something funky going on with 4.0.2 Tor.

The same person can successfully run 4.0.1 , but as soon as they launch 4.0.2 they get 0 connections, and after an hour still have 0 connections. Below is the tor.log and probably the reason why.

Also seen someone who can't get past the "timed out waiting for onion hostname" on loading 4.0.2, but 4.0.1 gets right in.

I am seriously befuddled. You would think it's a problem with Tor or his ISP or firewall or something, but it's not, because the simple fact that 4.0.1 works flawlessly.

These are the errors one of them was getting while on verge-qt 4.0.2 in the tor.log ... which did not happen in verge-qt 4.0.1

14 19:54:15.000 [notice] Tor has successfully opened a circuit. Looks like client functionality is working. Apr 14 19:54:15.000 [notice] Bootstrapped 100%: Done Apr 14 19:55:40.000 [notice] Closing stream for '[scrubbed].onion': hidden service is unavailable (try again later). Apr 14 19:55:43.000 [warn] Fetching v2 rendezvous descriptor failed. Retrying at another directory. Apr 14 19:55:44.000 [notice] Closing stream for '[scrubbed].onion': hidden service is unavailable (try again later). Apr 14 19:55:47.000 [warn] Fetching v2 rendezvous descriptor failed. Retrying at another directory. Apr 14 19:55:48.000 [warn] Fetching v2 rendezvous descriptor failed. Retrying at another directory. Apr 14 19:55:49.000 [warn] Fetching v2 rendezvous descriptor failed. Retrying at another directory. Apr 14 19:55:50.000 [notice] Closing stream for '[scrubbed].onion': hidden service is unavailable (try again later). Apr 14 19:56:04.000 [notice] Closing stream for '[scrubbed].onion': hidden service is unavailable (try again later). Apr 14 19:56:11.000 [notice] Closing stream for '[scrubbed].onion': hidden service is unavailable (try again later). Apr 14 19:56:18.000 [notice] Closing stream for '[scrubbed].onion': hidden service is unavailable (try again later). Apr 14 19:57:11.000 [warn] Fetching v2 rendezvous descriptor failed. Retrying at another directory. Apr 14 19:57:12.000 [notice] Closing stream for '[scrubbed].onion': hidden service is unavailable (try again later). Apr 14 19:57:20.000 [notice] Closing stream for '[scrubbed].onion': hidden service is unavailable (try again later). Apr 14 19:57:58.000 [err] libevent call with win32 failed: Successful WSAStartup not yet performed [WSANOTINITIALISED ] [10093]

justinvforvendetta commented 6 years ago

prob want to delete the peers.dat when starting up. strangely, i had no issues starting 4.0.2 after having replaced my 4.0.1 on my windows 10 machine

jrsikors commented 6 years ago

I personally cannot duplicate it. Trust me -- I had tried -everything-. Deleting peers.dat didn't do anything... they were stuck with 0 connections after an hour.

Even using the peers.dat from verge-blockchain.com bootstrap didn't help. Same Tor errors over and over.

I wouldn't post an issue here if I didn't think it was worth you double checking ! Did anything change since 4.0.1 regarding how Tor behaves inside the QT? I suppose I could go look at the commits, but wanted to run it by here first to see if a lightbulb went off as to the 'why'

jrsikors commented 6 years ago

Easiest way to ask the question is this: Why does Person_A on Computer_A have 0 issues with Tor on 4.0.1, but that same Person_A on Computer_A has major issues with Tor on 4.0.2.

Computer_A is the same. No changes.
Literally... Running 4.0.1 = success close down 4.0.1 Running 4.0.2 = connection / tor problems close down 4.0.2 Running 4.0.1 = success

Seriously out of ideas !

jrsikors commented 6 years ago

I'll probably just chalk this up to people not following instructions. For SNG I ran fresh datadir 4.0.1 , let it run for a few mins, stopped. copied tor.log . deleted datadir, opened 4.0.2 , let it run for a few mins.

Similar warning messages. The "error" comes when you close verge-qt

4.0.1

Apr 15 17:24:02.000 [notice] Tor 0.3.2.8-rc-dev opening log file.
Apr 15 17:24:02.970 [notice] Tor 0.3.2.8-rc-dev running on Very recent version of Windows [major=6,minor=3] with Libevent 2.0.22-stable, OpenSSL 1.0.2k, Zlib 1.2.11, Liblzma N/A, and Libzstd N/A.
Apr 15 17:24:02.970 [notice] Tor can't help you if you use it wrong! Learn how to be safe at https://www.torproject.org/download/download#warning
Apr 15 17:24:02.970 [notice] Configuration file "C:\Users\Jeff\AppData\Roaming\VERGE\tor\torrc" not present, using reasonable defaults.
Apr 15 17:24:02.970 [warn] Path for GeoIPFile (<default>) is relative and will resolve to C:\Users\Jeff\Desktop\Verge QT 401\<default>. Is this what you wanted?
Apr 15 17:24:02.970 [warn] Path for GeoIPv6File (<default>) is relative and will resolve to C:\Users\Jeff\Desktop\Verge QT 401\<default>. Is this what you wanted?
Apr 15 17:24:02.970 [notice] Scheduler type KISTLite has been enabled.
Apr 15 17:24:02.970 [notice] Opening Socks listener on 127.0.0.1:9089
Apr 15 17:24:03.000 [notice] Bootstrapped 0%: Starting
Apr 15 17:24:03.000 [notice] Starting with guard context "default"
Apr 15 17:24:03.000 [notice] Bootstrapped 80%: Connecting to the Tor network
Apr 15 17:24:19.000 [notice] Bootstrapped 85%: Finishing handshake with first hop
Apr 15 17:24:19.000 [notice] Bootstrapped 90%: Establishing a Tor circuit
Apr 15 17:24:20.000 [notice] Tor has successfully opened a circuit. Looks like client functionality is working.
Apr 15 17:24:20.000 [notice] Bootstrapped 100%: Done
Apr 15 17:24:28.000 [warn] Fetching v2 rendezvous descriptor failed. Retrying at another directory.
Apr 15 17:24:30.000 [warn] Fetching v2 rendezvous descriptor failed. Retrying at another directory.
Apr 15 17:24:31.000 [notice] Closing stream for '[scrubbed].onion': hidden service is unavailable (try again later).
Apr 15 17:24:35.000 [warn] Fetching v2 rendezvous descriptor failed. Retrying at another directory.
Apr 15 17:24:38.000 [notice] Closing stream for '[scrubbed].onion': hidden service is unavailable (try again later).
Apr 15 17:24:41.000 [notice] Closing stream for '[scrubbed].onion': hidden service is unavailable (try again later).
Apr 15 17:24:47.000 [warn] Fetching v2 rendezvous descriptor failed. Retrying at another directory.
Apr 15 17:24:49.000 [warn] Fetching v2 rendezvous descriptor failed. Retrying at another directory.
Apr 15 17:24:50.000 [warn] Fetching v2 rendezvous descriptor failed. Retrying at another directory.
Apr 15 17:24:53.000 [notice] Closing stream for '[scrubbed].onion': hidden service is unavailable (try again later).
Apr 15 17:25:57.000 [err] libevent call with win32 failed: Successful WSAStartup not yet performed [WSANOTINITIALISED ] [10093]

4.0.2

Apr 15 17:26:53.000 [notice] Tor 0.3.2.8-rc-dev opening new log file.
Apr 15 17:26:53.660 [notice] Tor 0.3.2.8-rc-dev running on Windows 8 with Libevent 2.0.21-stable, OpenSSL 1.0.2k, Zlib 1.2.11, Liblzma N/A, and Libzstd N/A.
Apr 15 17:26:53.660 [notice] Tor can't help you if you use it wrong! Learn how to be safe at https://www.torproject.org/download/download#warning
Apr 15 17:26:53.660 [notice] Configuration file "C:\Users\Jeff\AppData\Roaming\VERGE\tor\torrc" not present, using reasonable defaults.
Apr 15 17:26:53.660 [warn] Path for GeoIPFile (<default>) is relative and will resolve to C:\Users\Jeff\Desktop\Verge QT 402\<default>. Is this what you wanted?
Apr 15 17:26:53.660 [warn] Path for GeoIPv6File (<default>) is relative and will resolve to C:\Users\Jeff\Desktop\Verge QT 402\<default>. Is this what you wanted?
Apr 15 17:26:53.675 [notice] Scheduler type KISTLite has been enabled.
Apr 15 17:26:53.675 [notice] Opening Socks listener on 127.0.0.1:9089
Apr 15 17:26:54.000 [notice] Bootstrapped 0%: Starting
Apr 15 17:26:55.000 [notice] Starting with guard context "default"
Apr 15 17:26:55.000 [notice] Bootstrapped 80%: Connecting to the Tor network
Apr 15 17:27:07.000 [notice] Bootstrapped 85%: Finishing handshake with first hop
Apr 15 17:27:08.000 [notice] Bootstrapped 90%: Establishing a Tor circuit
Apr 15 17:27:08.000 [notice] Tor has successfully opened a circuit. Looks like client functionality is working.
Apr 15 17:27:08.000 [notice] Bootstrapped 100%: Done
Apr 15 17:29:17.000 [notice] Closing stream for '[scrubbed].onion': hidden service is unavailable (try again later).
Apr 15 17:29:30.000 [warn] Fetching v2 rendezvous descriptor failed. Retrying at another directory.
Apr 15 17:29:31.000 [warn] Fetching v2 rendezvous descriptor failed. Retrying at another directory.
Apr 15 17:29:32.000 [warn] Fetching v2 rendezvous descriptor failed. Retrying at another directory.
Apr 15 17:29:33.000 [notice] Closing stream for '[scrubbed].onion': hidden service is unavailable (try again later).
Apr 15 17:29:37.000 [warn] Fetching v2 rendezvous descriptor failed. Retrying at another directory.
Apr 15 17:29:39.000 [warn] Fetching v2 rendezvous descriptor failed. Retrying at another directory.
Apr 15 17:29:40.000 [warn] Fetching v2 rendezvous descriptor failed. Retrying at another directory.
Apr 15 17:29:42.000 [notice] Closing stream for '[scrubbed].onion': hidden service is unavailable (try again later).
Apr 15 17:30:29.000 [notice] Closing stream for '[scrubbed].onion': hidden service is unavailable (try again later).
Apr 15 17:30:40.000 [warn] Fetching v2 rendezvous descriptor failed. Retrying at another directory.
Apr 15 17:30:42.000 [notice] Closing stream for '[scrubbed].onion': hidden service is unavailable (try again later).
Apr 15 17:31:01.000 [notice] Closing stream for '[scrubbed].onion': hidden service is unavailable (try again later).
Apr 15 17:31:10.000 [notice] Closing stream for '[scrubbed].onion': hidden service is unavailable (try again later).
Apr 15 17:31:30.000 [warn] Fetching v2 rendezvous descriptor failed. Retrying at another directory.
Apr 15 17:31:31.000 [notice] Closing stream for '[scrubbed].onion': hidden service is unavailable (try again later).
Apr 15 17:31:39.000 [err] libevent call with win32 failed: Successful WSAStartup not yet performed [WSANOTINITIALISED ] [10093]
jrsikors commented 6 years ago

only noticeable difference is that:

4.0.1 uses libevent 2.0.22-stable 4.0.2 uses libevent 2.0.21-stable

thought that was kind of odd that the newer QT uses an older libevent, but surely a non issue

liang55 commented 6 years ago

我就是在中国,4.0.2不能运行,很难过

Positivism commented 6 years ago

"I live in China and cannot run 4.0.2, this is very sad."

jrsikors commented 6 years ago

https://github.com/vergecurrency/VERGE/wiki/Verge-QT-Wallet-FAQ-&-Common-Issues#tor-blocked-by-countryisp

Try using this:

Bridge obfs4 177.71.253.52:54123 DCE6A7A436CD03964EF40B4692CF4820D4FF2BFD
Bridge obfs4 95.64.233.83:25006 73F17356516D3CBEA5CDA2384B0C0107966FBA35
Bridge obfs4 216.158.226.216:49283 124A4D2A7E40211E5BAB24978181F25BD3E798F1
UseBridges 1
liang55 commented 6 years ago

This problem is still not solved!!

VERGE.conf

rpcuser=vergeusername
rpcpassword=vergepassword
rpcport=20102
port=21102
daemon=1
algo=groestl

VERGE/tor/torrc

ClientTransportPlugin obfs4 exec /usr/bin/obfs4proxy
UseBridges 1
Bridge obfs4 177.71.253.52:54123 DCE6A7A436CD03964EF40B4692CF4820D4FF2BFD
Bridge obfs4 95.64.233.83:25006 73F17356516D3CBEA5CDA2384B0C0107966FBA35
Bridge obfs4 216.158.226.216:49283 124A4D2A7E40211E5BAB24978181F25BD3E798F1

VERGE.log

ThreadRPCServer started
ThreadMessageHandler started
ThreadSocketHandler started
Loading addresses from .onion seeds
7 addresses found from .onion seeds
ThreadOnionSeed exited
Flushed 7 addresses to peers.dat  2ms
trying connection 5n4gl3kvntyanp63.onion:21102 lastseen=82.6hrs
SOCKS5 connecting 5n4gl3kvntyanp63.onion
ERROR: Error reading proxy response
trying connection n5ln6ke2vc47glpl.onion:21102 lastseen=85.2hrs
SOCKS5 connecting n5ln6ke2vc47glpl.onion
ERROR: Error reading proxy response

tor.log

Jun 29 22:44:33.000 [warn] Problem bootstrapping. Stuck at 5%: Connecting to directory server. (Can't connect to bridge; PT_MISSING; count 14; recommendation warn; host DCE6A7A436CD03964EF40B4692CF4820D4FF2BFD at 177.71.253.52:54123)
Jun 29 22:44:33.000 [warn] We were supposed to connect to bridge '95.64.233.83:25006' using pluggable transport 'obfs4', but we can't find a pluggable transport proxy supporting 'obfs4'. This can happen if you haven't provided a ClientTransportPlugin line, or if your pluggable transport proxy stopped running.
Jun 29 22:44:33.000 [warn] Problem bootstrapping. Stuck at 5%: Connecting to directory server. (Can't connect to bridge; PT_MISSING; count 15; recommendation warn; host 73F17356516D3CBEA5CDA2384B0C0107966FBA35 at 95.64.233.83:25006)
Jun 29 22:44:35.000 [warn] We were supposed to connect to bridge '177.71.253.52:54123' using pluggable transport 'obfs4', but we can't find a pluggable transport proxy supporting 'obfs4'. This can happen if you haven't provided a ClientTransportPlugin line, or if your pluggable transport proxy stopped running.
liang55 commented 6 years ago

xyl@ubuntu:~/.VERGE$ VERGE server starting /usr/bin/obfs4proxy Jun 29 22:52:16.665 [notice] Tor 0.3.2.8-rc-dev running on Linux with Libevent 2.0.21-stable, OpenSSL 1.0.2g, Zlib 1.2.8, Liblzma N/A, and Libzstd N/A. Jun 29 22:52:16.665 [notice] Tor can't help you if you use it wrong! Learn how to be safe at https://www.torproject.org/download/download#warning Jun 29 22:52:16.666 [notice] Read configuration file "/home/xyl/.VERGE/tor/torrc". Jun 29 22:52:16.669 [notice] Scheduler type KIST has been enabled. Jun 29 22:52:16.669 [notice] Opening Socks listener on 127.0.0.1:9089

liang55 commented 6 years ago

Can you help me? thanks

jrsikors commented 6 years ago

Try compiling clearnet branch. It doesn't have Tor built in. It looks like you already have Tor installed / configured on your system. So perhaps compiling Clearnet Verge will solve your issues:

git clone https://github.com/vergecurrency/VERGE.git cd VERGE git fetch git checkout 4.0clearnet

liang55 commented 6 years ago

This problem is still not solved

xyl@ubuntu:~$ tail -f .VERGE/debug.log 
ThreadOpenConnections started
ThreadOpenAddedConnections started
ThreadOpenAddedConnections exited
ThreadSocketHandler started
ThreadDNSAddressSeed started
Loading addresses from DNS seeds (could take a while)
11 addresses found from DNS seeds
ThreadDNSAddressSeed exited
Flushed 11 addresses to peers.dat  2ms
trying connection 99.45.88.147:21102 lastseen=116.3hrs
connection timeout
ERROR: GetMyExternalIP() : connection to 91.198.22.70:80 failed
connection timeout
trying connection 73.247.117.99:21102 lastseen=76.9hrs
connection timeout
ERROR: GetMyExternalIP() : connection to 131.186.113.135:80 failed
connection timeout
trying connection 145.239.0.122:21102 lastseen=132.2hrs
connect() failed after select(): Connection refused
trying connection 105.228.198.44:21102 lastseen=91.7hrs
~~~
ProcessBlock: ACCEPTED (scrypt)
ERROR: FetchInputs() : 739378a8c4 mempool Tx prev not found 6407a328e6
stored orphan tx 739378a8c4 (mapsz 1)
trying connection 104.131.144.82:21102 lastseen=86.6hrs
connect() failed after select(): Connection refused
received block 015e891438c44e07fe4a
ERROR: CheckProofOfWork() : hash doesn't match nBits
ERROR: CheckBlock() : proof of work failed
ERROR: ProcessBlock() : CheckBlock FAILED
Misbehaving: 159.89.202.56:21102 (0 -> 50)
trying connection 73.247.117.99:21102 lastseen=76.9hrs
connection timeout
trying connection 104.131.144.82:21102 lastseen=86.6hrs
connect() failed after select(): Connection refused
xyl@ubuntu:~$ VERGEd getinfo
{
    "version" : "v4.0.2.0-3cf3c38-beta",
    "protocolversion" : 90001,
    "walletversion" : 60000,
    "balance" : 0.00000000,
    "newmint" : 0.00000000,
    "stake" : 0.00000000,
    "blocks" : 500,
    "moneysupply" : 100000000.00000000,
    "connections" : 0,
    "proxy" : "",
    "ip" : "123.116.42.51",
    "pow_algo_id" : 4,
    "pow_algo" : "groestl",
    "difficulty" : 0.00024414,
    "difficulty_x17" : 0.00024414,
    "difficulty_scrypt" : 0.10853041,
    "difficulty_groestl" : 0.00024414,
    "difficulty_lyra2re" : 0.00024414,
    "difficulty_blake" : 0.00024414,
    "testnet" : false,
    "keypoololdest" : 1530513466,
    "keypoolsize" : 101,
    "paytxfee" : 0.10000000,
    "errors" : ""
}
jrsikors commented 6 years ago

Try deleting the existing peers.dat, then re-run it ?

liang55 commented 6 years ago

Delete peers.dat to re-run, start downloading data for a while, and then prompt the error.

ProcessBlock: ACCEPTED (scrypt)
received block 000000000676b85595d8
SetBestChain: new best=000000000676b85595d8  height=29499  trust=29500  date=11/05/14 03:39:05
ProcessBlock: ACCEPTED (scrypt)
received block 0000000009bce3ea924e
SetBestChain: new best=0000000009bce3ea924e  height=29500  trust=29501  date=11/05/14 03:39:17
ProcessBlock: ACCEPTED (scrypt)
trying connection 46.4.64.68:21102 lastseen=397385.7hrs
connect() failed after select(): Connection refused
trying connection 104.131.144.82:21102 lastseen=82.3hrs
received block d167396bd06d581357ff
ERROR: CheckProofOfWork() : hash doesn't match nBits
ERROR: CheckBlock() : proof of work failed
ERROR: ProcessBlock() : CheckBlock FAILED
Misbehaving: 159.89.202.56:21102 (0 -> 50)
connect() failed after select(): Connection refused
trying connection 77.67.46.100:21102 lastseen=113.2hrs
ERROR: FetchInputs() : 4ed50aae94 mempool Tx prev not found 654b840b8b
stored orphan tx 4ed50aae94 (mapsz 6)
connection timeout
trying connection 105.228.198.44:21102 lastseen=79.0hrs
connection timeout
trying connection 145.239.0.122:21102 lastseen=129.6hrs
connect() failed after select(): Connection refused