Bisq: Application dies shortly after launch while attempting to connect with Tor with error "Auth cookie not created"

Created on 8 Feb 2019  路  16Comments  路  Source: bisq-network/bisq

When launching Bisq on my Windows 10 VM, it dies several seconds later and doesn't get past this on the splash screen:
image

In the log:
Feb-08 10:59:37.065 [NetworkNode-9999] ERROR b.n.p.n.TorNetworkNode: Could not connect to running Tor: java.io.IOException: Auth cookie not created

I am consistently encountering it on my VM, but not on my primary Windows 10 machine. I have investigated/eliminated possible causes such as firewall, antivirus, file permissions and as of yet been unable to determine the root cause.

I see it is creating an empty tor/.tor/control_auth_cookie file, but not writing to it. While looking at the netlayer module, it throws this exception if the file is not written to within 3 seconds.
https://github.com/JesusMcCloud/netlayer/blob/master/tor.native/src/main/kotlin/org/berndpruenster/netlayer/tor/TorContext.kt#L346

At this point the only thing I can think of is it perhaps could be a timing issue with my VM running slower than my primary machine and it taking longer than 3 seconds to write to this file. But I am not familiar with the netlayer module nor with tor in general.

gui Tor

Most helpful comment

I have a fix that will show an error message rather than just exiting the application when this is encountered.
image

This may also address some of the other recent reported issues with the application exiting shortly after launch.

All 16 comments

I have a fix that will show an error message rather than just exiting the application when this is encountered.
image

This may also address some of the other recent reported issues with the application exiting shortly after launch.

I just downloaded and installed Bisq for the first time, and I am getting the same error. Do you know how I can fix this issue?

If you could give a bit more informations about your configuration (what OS) and connection, it may help.

I installed it on my windows laptop. Not sure about connection.

At this point I have been unable to determine the cause or a possible workaround. However, this is on the list of things to do for @freimair.

seems to be closely related to #1299

On my VM that consistently exhibits this issue, increasing the COOKIE_TIMEOUT resolves it. I just doubled it to 6 seconds.
https://github.com/JesusMcCloud/netlayer/blob/master/tor.native/src/main/kotlin/org/berndpruenster/netlayer/tor/TorContext.kt#L63

@freimair Could you change the timeout if that helps?

I will prepare a fresh netlayer release and PR it right away

I'm still getting this on one of my windows OS's with the newest version bisq 0.9.5.

@user135711 the fix for this will be available in our upcoming release (this week).

For some reason i could bypass that using a VPN

I regularly get "connecting to bisq network failed error java.io.IOException: auth cookie not created". I'm using the provided gateways, and I'm running from source build. Is there anything I can share, or get additional logging?
This is windows 10 VM on a celeron CPU, 5GB ram, so it's on the lower end of hardware. I don't know that I can modify from 3 to 6 seconds since TorContext.kt is not part of the bisq git pull

@freimair unless you have another idea, looks like we may need to increase the timeout further?

the timeout is already at 10 seconds. This is way too long already. Just think of it. Even windows machines are not that slow :). No, seriously, there is something else going on. Unfortunately, I cannot reproduce the issue with even a VM @devinbileck provided me as faulty.

EDIT: after sifting through the code again I found a code branch giving some insight in what might happen:

            if (OsType.current != OsType.WIN) {
                val exit = torProcess.waitFor()

with a comment saying that for non-Win OSs, the torProcess is only used to start up tor and is then being waited for, which is a guarantee that tor is up and running. On Win, tor is run inside the torProcess and hence, there is no such gate.

The timeout therefore has to be bigger for Win to function equally.

Also, I have available the source build and am currently using as my bisq app. I can make any local code changes that might help provide any additional insight if you can think of anything helpful

Was this page helpful?
0 / 5 - 0 ratings

Related issues

5andr0 picture 5andr0  路  6Comments

gdvine picture gdvine  路  6Comments

ripcurlx picture ripcurlx  路  6Comments

ifarnung picture ifarnung  路  4Comments

wiz picture wiz  路  3Comments