Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fedora/CentOS: Failed at step NAMESPACE spawning /usr/bin/tor: No such file or directory #185

Closed
nusenu opened this issue Sep 23, 2018 · 10 comments

Comments

@nusenu
Copy link
Owner

nusenu commented Sep 23, 2018

Errors:

CentOS 7, tor 0.2.9.16

systemd: Starting Anonymizing overlay network for TCP (instance: 10.0.2.15_9000)...
systemd: Failed at step NAMESPACE spawning /usr/bin/tor: No such file or directory
systemd: [email protected]_9000.service: control process exited, code=exited status=226
systemd: Failed to start Anonymizing overlay network for TCP (instance: 10.0.2.15_9000).
systemd: Unit [email protected]_9000.service entered failed state.
systemd: [email protected]_9000.service failed.

Fedora 28, tor 0.3.2.10

[email protected]_9000.service: Failed to set up mount namespacing: No such file or directory
[email protected]_9000.service: Failed at step NAMESPACE spawning /usr/bin/tor: No such file or directory
@nusenu
Copy link
Owner Author

nusenu commented Sep 27, 2018

@nusenu
Copy link
Owner Author

nusenu commented Mar 23, 2019

I've been in contact with the RPM maintainer and he will get to this eventually (at some point in 2019)

nusenu added a commit that referenced this issue Dec 15, 2019
The tor RPM packages are broken with regards to the multi-instance
systemd service file since some time now (#185).

We will support CentOS again once upstream issues are solved.
@ladar
Copy link

ladar commented Aug 27, 2020

I wrote a shell script for setting up a TOR relay on CentOS/RHEL 8. At the moment its only for Guard/Middle relays.

The script also contains my first attempt at tuning a system, in order to get the most out of TOR.

To use it, simply run the centos-8-tor.sh script file. The script will try to auto detect your public IP, and pick a random nickname, but both can be set manually using environment variables.

The attached tarball contains some additional non-TOR specific system setup scripts. These scripts setup generic services like configuring NTP, fail2ban, automatic updates, etc. To use it, simply decompress the tarball and run the centos-8-base.sh instead. It will automatically run the TOR script at the end.

centos-8-tor.sh.txt
centos-8-complete.tar.gz

@nusenu
Copy link
Owner Author

nusenu commented Aug 30, 2020

Hi ladar,
since you are posting it in this issue about the NAMESPACE error when using the multi-instance systemd service file: Did you solve that problem in your work?

@ladar
Copy link

ladar commented Sep 22, 2020

@nusenu the script I uploaded was built around CentOS 8, which has different issues. In retrospect I probably should have posted my comment on issue #209.

For CentOS 8, the Official TOR package actually fails to run (it's linked against a library that isn't available), but the EPEL package works just fine, and is the latest official release. If you look at my script, it sets up the official TOR repo, but disables the repo, so the script ends up installing the EPEL version.

If you're using CentOS 7, the reverse is true. The EPEL TOR package is out of date (0.3.5 as of this writing), but the version in the RPM in the official TOR repo is current, and works perfectly.

I can upload a CentOS 7 version of the script if people are interested. That script would use drastically different tuning/kernel params, since the CentOS 7 kernel doesn't support/use the same kernel parameters. The bbr scheduler springs to mind.

P.S. Note the script I uploaded has a few typos. But the most important is that when it dumps out the /etc/tor/torrc config file, it uses the variable HICKNAME instead of NICKNAME. Since HICKNAME isn't set, the field ends up empty, and the relay is listed as unnamed.

@duritong
Copy link

EPEL 7 is on the latest Tor LTS release: https://trac.torproject.org/projects/tor/wiki/org/teams/NetworkTeam/CoreTorReleases this is something different than "being out of date".

@ladar
Copy link

ladar commented Sep 22, 2020

@duritong my apologies. I thought a relay with v0.3.5.10 would get flagged for having an out-of-date version, but I was mistaken.

@nusenu
Copy link
Owner Author

nusenu commented Sep 22, 2020 via email

@nusenu
Copy link
Owner Author

nusenu commented Aug 22, 2021

I'm closing this since CentOS is discontinued.

@nusenu nusenu closed this as completed Aug 22, 2021
@duritong
Copy link

Well CentOS Stream 8 is a valid and straight forward replacement for CentOS Linux. Switching to it takes 2 commands and no Ansible adjustments. And then there are Rocky and Alma Linux, which continue to rebuild RHEL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants