0

My tor server stopped working vecause v2 has been deprecated. I could not get it into creating new v3 .onion address, so I uninstalled tor and installed again. Here is part of my torrc file:

HiddenServiceDir /var/lib/tor/hidden_service/
HiddenServicePort 22 127.0.0.1:22

I would expect that when I start tor service (by service tor start), it will generate new .onion address in file /var/lib/tor/hidden_service/host, but it does not.

In the log, there is entry

Dec 12 23:26:42 acc-box2 systemd[1]: Starting Anonymizing overlay network for TCP (multi-instance-master)...
Dec 12 23:26:42 acc-box2 systemd[1]: Started Anonymizing overlay network for TCP (multi-instance-master).

but nothing about connecting to circuits. What can be wrong please?

1
  • You need to delete the old onion service in /var/lib/tor/hidden_service/ before tor will create a new one.
    – Steve
    Commented Dec 12, 2021 at 23:47

2 Answers 2

0

To enforce Tor to re-create the keys you need to make the target directory empty, that's how it works

6
  • Yes the target directory is empty. Still..
    – Jan
    Commented Dec 14, 2021 at 9:01
  • can you run tor in verbose mode? Looks like an answer will be in a verbose logs.
    – Alexey Vesnin
    Commented Dec 14, 2021 at 14:32
  • When I run tor as service it creates entry in syslog that tor is running on TCP service, but it looks like tor is not running as hidden service - it does not create any file in hidden_directory. When I try to run tor as command, I get error tor: error while loading shared libraries: libevent-2.1.so.6: cannot open shared object file: No such file or directory. I am aware that installing libevent is not easy. Morevover, my system says that most recent version of libevent-2.1 is installed and I also found somewhere that recent version of tor does not need libevent library.
    – Jan
    Commented Dec 15, 2021 at 15:15
  • that can be a key: populate LD_LIBRARY_PATH with all the required libraries' locations. the list is given with ldd /full/path/to/executable command
    – Alexey Vesnin
    Commented Dec 15, 2021 at 21:30
  • Sorry I get ldd: No such file or directory, also I am not linux expert, so I do not know how to "populate LD_LIBRARY_PATH with all the required libraries' locations"
    – Jan
    Commented Dec 16, 2021 at 22:26
0

I had to solve things in the strange way. It looks like when I uninstalled tor v2 the libevent-2.1.so.6 got wiped out. Probably by my other actions. When I reinstalled tor and I was trying to reinstall libevent, other versions were installed, like libevent-2.2.so.1, but tor was still complaining about missing libevent-2.1.so.6. Fortunately I found it in old backup and I just copied it to /usr/lib/x86_64-linux-gnu/. The tor from the command line started to work, but it did not work as a service. I think I fixed that by changing owner of hidden_service directory to debian-tor. Then service started to work after I restarted computer. Hope this will help someone, it took me four evenings to fix.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .