Apache won't restart. mktemp failed

August 24, 2015 5.5k views
Apache

My google skills are failing me here. There's definitely space on my server, about 51% actually. I'm getting this error when I try to restart apache:

mktemp: failed to create file via template ‘/tmp/tmp.XXXXXXXXXX’: No space left on device
/etc/init.d/apache2: 91: /etc/init.d/apache2: cannot create : Directory nonexistent

  • The apache2 configtest failed.
5 Answers

You might want to check /proc/mounts to see if your filesystem is mounted as read-only ("ro") rather than read-write ("rw"). That can happen, for example, if there's filesystem corruption.

Also, if you've mounted a separate partition as /tmp, you'd want to specifically make sure that partition is not full.

  • That was the clue I needed! Ran mount -o remount,rw / and everything is back up. Thanks so much!

    EDIT: Actually that wasn't it. i'll keep looking, but it's a clue!

Great! You're very welcome.

i have problem with apache2 not runing when i start apace2 that error show

mktemp: failed to create file via template ‘/tmp/tmp.XXXXXXXXXX’: No such file or directory
/etc/init.d/apache2: 91: /etc/init.d/apache2: cannot create : Directory nonexistent

Please help me how can i fix this problem my all websites gose down ... please help

Hey
I am having the exact same issue, none of the services, apache2, mysql, ssh is running
Does anyone have any solution for this
Thanks

Have another answer? Share your knowledge.