Welcome!
Important information
-- Spectre and Meltdown vulnerabilities
-- Change in MX sources

News
-- MX Linux on social media: here
-- Mepis support still here

Current releases
-- MX-17.1 Final release info here
-- antiX-17 release info here

New users
-- Please read this first, and don't forget to add system and hardware information to posts!
-- Here are the Forum Rules

systemd: tor@default.service: Failed at step APPARMOR spawning /usr/bin/tor: No such file or directory

Help for Current Versions of MX
Post Reply
Message
Author
User avatar
postcd
Forum Novice
Forum  Novice
Posts: 51
Joined: Mon Oct 29, 2018 2:02 pm

systemd: tor@default.service: Failed at step APPARMOR spawning /usr/bin/tor: No such file or directory

#1 Post by postcd » Thu Nov 08, 2018 1:02 pm

Hello,

because tor shown an exited status, i tried to remove and then again install the "tor" package from official repositories of the MX Linux (apt install tor) and i think that the tor service do not want to start. And this is what i see when i show status:

Nov 08 17:49:56 lynx audit[4269]: AVC apparmor="DENIED" operation="change_onexec" info="label not found" error=-2 profile="unconfined" name="system_tor" pid=4269 comm="(tor)"
Nov 08 17:49:56 lynx systemd[4269]: tor@default.service: Failed at step APPARMOR spawning /usr/bin/tor: No such file or directory
Nov 08 17:49:56 lynx kernel: audit: type=1400 audit(1541695796.484:49): apparmor="DENIED" operation="change_onexec" info="label not found" error=-2 profile="unconfined" name="system_tor" pid=4269 comm="(tor)"

I have not seen this problem when i booted MX Linux default way (not using systemd), but i am using systemd because non-systemd has problem with my PC suspension as is described here.

DETAILS:

$ service tor@default status
tor@default.service - Anonymizing overlay network for TCP
Loaded: loaded (/lib/systemd/system/tor@default.service; static; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2018-11-08 17:49:58 CET; 7min ago
Process: 4302 ExecStart=/usr/bin/tor --defaults-torrc /usr/share/tor/tor-service-defaults-torrc -f /etc/tor/torrc --RunAsDaemon 0 (code=exited, status=231/APPARMOR)
Process: 4299 ExecStartPre=/usr/bin/tor --defaults-torrc /usr/share/tor/tor-service-defaults-torrc -f /etc/tor/torrc --RunAsDaemon 0 --verify-config (code=exited, status=0/SUCCESS)
Process: 4297 ExecStartPre=/usr/bin/install -Z -m 02755 -o debian-tor -g debian-tor -d /var/run/tor (code=exited, status=0/SUCCESS)
Main PID: 4302 (code=exited, status=231/APPARMOR)
sudo journalctl -b --no-pager | grep -i tor | tail -n50
Nov 08 17:49:56 lynx tor[4266]: Nov 08 17:49:56.391 [notice] Tor can't help you if you use it wrong! Learn how to be safe at https://www.torproject.org/download/download#warning
Nov 08 17:49:56 lynx tor[4266]: Nov 08 17:49:56.391 [notice] Read configuration file "/usr/share/tor/tor-service-defaults-torrc".
Nov 08 17:49:56 lynx tor[4266]: Nov 08 17:49:56.391 [notice] Read configuration file "/etc/tor/torrc".
Nov 08 17:49:56 lynx tor[4266]: Configuration was valid
Nov 08 17:49:56 lynx audit[4269]: AVC apparmor="DENIED" operation="change_onexec" info="label not found" error=-2 profile="unconfined" name="system_tor" pid=4269 comm="(tor)"
Nov 08 17:49:56 lynx systemd[4269]: tor@default.service: Failed at step APPARMOR spawning /usr/bin/tor: No such file or directory
Nov 08 17:49:56 lynx kernel: audit: type=1400 audit(1541695796.484:49): apparmor="DENIED" operation="change_onexec" info="label not found" error=-2 profile="unconfined" name="system_tor" pid=4269 comm="(tor)"
Nov 08 17:49:56 lynx systemd[1]: tor@default.service: Main process exited, code=exited, status=231/APPARMOR
Nov 08 17:49:56 lynx systemd[1]: tor@default.service: Unit entered failed state.
Nov 08 17:49:56 lynx systemd[1]: tor@default.service: Failed with result 'exit-code'.
Nov 08 17:49:56 lynx systemd[1]: tor@default.service: Service hold-off time over, scheduling restart.
Nov 08 17:49:56 lynx tor[4277]: Nov 08 17:49:56.887 [notice] Tor 0.2.9.16 (git-9ef571339967c1e5) running on Linux with Libevent 2.0.21-stable, OpenSSL 1.1.0f and Zlib 1.2.8.
Nov 08 17:49:56 lynx tor[4277]: Nov 08 17:49:56.887 [notice] Tor can't help you if you use it wrong! Learn how to be safe at https://www.torproject.org/download/download#warning
Nov 08 17:49:56 lynx tor[4277]: Nov 08 17:49:56.887 [notice] Read configuration file "/usr/share/tor/tor-service-defaults-torrc".
Nov 08 17:49:56 lynx tor[4277]: Nov 08 17:49:56.887 [notice] Read configuration file "/etc/tor/torrc".
Nov 08 17:49:56 lynx tor[4277]: Configuration was valid
Nov 08 17:49:56 lynx audit[4280]: AVC apparmor="DENIED" operation="change_onexec" info="label not found" error=-2 profile="unconfined" name="system_tor" pid=4280 comm="(tor)"
Nov 08 17:49:56 lynx systemd[4280]: tor@default.service: Failed at step APPARMOR spawning /usr/bin/tor: No such file or directory
Nov 08 17:49:56 lynx kernel: audit: type=1400 audit(1541695796.981:50): apparmor="DENIED" operation="change_onexec" info="label not found" error=-2 profile="unconfined" name="system_tor" pid=4280 comm="(tor)"
Nov 08 17:49:56 lynx systemd[1]: tor@default.service: Main process exited, code=exited, status=231/APPARMOR
Nov 08 17:49:56 lynx systemd[1]: tor@default.service: Unit entered failed state.
Nov 08 17:49:56 lynx systemd[1]: tor@default.service: Failed with result 'exit-code'.
Nov 08 17:49:57 lynx systemd[1]: tor@default.service: Service hold-off time over, scheduling restart.
Nov 08 17:49:57 lynx tor[4288]: Nov 08 17:49:57.374 [notice] Tor 0.2.9.16 (git-9ef571339967c1e5) running on Linux with Libevent 2.0.21-stable, OpenSSL 1.1.0f and Zlib 1.2.8.
Nov 08 17:49:57 lynx tor[4288]: Nov 08 17:49:57.374 [notice] Tor can't help you if you use it wrong! Learn how to be safe at https://www.torproject.org/download/download#warning
Nov 08 17:49:57 lynx tor[4288]: Nov 08 17:49:57.374 [notice] Read configuration file "/usr/share/tor/tor-service-defaults-torrc".
Nov 08 17:49:57 lynx tor[4288]: Nov 08 17:49:57.374 [notice] Read configuration file "/etc/tor/torrc".
Nov 08 17:49:57 lynx tor[4288]: Configuration was valid
Nov 08 17:49:57 lynx audit[4291]: AVC apparmor="DENIED" operation="change_onexec" info="label not found" error=-2 profile="unconfined" name="system_tor" pid=4291 comm="(tor)"
Nov 08 17:49:57 lynx systemd[4291]: tor@default.service: Failed at step APPARMOR spawning /usr/bin/tor: No such file or directory
Nov 08 17:49:57 lynx kernel: audit: type=1400 audit(1541695797.469:51): apparmor="DENIED" operation="change_onexec" info="label not found" error=-2 profile="unconfined" name="system_tor" pid=4291 comm="(tor)"
Nov 08 17:49:57 lynx systemd[1]: tor@default.service: Main process exited, code=exited, status=231/APPARMOR
Nov 08 17:49:57 lynx systemd[1]: tor@default.service: Unit entered failed state.
Nov 08 17:49:57 lynx systemd[1]: tor@default.service: Failed with result 'exit-code'.
Nov 08 17:49:57 lynx systemd[1]: tor@default.service: Service hold-off time over, scheduling restart.
Nov 08 17:49:57 lynx tor[4299]: Nov 08 17:49:57.895 [notice] Tor 0.2.9.16 (git-9ef571339967c1e5) running on Linux with Libevent 2.0.21-stable, OpenSSL 1.1.0f and Zlib 1.2.8.
Nov 08 17:49:57 lynx tor[4299]: Nov 08 17:49:57.895 [notice] Tor can't help you if you use it wrong! Learn how to be safe at https://www.torproject.org/download/download#warning
Nov 08 17:49:57 lynx tor[4299]: Nov 08 17:49:57.896 [notice] Read configuration file "/usr/share/tor/tor-service-defaults-torrc".
Nov 08 17:49:57 lynx tor[4299]: Nov 08 17:49:57.896 [notice] Read configuration file "/etc/tor/torrc".
Nov 08 17:49:57 lynx tor[4299]: Configuration was valid
Nov 08 17:49:57 lynx audit[4302]: AVC apparmor="DENIED" operation="change_onexec" info="label not found" error=-2 profile="unconfined" name="system_tor" pid=4302 comm="(tor)"
Nov 08 17:49:57 lynx systemd[4302]: tor@default.service: Failed at step APPARMOR spawning /usr/bin/tor: No such file or directory
Nov 08 17:49:57 lynx kernel: audit: type=1400 audit(1541695797.983:52): apparmor="DENIED" operation="change_onexec" info="label not found" error=-2 profile="unconfined" name="system_tor" pid=4302 comm="(tor)"
Nov 08 17:49:57 lynx systemd[1]: tor@default.service: Main process exited, code=exited, status=231/APPARMOR
Nov 08 17:49:57 lynx systemd[1]: tor@default.service: Unit entered failed state.
Nov 08 17:49:57 lynx systemd[1]: tor@default.service: Failed with result 'exit-code'.
Nov 08 17:49:58 lynx systemd[1]: tor@default.service: Service hold-off time over, scheduling restart.
Nov 08 17:49:58 lynx systemd[1]: tor@default.service: Start request repeated too quickly.
Nov 08 17:49:58 lynx systemd[1]: tor@default.service: Unit entered failed state.
Nov 08 17:49:58 lynx systemd[1]: tor@default.service: Failed with result 'exit-code'.
What can i try please?
OS: 4.15.4-1~mx17+1 (2018-02-23) x86_64 ; XFCE 4 ; MB: G31M ES2L rev. 2.0 ; GPU: AMD Radeon RX 560 ; full HW specs. as of Oct 30/2018

User avatar
v3g4n
Forum Guide
Forum Guide
Posts: 1791
Joined: Sat Jan 16, 2016 8:20 pm

Re: systemd: tor@default.service: Failed at step APPARMOR spawning /usr/bin/tor: No such file or directory

#2 Post by v3g4n » Thu Nov 08, 2018 1:21 pm

Do you have apparmor installed?

User avatar
postcd
Forum Novice
Forum  Novice
Posts: 51
Joined: Mon Oct 29, 2018 2:02 pm

Re: systemd: tor@default.service: Failed at step APPARMOR spawning /usr/bin/tor: No such file or directory

#3 Post by postcd » Thu Nov 08, 2018 2:05 pm

v3g4n wrote:
Thu Nov 08, 2018 1:21 pm
Do you have apparmor installed?
It do not seems to be installed:

$ sudo apt list --installed apparmor
Listing... Done

$ sudo apt list apparmor
Listing... Done
apparmor/stable 2.11.0-3+deb9u2 amd64

Maybe this is some old bug that was already fixed.
I see i can launch tor manually using command: /usr/sbin/tor &
But "service tor start" ends up with mentioned "exited" status & "dmesg" shows mentioned AppArmor issue.
OS: 4.15.4-1~mx17+1 (2018-02-23) x86_64 ; XFCE 4 ; MB: G31M ES2L rev. 2.0 ; GPU: AMD Radeon RX 560 ; full HW specs. as of Oct 30/2018

Post Reply

Return to “MX Help”