Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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
share|improve this question
    
What changes did you make to your /tmp directory? –  Michael Hampton Oct 20 '12 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 '12 at 4:03

1 Answer 1

up vote 1 down vote accepted

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.

share|improve this answer
    
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 '12 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 '12 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 at 22:15
    
@jopasserat Most likely. Fedora contributes everything upstream, so that other distributions get it eventually. –  Michael Hampton Nov 23 at 22:21

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.