How to debug onion service?

Hi,

I followed Tor Project | Set up Your Onion Service

I let ~12hours pass for the propagation.

I’ve try to reach the webpage that is hosted trough that .onion but it fail :confused:

is there a way to test if the .onion address has been well propagated ? and if the connection reach the proper server ? Then I can take care of the config of the HTTP server…

btw I have In the Tor debug log

tor_tls_read(): read returned r=-1, err=-2

quite often… is this related ?

Thanks

Hi @Gordon, your new onion service should propagate in some seconds/minutes and it shouldn’t take hours.

Yes, for example, using onionprobe: https://onionservices.torproject.org/apps/web/onionprobe/

What’s the onion error? See here what each error means: ONION SERVICES | Tor Project | Tor Browser Manual

Paste your torrc and we can take a look.

2 Likes

Thank you @gus

I didn’t test onionprobe, it require too much dependency, if only it was available as .appimage :slight_smile:

-

I have none of those ONION SERVICES ERRORS

The error that I get with tor-browser:

Unable to connect

An error occurred during a connection to
.xxx.onion

The site could be temporarily unavailable or too busy. Try again in a few moments.
If you are unable to load any pages, check your computer’s network connection.
If your computer or network is protected by a firewall or proxy, make sure that Tor Browser is permitted to access the web.

-

My torrc is quite simple:

torrc
#from /usr/share/tor/tor-service-defaults-torrc (edited)
DataDirectory /var/lib/tor
PidFile /run/tor/tor.pid
RunAsDaemon 0

SocksPort unix:/run/tor/socks WorldWritable
SocksPort 9050

CookieAuthentication 1
CookieAuthFileGroupReadable 1
CookieAuthFile /run/tor/control.authcookie

#end tor-service-defaults-torrc


Log notice file /var/log/tor/notices.log
Log debug file /var/log/tor/debug.log

HiddenServiceDir /Path
HiddenServicePort 80 unix:/path/file.sock



This might be related, but we the info we have here is hard to know.

My torrc is quite simple:

Your config seems right, although I would recommend removing the SocksPort config depending on your use-case/threat model (better not to mix Onion Services with a Tor proxy, unless you know what you’re doing).

Seem like you can also remove the CookieAuth configs (since you’re not using the ControlPort).

Thank you @rhatto , I will test you recommendation and let you know of the outcome.

… better not to mix Onion Services with a Tor proxy …

Actually I just to run Onion Services (for now)

update

it’s working :slight_smile:

but in the debug log I still got a lot of

[debug] circuit_remove_handled_ports(): Port 443 is already being handled; removing.

Should I bother ?

Secondly my Onion service is a http webpage. (so without httpS )
I know https is not necessary as the Tor network already provide the necessary.
What your two cent about it ?

and if one implement anyway https, I assume it’s only self-certificate with tor ?