0

For a long time I am running a TOR relay on my home fiber Internet connection without any issues, however the last month or so every hour the following error message is shown to the log.

Oct 27 12:25:45 debian Tor[3734]: Bootstrapped 100% (done): Done
Oct 27 12:26:47 debian Tor[3734]: Performing bandwidth self-test...done.
Oct 27 13:25:44 debian Tor[3734]: Couldn't rotate onion key.
Oct 27 13:25:44 debian Tor[3734]: tor_bug_occurred_(): Bug: ../src/feature/relay/router.c:2367: router_rebuild_descriptor: Non-fatal assertion !(desc_gen_reason == NULL) failed. (Future instances of this warning will be silenced.) (on Tor 0.4.1.6 )
Oct 27 13:25:44 debian Tor[3734]: Bug: Non-fatal assertion !(desc_gen_reason == NULL) failed in router_rebuild_descriptor at ../src/feature/relay/router.c:2367. Stack trace: (on Tor 0.4.1.6 )
Oct 27 13:25:44 debian Tor[3734]: Bug:     /usr/bin/tor(log_backtrace_impl+0x46) [0x559c533332e6] (on Tor 0.4.1.6 )
Oct 27 13:25:44 debian Tor[3734]: Bug:     /usr/bin/tor(tor_bug_occurred_+0x16c) [0x559c5332e5bc] (on Tor 0.4.1.6 )
Oct 27 13:25:44 debian Tor[3734]: Bug:     /usr/bin/tor(router_rebuild_descriptor+0x158) [0x559c5326c218] (on Tor 0.4.1.6 )
Oct 27 13:25:44 debian Tor[3734]: Bug:     /usr/bin/tor(+0x145d73) [0x559c53266d73] (on Tor 0.4.1.6 )
Oct 27 13:25:44 debian Tor[3734]: Bug:     /usr/bin/tor(+0x73347) [0x559c53194347] (on Tor 0.4.1.6 )
Oct 27 13:25:44 debian Tor[3734]: Bug:     /lib/x86_64-linux-gnu/libevent-2.1.so.6(+0x22c05) [0x7f8ffc581c05] (on Tor 0.4.1.6 )
Oct 27 13:25:44 debian Tor[3734]: Bug:     /lib/x86_64-linux-gnu/libevent-2.1.so.6(event_base_loop+0x5a7) [0x7f8ffc582537] (on Tor 0.4.1.6 )
Oct 27 13:25:44 debian Tor[3734]: Bug:     /usr/bin/tor(do_main_loop+0xff) [0x559c5319351f] (on Tor 0.4.1.6 )
Oct 27 13:25:44 debian Tor[3734]: Bug:     /usr/bin/tor(tor_run_main+0x10e5) [0x559c53180ea5] (on Tor 0.4.1.6 )
Oct 27 13:25:44 debian Tor[3734]: Bug:     /usr/bin/tor(tor_main+0x3a) [0x559c5317e38a] (on Tor 0.4.1.6 )
Oct 27 13:25:44 debian Tor[3734]: Bug:     /usr/bin/tor(main+0x19) [0x559c5317df49] (on Tor 0.4.1.6 )
Oct 27 13:25:44 debian Tor[3734]: Bug:     /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xeb) [0x7f8ffbe6309b] (on Tor 0.4.1.6 )
Oct 27 13:25:44 debian Tor[3734]: Bug:     /usr/bin/tor(_start+0x2a) [0x559c5317df9a] (on Tor 0.4.1.6 )

I already restarted the service and rebooted the machine, but of no avail.

Any suggestions how to maybe manually rotate the onion key?

2
  • You are several versions behind. Update to the latest. If you are still seeing problems, we can help you put in a bug report. Get the latest version by using the official Debian repo: 2019.www.torproject.org/docs/debian
    – elmerjfudd
    Oct 27, 2019 at 7:18
  • Thanks @JSEvans. I followed the steps on the link you provided and am now running TOR version 0.4.1.6. Unfortunately that didn't resolve the key rotation issue. Updated the question to show the updated log.
    – bitsadmin
    Oct 27, 2019 at 13:27

1 Answer 1

1

After looking into this again after leaving it for a long time, I quickly found the solution.

It turned out that the files in the /var/lib/tor/keys folder were not owned nor writable for the debian-tor user. Make sure to set debian-tor as the owner and allow this user to read and write the files.

chown -R debian-tor /var/lib/tor/keys/*
chmod 600 /var/lib/tor/keys/*

After changing these permissions, the TOR service didn't spit out error message anymore!

You must log in to answer this question.

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