English
Ask Your Question
0

httpd.service fails to start. Not a FQDN issue.

asked 2013-07-08 19:41:38 +0000

Mark Hodges gravatar image

updated 2013-08-26 17:26:44 +0000

ryanlerch gravatar image

I'm setting up httpd service in fedora 18. (SELinux has been turned off.)

systemctl start httpd.service gives:

Job for httpd.service failed. See 'systemctl status httpd.service' and 'journalctl -xn' for details.

systemctl status httpd.service gives:

httpd.service - The Apache HTTP Server Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled) Active: failed (Result: exit-code) since Mon 2013-07-08 12:05:39 PDT; 7min ago Process: 2890 ExecStop=/usr/sbin/httpd $OPTIONS -k graceful-stop (code=exited, status=0/SUCCESS) Process: 2888 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)

Jul 08 12:05:38 webserver.localdomain systemd[1]: Starting The Apache HTTP Server... Jul 08 12:05:39 webserver.localdomain systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE Jul 08 12:05:39 webserver.localdomain httpd[2890]: httpd (no pid file) not running Jul 08 12:05:39 webserver.localdomain systemd[1]: Failed to start The Apache HTTP Server. Jul 08 12:05:39 webserver.localdomain systemd[1]: Unit httpd.service entered failed state.

journalctl -xn gives:

-- Logs begin at Mon 2013-07-08 11:33:19 PDT, end at Mon 2013-07-08 12:05:39 PDT. -- Jul 08 12:04:09 webserver.localdomain dbus-daemon[490]: dbus[490]: [system] Successfully activated service 'org.freedesktop.ConsoleKit' Jul 08 12:04:09 webserver.localdomain dbus[490]: [system] Successfully activated service 'org.freedesktop.ConsoleKit' Jul 08 12:04:09 webserver.localdomain systemd[1]: Started Console Manager. -- Subject: Unit console-kit-daemon.service has finished start-up -- Defined-By: systemd

-- Support:

-- Unit console-kit-daemon.service has finished starting up.

-- The start-up result is done. Jul 08 12:04:09 webserver.localdomain dbus-daemon[490]: dbus[490]: [system] Successfully activated service 'org.freedesktop.PackageKit' Jul 08 12:04:09 webserver.localdomain dbus[490]: [system] Successfully activated service 'org.freedesktop.PackageKit' Jul 08 12:05:38 webserver.localdomain systemd[1]: Starting The Apache HTTP Server... -- Subject: Unit httpd.service has begun with start-up -- Defined-By: systemd

-- Support:

-- Unit httpd.service has begun starting up. Jul 08 12:05:39 webserver.localdomain systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE Jul 08 12:05:39 webserver.localdomain httpd[2890]: httpd (no pid file) not running Jul 08 12:05:39 webserver.localdomain systemd[1]: Failed to start The Apache HTTP Server. -- Subject: Unit httpd.service has failed -- Defined-By: systemd -- Support: -- Documentation: > --

-- Unit httpd.service has failed.

-- The result is failed. Jul 08 12:05:39 webserver.localdomain systemd[1]: Unit httpd.service entered failed state.

ServerName has been set in /etc/httpd/conf/httpd.conf and the hosts file is set up properly. This does not appear to be related to the common ServerName/hosts file problem others have been running into. The provided error logs appear to indicate a failure, but no cause. Does anybody have any ideas? I would be very grateful.

edit retag flag offensive close merge delete

Comments

Why did you turn off SELinux? If you did it trying to solve this, it's clearly not an issue and should be turned back on. (You can put it in permissive mode, if you prefer, where you get warnings, not denials.) And, if this is the same as you were getting before you turned it off, there's nothing there to suggest that it's the culprit. You might also consider checking /var/log/messages (needs root access) for anything referring to httpd and see if that gives you any better info.

sideburns ( 2013-07-08 20:12:13 +0000 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2013-07-08 21:16:26 +0000

Mark Hodges gravatar image

updated 2013-07-08 21:22:49 +0000

Agreed. I was getting a bit desparate. I have since turned it back on. Thank you.

PROBLEM SOLVED. I was confusing "fully qualified domain name" with "url".

The initial ServerName error went away when I added my url to /etc/hosts and set ServerName to my url in /etc/httpd/conf/httpd.conf. This lead me to believe I had set those up correctly. Despite the name error message going away. That was not the correct set up.

I had changed my computer's name from localhost to webserver. That meant I was supposed to change localhost.localdomain to webserver.localdomain in my hosts file and leave ServerName set to my url in httpd.conf.

I discovered this by checking /etc/httpd/logs/error_log.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Use your votes!

  • Use the 30 daily voting points that you get!
  • Up-vote well framed questions that provide enough information to enable people provide answers.
  • Thank your helpers by up-voting their comments and answers. If a question you asked has been answered, accept the best answer by clicking on the checkbox on the left side of the answer.
  • Down-voting might cost you karma, but you should consider doing so for incorrect or clearly detrimental questions and answers.

Stats

Asked: 2013-07-08 19:41:38 +0000

Seen: 4,527 times

Last updated: Aug 26 '13