Page 1 of 1

(solved) tor service will not start

PostPosted: Mar 8th, '25, 22:30
by daniewicz
Mageia 9 with Xfce.
I have been using tor successfully for a month or so. Recently I find that the tor service will not start

Code: Select all
# systemctl start tor.service

Code: Select all
Job for tor.service failed because the control process exited with error code.
See "systemctl status tor.service" and "journalctl -xeu tor.service" for details.

Code: Select all
# systemctl status tor.service

Code: Select all
× tor.service - Anonymizing overlay network for TCP
     Loaded: loaded (/usr/lib/systemd/system/tor.service; enabled; preset: disabled)
     Active: failed (Result: exit-code) since Sat 2025-03-08 14:27:07 CST; 1min 6s ago
    Process: 160685 ExecStartPre=/usr/bin/tor --runasdaemon 0 --defaults-torrc /usr/share/tor/defaults-torrc >
        CPU: 3ms

Mar 08 14:27:06 localhost.localdomain systemd[1]: tor.service: Control process exited, code=exited, status=12>
Mar 08 14:27:06 localhost.localdomain systemd[1]: tor.service: Failed with result 'exit-code'.
Mar 08 14:27:06 localhost.localdomain systemd[1]: Failed to start tor.service.
Mar 08 14:27:07 localhost.localdomain systemd[1]: tor.service: Scheduled restart job, restart counter is at 5.
Mar 08 14:27:07 localhost.localdomain systemd[1]: Stopped tor.service.
Mar 08 14:27:07 localhost.localdomain systemd[1]: tor.service: Start request repeated too quickly.
Mar 08 14:27:07 localhost.localdomain systemd[1]: tor.service: Failed with result 'exit-code'.
Mar 08 14:27:07 localhost.localdomain systemd[1]: Failed to start tor.service.

Re: tor service will not start

PostPosted: Mar 8th, '25, 23:57
by doktor5000
Please post the non-ellipsized output, as root
Code: Select all
systemctl status tor.service -al -n150


Also after stopping it try to run the command shown after ExecStartPre= as root (although that is also ellipsized, there's something after that) and post the complete output here.
Code: Select all
/usr/bin/tor --runasdaemon 0 --defaults-torrc /usr/share/tor/defaults-torrc

Re: tor service will not start

PostPosted: Mar 9th, '25, 03:07
by daniewicz
Code: Select all
# systemctl status tor.service -al -n150
× tor.service - Anonymizing overlay network for TCP
     Loaded: loaded (/usr/lib/systemd/system/tor.service; enabled; preset: disabled)
     Active: failed (Result: exit-code) since Sat 2025-03-08 16:11:09 CST; 2h 53min ago
    Process: 768791 ExecStartPre=/usr/bin/tor --runasdaemon 0 --defaults-torrc /usr/share/tor/defaults-torrc -f /etc/tor/torrc --verify-config (code=exited, status=127)
        CPU: 3ms

Mar 08 16:11:09 localhost.localdomain systemd[1]: tor.service: Scheduled restart job, restart counter is at 5.
Mar 08 16:11:09 localhost.localdomain systemd[1]: Stopped tor.service.
Mar 08 16:11:09 localhost.localdomain systemd[1]: tor.service: Start request repeated too quickly.
Mar 08 16:11:09 localhost.localdomain systemd[1]: tor.service: Failed with result 'exit-code'.
Mar 08 16:11:09 localhost.localdomain systemd[1]: Failed to start tor.service.


Code: Select all
# /usr/bin/tor --runasdaemon 0 --defaults-torrc /usr/share/tor/defaults-torrc -f /etc/tor/torrc --verify-config
/usr/bin/tor: symbol lookup error: /usr/bin/tor: undefined symbol: evutil_secure_rng_add_bytes

Re: tor service will not start

PostPosted: Mar 9th, '25, 03:09
by daniewicz
Code: Select all
# journalctl -xeu tor.service
░░ The unit tor.service has entered the 'failed' state with result 'exit-code'.
Mar 08 16:11:08 localhost.localdomain systemd[1]: Failed to start tor.service.
░░ Subject: A start job for unit tor.service has failed
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░
░░ A start job for unit tor.service has finished with a failure.
░░
░░ The job identifier is 9500 and the job result is failed.
Mar 08 16:11:09 localhost.localdomain systemd[1]: tor.service: Scheduled restart job, restart counter is at 5.
░░ Subject: Automatic restarting of a unit has been scheduled
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░
░░ Automatic restarting of the unit tor.service has been scheduled, as the result for
░░ the configured Restart= setting for the unit.
Mar 08 16:11:09 localhost.localdomain systemd[1]: Stopped tor.service.
░░ Subject: A stop job for unit tor.service has finished
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░
░░ A stop job for unit tor.service has finished.
░░
░░ The job identifier is 9624 and the job result is done.
Mar 08 16:11:09 localhost.localdomain systemd[1]: tor.service: Start request repeated too quickly.
Mar 08 16:11:09 localhost.localdomain systemd[1]: tor.service: Failed with result 'exit-code'.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░
░░ The unit tor.service has entered the 'failed' state with result 'exit-code'.
Mar 08 16:11:09 localhost.localdomain systemd[1]: Failed to start tor.service.
░░ Subject: A start job for unit tor.service has failed
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░
░░ A start job for unit tor.service has finished with a failure.
░░
░░ The job identifier is 9624 and the job result is failed.
...skipping...
░░ The unit tor.service has entered the 'failed' state with result 'exit-code'.
Mar 08 16:11:08 localhost.localdomain systemd[1]: Failed to start tor.service.
░░ Subject: A start job for unit tor.service has failed
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░
░░ A start job for unit tor.service has finished with a failure.
░░
░░ The job identifier is 9500 and the job result is failed.
Mar 08 16:11:09 localhost.localdomain systemd[1]: tor.service: Scheduled restart job, restart counter is at 5.
░░ Subject: Automatic restarting of a unit has been scheduled
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░
░░ Automatic restarting of the unit tor.service has been scheduled, as the result for
░░ the configured Restart= setting for the unit.
Mar 08 16:11:09 localhost.localdomain systemd[1]: Stopped tor.service.
░░ Subject: A stop job for unit tor.service has finished
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░
░░ A stop job for unit tor.service has finished.
░░
░░ The job identifier is 9624 and the job result is done.
Mar 08 16:11:09 localhost.localdomain systemd[1]: tor.service: Start request repeated too quickly.
Mar 08 16:11:09 localhost.localdomain systemd[1]: tor.service: Failed with result 'exit-code'.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░
░░ The unit tor.service has entered the 'failed' state with result 'exit-code'.
Mar 08 16:11:09 localhost.localdomain systemd[1]: Failed to start tor.service.
░░ Subject: A start job for unit tor.service has failed
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░
░░ A start job for unit tor.service has finished with a failure.
░░
░░ The job identifier is 9624 and the job result is failed.

Re: tor service will not start

PostPosted: Mar 9th, '25, 19:12
by doktor5000
daniewicz wrote:# /usr/bin/tor --runasdaemon 0 --defaults-torrc /usr/share/tor/defaults-torrc -f /etc/tor/torrc --verify-config
/usr/bin/tor: symbol lookup error: /usr/bin/tor: undefined symbol: evutil_secure_rng_add_bytes

That is a symbol which is nowadays provided by libevent - although handling should have been fixed long ago, see https://gitlab.torproject.org/legacy/tr ... sues/19904

Do you have lib64event7 installed ?

Re: tor service will not start

PostPosted: Mar 9th, '25, 20:44
by daniewicz
Yes I do

Re: tor service will not start

PostPosted: Mar 9th, '25, 23:18
by daniewicz
Looks like lib64event7 was recently updated

Code: Select all
rpm -q lib64event7 --last
lib64event7-2.1.12-4.1.mga9.x86_64            Fri 07 Mar 2025 09:46:35 PM CST

Re: tor service will not start

PostPosted: Mar 10th, '25, 06:54
by morgano
So what happens if you downgrade lib64event7 to previous version?

Re: tor service will not start

PostPosted: Mar 10th, '25, 18:25
by doktor5000
Then you should report it as a regression bug. The technical details are explained e.g. here: https://bugs.gentoo.org/894536

Re: tor service will not start

PostPosted: Mar 11th, '25, 04:43
by daniewicz
So what happens if you downgrade lib64event7 to previous version?


Don't know how to do this.

Re: tor service will not start

PostPosted: Mar 11th, '25, 10:28
by morgano
Well dont be ashamed - even urpmi itself did not, i just realised :roll: the help say:
Code: Select all
 --downgrade    - downgrade a package from the version currently installed
                   to the previously highest version

But in reality you have to specify the version to downgrade to, or exclude media with same version, or like in this example specify the media were it picks the highest available one:
Code: Select all
# urpmi --downgrade lib64event7 --media "Core Release"

(If we had more than one version in updates, it would have been better to specify that one.)

Re: tor service will not start

PostPosted: Mar 11th, '25, 19:37
by doktor5000
FWIW if you have dnf repos configured, dnf downgrade packagename works exactly as you'd expect it and as the urpmi documentation states it should work.
Sadly urpmi behaviour does not reflect that, e.g. it also fails if there's only one version of a given package available.

Re: tor service will not start

PostPosted: Mar 11th, '25, 20:40
by daniewicz
Downgrading lib64event7 has fixed tor.

Bug report submitted:
Bug 34082 - Recent update of lib64event7 breaks tor service

Re: tor service will not start

PostPosted: Mar 12th, '25, 11:26
by morgano
doktor5000 wrote:FWIW if you have dnf repos configured, dnf downgrade packagename works exactly as you'd expect it and as the urpmi documentation states it should work.
Sadly urpmi behaviour does not reflect that, e.g. it also fails if there's only one version of a given package available.


-> https://bugs.mageia.org/show_bug.cgi?id=34085

Re: tor service will not start

PostPosted: Mar 12th, '25, 19:02
by katnatek
You can explicit downgrade to "good" version or disable updates media

Code: Select all
urpmi --downgrade lib64event7-2.1.12-4.mga9

or
Code: Select all
urpmi --downgrade lib64event7 --media "Core Release"


But instead please test with tor package in updates testing https://bugs.mageia.org/show_bug.cgi?id=34082#c12

Removed quote and added code tags. ~Germ

Re: tor service will not start

PostPosted: Mar 14th, '25, 02:45
by katnatek
Updated version of tor will arrive soon and is built against the updated libevent so if you downgrade libevent when the updated tor reach
your update applet please make sure you are updating also libevent

Re: tor service will not start

PostPosted: Mar 14th, '25, 04:54
by daniewicz
Thank you katnatek for your effort. Updated tor and libevent working well!

Re: tor service will not start

PostPosted: Mar 14th, '25, 15:50
by Germ
Would you please mark your topic as [SOLVED]?