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

Catching: OnionProxyManager - Tor is not running #5

Open
ramizdemiurge opened this issue Oct 11, 2018 · 2 comments
Open

Catching: OnionProxyManager - Tor is not running #5

ramizdemiurge opened this issue Oct 11, 2018 · 2 comments

Comments

@ramizdemiurge
Copy link

ramizdemiurge commented Oct 11, 2018

Hi. I'm trying to run code from Readme.md and catching:

[main] INFO com.msopentech.thali.java.toronionproxy.OnionProxyManager - Tor is not running
Exception in thread "main" java.lang.RuntimeException: could not make Tor executable.
	at com.msopentech.thali.java.toronionproxy.OnionProxyManager.installAndConfigureFiles(OnionProxyManager.java:462)
	at com.msopentech.thali.java.toronionproxy.OnionProxyManager.installAndStartTorOp(OnionProxyManager.java:324)
	at com.msopentech.thali.java.toronionproxy.OnionProxyManager.startWithRepeat(OnionProxyManager.java:96)
	at net.sf.T0rlib4j.controller.network.JavaTorRelay.initTor(JavaTorRelay.java:58)
	at net.sf.T0rlib4j.controller.network.JavaTorRelay.<init>(JavaTorRelay.java:24)
	at ServerSocketViaTor.main(ServerSocketViaTor.java:25)

Is there some samples except those that are in Readme.md?
(Perhaps I did not quite correctly understand what the library is for.)

I found there new files: tor.exe, tor-gencert.exe
Also, I'm using linux. (Ubuntu 16.04)

UPD: I downloaded zip from https://github.com/PanagiotisDrakatos/T0rlib4j/blob/30feaf5d658a4ee7a7142630238eeab569d3211e/src/Tor/native/linux/x64/tor.zip and extracted it into tordir. Now I have this:

[main] INFO com.msopentech.thali.java.toronionproxy.OnionProxyManager - Tor is not running
[main] INFO com.msopentech.thali.java.toronionproxy.OnionProxyManager - Starting Tor
[Thread-1] INFO com.msopentech.thali.java.toronionproxy.OnionProxyManager - Oct 11 05:17:50.584 [notice] Tor 0.3.2.9 running on Linux with Libevent 2.0.22-stable, OpenSSL 1.0.2g, Zlib 1.2.8, Liblzma N/A, and Libzstd N/A.
[Thread-1] INFO com.msopentech.thali.java.toronionproxy.OnionProxyManager - Oct 11 05:17:50.584 [notice] Tor can't help you if you use it wrong! Learn how to be safe at https://www.torproject.org/download/download#warning
[Thread-1] INFO com.msopentech.thali.java.toronionproxy.OnionProxyManager - Oct 11 05:17:50.584 [notice] Read configuration file "/home/allard/Documents/GitKraker/tor-java/tordir/torrc.txt".
[Thread-1] INFO com.msopentech.thali.java.toronionproxy.OnionProxyManager - Oct 11 05:17:50.588 [warn] Path for GeoIPFile (geoip.txt) is relative and will resolve to /home/allard/Documents/GitKraker/tor-java/tordir/geoip.txt. Is this what you wanted?
[Thread-1] INFO com.msopentech.thali.java.toronionproxy.OnionProxyManager - Oct 11 05:17:50.588 [warn] Path for GeoIPv6File (geoip6.txt) is relative and will resolve to /home/allard/Documents/GitKraker/tor-java/tordir/geoip6.txt. Is this what you wanted?
[Thread-1] INFO com.msopentech.thali.java.toronionproxy.OnionProxyManager - Oct 11 05:17:50.588 [warn] Path for PidFile (pid) is relative and will resolve to /home/allard/Documents/GitKraker/tor-java/tordir/pid. Is this what you wanted?
[main] WARN com.msopentech.thali.java.toronionproxy.OnionProxyManager - Tor exited with value 1
[Thread-1] INFO com.msopentech.thali.java.toronionproxy.OnionProxyManager - Oct 11 05:17:50.588 [warn] Failed to parse/validate config: You have specified at least one relative path (see above) with the RunAsDaemon option. RunAsDaemon is not compatible with relative paths.
[Thread-1] INFO com.msopentech.thali.java.toronionproxy.OnionProxyManager - Oct 11 05:17:50.588 [err] Reading config failed--see warnings above.
@PanagiotisDrakatos
Copy link
Owner

It is a Java library, this means that you don't need to extract anything because the library do all this that you asked for. The only thing that you have to do is to is to add library programmatically. This library helps you connect to tor programmatically so you need to insert this line in your pom.xml(if you don't know what is pom.xml make a google search about "java maven project") in order to use it.

.

<repositories>
	<repository>
	    <id>jitpack.io</id>
	    <url>https://jitpack.io</url>
	</repository>
  </repositories>
<dependency>
	    <groupId>com.github.PanagiotisDrakatos</groupId>
	    <artifactId>T0rlib4j</artifactId>
	    <version>1.0.2</version>
</dependency>

By the way, i have implemented the sample into readme.md but anyway you can find it here server code and the client(i think its too obvious to make work it properly you need to start first initialize the server and then the client).

@Clemens85
Copy link

Hi,

I am also trying to get it running, but I have quite the same problem.
I get this stacktrace when trying to start your server code sample:

[main] INFO com.msopentech.thali.java.toronionproxy.OnionProxyManager - Tor is not running Exception in thread "main" java.lang.RuntimeException: could not make Tor executable. at com.msopentech.thali.java.toronionproxy.OnionProxyManager.installAndConfigureFiles(OnionProxyManager.java:462) at com.msopentech.thali.java.toronionproxy.OnionProxyManager.installAndStartTorOp(OnionProxyManager.java:324) at com.msopentech.thali.java.toronionproxy.OnionProxyManager.startWithRepeat(OnionProxyManager.java:96) at net.sf.T0rlib4j.controller.network.JavaTorRelay.initTor(JavaTorRelay.java:58) at net.sf.T0rlib4j.controller.network.JavaTorRelay.<init>(JavaTorRelay.java:24) at de.torserver.ServerSocketViaTor.main(ServerSocketViaTor.java:28)

I tried firstly with the maven dependency, and then because it didn't work, I tried it by manually downloading your JAR file with all transitive dependencies included, but I got for both variants the same stacktrace...

I am also running on Ubuntu 16.04.
Do you have any suggestions / hints?

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

No branches or pull requests

3 participants