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

Issue on tor startup (seed, desktop client) #79

Closed
alkum opened this issue Feb 7, 2022 · 0 comments · Fixed by #80
Closed

Issue on tor startup (seed, desktop client) #79

alkum opened this issue Feb 7, 2022 · 0 comments · Fixed by #80

Comments

@alkum
Copy link
Contributor

alkum commented Feb 7, 2022

Starting a tor-enabled seed throws a tor exception.

Enabling DEBUG for bisq.tor in logback.xml :

13:42:00.010 INFO  [NetworkService.network-IO-pool] b.t.TorBootstrap: Tor files installed to /home/user/.local/share/bisq2_seed1/tor 
13:42:00.020 DEBUG [NetworkService.network-IO-pool] b.t.TorBootstrap: Owner pid 2931 
13:42:00.021 DEBUG [NetworkService.network-IO-pool] b.t.TorBootstrap: command for process builder: /home/user/.local/share/bisq2_seed1/tor/tor -f /home/user/.local/share/bisq2_seed1/tor/torrc __OwningControllerProcess 2931 
13:42:00.032 DEBUG [NetworkService.network-IO-pool] b.t.TorBootstrap: Process started. pid=2980 info=[user: Optional[user], cmd: /home/user/.local/share/bisq2_seed1/tor/tor, args: [-f, /home/user/.local/share/bisq2_seed1/tor/torrc, __OwningControllerProcess, 2931], startTime: Optional[2022-02-07T12:41:59.590Z], totalTime: Optional[PT0S]] 
13:42:00.036 INFO  [NetworkService.network-IO-pool] b.t.TorBootstrap: Tor process started 
13:42:00.040 DEBUG [NetworkService.network-IO-pool] b.t.TorBootstrap: Logs from control connection: >> Feb 07 13:42:00.029 [notice] Tor 0.4.5.7 (git-83f895c015de5520) running on Linux with Libevent 2.1.11-stable, OpenSSL 1.1.1j, Zlib 1.2.11, Liblzma N/A, Libzstd N/A and Glibc 2.33 as libc. 
13:42:00.044 DEBUG [NetworkService.network-IO-pool] b.t.TorBootstrap: Logs from control connection: >> Feb 07 13:42:00.029 [notice] Tor can't help you if you use it wrong! Learn how to be safe at https://www.torproject.org/download/download#warning 
13:42:00.045 DEBUG [NetworkService.network-IO-pool] b.t.TorBootstrap: Logs from control connection: >> Feb 07 13:42:00.029 [notice] Read configuration file "/home/user/.local/share/bisq2_seed1/tor/torrc". 
13:42:00.045 DEBUG [NetworkService.network-IO-pool] b.t.TorBootstrap: Logs from control connection: >> Feb 07 13:42:00.031 [notice] Opening Control listener on 127.0.0.1:0 
13:42:00.045 DEBUG [NetworkService.network-IO-pool] b.t.TorBootstrap: Logs from control connection: >> Feb 07 13:42:00.031 [notice] Control listener listening on port 40361. 
13:42:00.045 DEBUG [NetworkService.network-IO-pool] b.t.TorBootstrap: Logs from control connection: >> Feb 07 13:42:00.031 [notice] Opened Control listener connection (ready) on 127.0.0.1:40361 
13:42:00.046 DEBUG [NetworkService.network-IO-pool] b.t.TorBootstrap: Logs from control connection: >> Feb 07 13:42:00.031 [notice] DisableNetwork is set. Tor will not make or accept non-control network connections. Shutting down all existing connections. 
13:42:00.051 DEBUG [NetworkService.network-IO-pool] b.t.TorBootstrap: Process builder terminated 
13:42:00.051 INFO  [NetworkService.network-IO-pool] b.t.TorBootstrap: Cookie initialized 
13:42:00.054 ERROR [NetworkService.network-IO-pool] b.n.p.n.t.TorTransport: tor.startAsync failed java.net.ConnectException: Connection refused
	at java.base/sun.nio.ch.Net.connect0(Native Method)
	at java.base/sun.nio.ch.Net.connect(Net.java:579)
	at java.base/sun.nio.ch.Net.connect(Net.java:568)
	at java.base/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:588)
	at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:327)
	at java.base/java.net.Socket.connect(Socket.java:633)
	at java.base/java.net.Socket.connect(Socket.java:583)
	at java.base/java.net.Socket.<init>(Socket.java:507)
	at java.base/java.net.Socket.<init>(Socket.java:287)
	at bisq.tor.TorController.start(TorController.java:57)
	at bisq.tor.Tor.start(Tor.java:161)
	at bisq.network.p2p.node.transport.TorTransport.initialize(TorTransport.java:51)
	at bisq.network.p2p.node.Node.maybeInitializeServer(Node.java:138)
	at bisq.network.p2p.node.NodesById.maybeInitializeServer(NodesById.java:66)
	at bisq.network.p2p.ServiceNode.maybeInitializeServer(ServiceNode.java:169)
	at bisq.network.p2p.ServiceNodesByTransport.lambda$bootstrapToNetwork$4(ServiceNodesByTransport.java:118)
	at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1804)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.lang.Thread.run(Thread.java:833)

TorBootstrap.waitForControlPort() returns 0 as controlPort.

bisq.tor.Tor.start(Tor.java:161) then fails because torController.start(controlPort) uses 0 as arg.


Update: affects both local seeds and tor-enabled desktop clients.

@alkum alkum changed the title Issue with tor-enabled seed startup Issue on tor startup (seed, desktop client) Feb 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant