2

Title says it all. This is a fresh Fedora 17 system running on a Xen hypervisor. No idea why it won't start

[root@box~]  uname -a
Linux box.localhost 3.5.4-2.fc17.i686.PAE #1 SMP Wed Sep 26 22:10:23 UTC 2012 i686 i686 i386 GNU/Linux

[root@box~]  cat /etc/redhat-release
Fedora release 17 (Beefy Miracle)

[root@box~]  systemctl enable httpd.service
ln -s '/usr/lib/systemd/system/httpd.service' '/etc/systemd/system/multi-user.target.wants/httpd.service'

[root@box~]  systemctl start httpd.service
Job failed. See system journal and 'systemctl status' for details.

[root@box~]  systemctl  status httpd.service
httpd.service - The Apache HTTP Server (prefork MPM)
          Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled)
          Active: failed (Result: exit-code) since Fri, 19 Oct 2012 22:43:37 -0500; 3s ago
         Process: 18225 ExecStart=/usr/sbin/httpd $OPTIONS -k start (code=exited, status=226/NAMESPACE)
          CGroup: name=systemd:/system/httpd.service

Oct 19 22:43:37 box.localhost systemd[18225]: Failed at step NAMESPACE spawning /usr/sbin/httpd: No such file or directory

[root@box~]  ls -al /usr/sbin/httpd
-rwxr-xr-x 1 root root 343496 Apr 30 04:56 /usr/sbin/httpd
2
  • What changes did you make to your /tmp directory? Oct 20, 2012 at 3:59
  • /var/tmp is a symlink to /tmp and /tmp is mounted as: tmpfs on /tmp type tmpfs (rw,nosuid,nodev,relatime)
    – atx
    Oct 20, 2012 at 4:03

1 Answer 1

2

Recent versions of Fedora/systemd include a new feature which generates random private directories in /tmp and /var/tmp for individual system services.

This means that there are things you should check:

  1. DO NOT symlink /var/tmp to /tmp or vice versa. These are treated separately and so you'll need to keep them separate.
  2. Ensure that both /var/tmp and /tmp have 1777 permissions.

If this doesn't resolve the problem, you may have found a bug, and should report it.

5
  • Wow that fixed it. Thanks! Weird how if I started it through /usr/sbin/httpd it would run fine, but not through systemd.
    – atx
    Oct 20, 2012 at 4:18
  • 1
    To add to that, also do not mount /var/tmp as tmpfs, as its contents are normally expected to be preserved between reboots.
    – chutz
    Oct 20, 2012 at 6:19
  • Also fixed a similar problem I had with rtkit on Debian Jessie. The answer might apply to all systems using systemd?
    – jopasserat
    Nov 23, 2014 at 22:15
  • @jopasserat Most likely. Fedora contributes everything upstream, so that other distributions get it eventually. Nov 23, 2014 at 22:21
  • Oh thank you so much! I fiddled around a bit with tmp symlinks and forgot about it later, a lot of services crashed without an error. I finally know why
    – Thomas
    Jun 20, 2018 at 10:40

You must log in to answer this question.

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