LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 09-27-2013, 10:54 AM   #1
lpwevers
Member
 
Registered: Apr 2005
Location: The Netherlands
Distribution: SuSE, CentOS
Posts: 104

Rep: Reputation: 20
Cannot start apache2 as a service (but I can using apachectl)


Hello there,

I got this weird issue with a complete fresh install of a server, which should end up as an Apache webserver. The system is running OpenSuSE 13.1 with Apache 2.4.6.

Whenever I try to start apache2 using the service command provided (service apache2 start) it starts up, then the service command waits for some time and kills off apache again:
Code:
# service apache2 start
Job for apache2.service failed. See 'systemctl status apache2.service' and 'journalctl -xn' for details
Code:
# systemctl status apache2.service -l
apache2.service - The Apache Webserver
   Loaded: loaded (/usr/lib/systemd/system/apache2.service; enabled)
   Active: failed (Result: timeout) since Fri 2013-09-27 17:29:50 CEST; 13min ago
 Main PID: 2160

Sep 27 17:28:20 mail systemd[1]: Starting The Apache Webserver...
Sep 27 17:28:20 mail start_apache2[2160]: [Fri Sep 27 17:28:20.239493 2013] [core:warn] [pid 2160] AH00117: Ignoring deprecated use of DefaultType in line 140 of /etc/apache2/httpd.conf.
Sep 27 17:29:50 mail systemd[1]: apache2.service operation timed out. Terminating.
Sep 27 17:29:50 mail systemd[1]: Failed to start The Apache Webserver.
Sep 27 17:29:50 mail systemd[1]: Unit apache2.service entered failed state.
I've set logging to debug. In the apache2 error log I get this:
Code:
[Fri Sep 27 17:28:20.448152 2013] [ssl:debug] [pid 2160] ssl_engine_pphrase.c(181): AH02199: SSL not enabled on vhost ****:80, skipping SSL setup
[Fri Sep 27 17:28:20.550164 2013] [ssl:warn] [pid 2160] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache]
[Fri Sep 27 17:28:20.550327 2013] [ssl:info] [pid 2160] AH01887: Init: Initializing (virtual) servers for SSL
[Fri Sep 27 17:28:20.550460 2013] [ssl:info] [pid 2160] AH01876: mod_ssl/2.4.6 compiled against Server: Apache/2.4.6, Library: OpenSSL/1.0.1e
[Fri Sep 27 17:28:20.570223 2013] [mpm_prefork:notice] [pid 2160] AH00163: Apache/2.4.6 (Linux/SUSE) OpenSSL/1.0.1e PHP/5.4.19 configured -- resuming normal operations
[Fri Sep 27 17:28:20.570623 2013] [mpm_prefork:info] [pid 2160] AH00164: Server built: 2013-09-03 15:40:57.000000000 +0000
[Fri Sep 27 17:28:20.570809 2013] [core:notice] [pid 2160] AH00094: Command line: '/usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf -D SYSTEMD -D FOREGROUND'
[Fri Sep 27 17:28:20.571564 2013] [mpm_prefork:debug] [pid 2160] prefork.c(995): AH00165: Accept mutex: pthread (default: pthread)
[Fri Sep 27 17:29:50.206994 2013] [core:info] [pid 2160] AH00096: removed PID file /run/httpd.pid (pid=2160)
[Fri Sep 27 17:29:50.207075 2013] [mpm_prefork:notice] [pid 2160] AH00169: caught SIGTERM, shutting down
In the one and a half minute before I get SIGTERM, I can use the server just fine, so I'm assuming the control job of the service command is not getting notified that the service is running.

When I just start the service using the command
Code:
apache2ctl start
it just starts and keeps running.

For the time this is workable, but I'd like to have the apache2 service start at boot as a service, so any ideas on how to fix this issue are greatly appreciated.

Kind regards,
Louis
 
Old 09-27-2013, 12:42 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,285
Blog Entries: 54

Rep: Reputation: 2854Reputation: 2854Reputation: 2854Reputation: 2854Reputation: 2854Reputation: 2854Reputation: 2854Reputation: 2854Reputation: 2854Reputation: 2854Reputation: 2854
I have no idea what's keeping it from running but until you find out you could use the legacy /etc/rc.d/?
 
1 members found this post helpful.
Old 09-27-2013, 01:39 PM   #3
lpwevers
Member
 
Registered: Apr 2005
Location: The Netherlands
Distribution: SuSE, CentOS
Posts: 104

Original Poster
Rep: Reputation: 20
Thanks for the tip. I tried that, but unfortunately the init.d script redirects the call to systemctl. But I'll try to put the apache2ctl script in init.d and see if that still works.
 
Old 09-28-2013, 10:47 AM   #4
lpwevers
Member
 
Registered: Apr 2005
Location: The Netherlands
Distribution: SuSE, CentOS
Posts: 104

Original Poster
Rep: Reputation: 20
Quote:
Originally Posted by unSpawn View Post
I have no idea what's keeping it from running but until you find out you could use the legacy /etc/rc.d/?
Thanks. That works for me.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] BASH: service apache2 start => check apache2 response dragonetti Linux - Newbie 2 10-29-2011 11:01 AM
/usr/local/apache2/bin/apachectl: line 65: 4407 Segmentation fault $HTTPD -k $A onlin85 Linux - Software 2 06-18-2009 06:54 AM
apachectl startssl will not start DragonM15 Slackware 6 12-11-2007 11:25 AM
apachectl start not working cparker15 Linux - Networking 2 01-20-2005 08:15 PM
Apache2: apachectl command not found hektor Linux - Software 3 01-14-2005 12:23 PM


All times are GMT -5. The time now is 11:09 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration