Apache httpd restart failed [closed] - apache

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 10 months ago.
Improve this question
I'm restarting my apache server by this command "service httpd restart" and getting the following message:
Stopping httpd: [FAILED]
Starting httpd: [ OK ]
Before the problem happened, what I've done is simply to replace an old database file with new one. This database file will be used by another php file. When I did the replacement, I didn't stop httpd.
After failing to restart apache server, I surfed the web to find solution and tried the following methods.
1) Try this "netstat -lnp | grep httpd" and "lsof -i:80" to find if there's any process binding port 80. The result is none process.
2) Remove locked subsys by this "rm -f /var/lock/subsys/httpd" and restart httpd again, but the result is the same as the above message:
Stopping httpd: [FAILED]
Starting httpd: [ OK ]
3) It didn't seem to work even if I reboot the server
How to tackle this problem?
The error_log shows the following message:
[Thu Aug 09 15:10:34 2012] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Thu Aug 09 15:10:34 2012] [info] Init: Seeding PRNG with 256 bytes of entropy
[Thu Aug 09 15:10:34 2012] [info] Init: Generating temporary RSA private keys (512/1024 bits)
[Thu Aug 09 15:10:34 2012] [info] Init: Generating temporary DH parameters (512/1024 bits)
[Thu Aug 09 15:10:34 2012] [info] Init: Initializing (virtual) servers for SSL
[Thu Aug 09 15:10:34 2012] [info] Server: Apache/2.2.3, Interface: mod_ssl/2.2.3, Library: OpenSSL/0.9.8e-fips-rhel5
[Thu Aug 09 15:10:34 2012] [notice] Digest: generating secret for digest authentication ...
[Thu Aug 09 15:10:34 2012] [notice] Digest: done
[Thu Aug 09 15:10:34 2012] [debug] util_ldap.c(2052): LDAP merging Shared Cache conf: shm=0x8541df0 rmm=0x8541e20 for VHOST: localhost.localdomain
[Thu Aug 09 15:10:34 2012] [info] APR LDAP: Built with OpenLDAP LDAP SDK
[Thu Aug 09 15:10:34 2012] [info] LDAP: SSL support available
[Thu Aug 09 15:27:26 2012] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Thu Aug 09 15:27:26 2012] [info] Init: Seeding PRNG with 256 bytes of entropy
[Thu Aug 09 15:27:26 2012] [info] Init: Generating temporary RSA private keys (512/1024 bits)
[Thu Aug 09 15:27:26 2012] [info] Init: Generating temporary DH parameters (512/1024 bits)
[Thu Aug 09 15:27:26 2012] [info] Init: Initializing (virtual) servers for SSL
[Thu Aug 09 15:27:26 2012] [info] Server: Apache/2.2.3, Interface: mod_ssl/2.2.3, Library: OpenSSL/0.9.8e-fips-rhel5
[Thu Aug 09 15:27:26 2012] [notice] Digest: generating secret for digest authentication ...
[Thu Aug 09 15:27:26 2012] [notice] Digest: done
[Thu Aug 09 15:27:26 2012] [debug] util_ldap.c(2052): LDAP merging Shared Cache conf: shm=0x97f4df0 rmm=0x97f4e20 for VHOST: localhost.localdomain
[Thu Aug 09 15:27:26 2012] [info] APR LDAP: Built with OpenLDAP LDAP SDK
[Thu Aug 09 15:27:26 2012] [info] LDAP: SSL support available ssl_error_log:
[Thu Aug 09 15:10:34 2012] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Thu Aug 09 15:10:34 2012] [info] Init: Seeding PRNG with 256 bytes of entropy
[Thu Aug 09 15:10:34 2012] [info] Init: Generating temporary RSA private keys (512/1024 bits)
[Thu Aug 09 15:10:34 2012] [info] Init: Generating temporary DH parameters (512/1024 bits)
[Thu Aug 09 15:10:34 2012] [info] Init: Initializing (virtual) servers for SSL
[Thu Aug 09 15:10:34 2012] [info] Server: Apache/2.2.3, Interface: mod_ssl/2.2.3, Library: OpenSSL/0.9.8e-fips-rhel5
[Thu Aug 09 15:10:34 2012] [notice] Digest: generating secret for digest authentication ...
[Thu Aug 09 15:10:34 2012] [notice] Digest: done
[Thu Aug 09 15:10:34 2012] [debug] util_ldap.c(2052): LDAP merging Shared Cache conf: shm=0x8541df0 rmm=0x8541e20 for VHOST: localhost.localdomain
[Thu Aug 09 15:10:34 2012] [info] APR LDAP: Built with OpenLDAP LDAP SDK
[Thu Aug 09 15:10:34 2012] [info] LDAP: SSL support available
[Thu Aug 09 15:27:26 2012] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Thu Aug 09 15:27:26 2012] [info] Init: Seeding PRNG with 256 bytes of entropy
[Thu Aug 09 15:27:26 2012] [info] Init: Generating temporary RSA private keys (512/1024 bits)
[Thu Aug 09 15:27:26 2012] [info] Init: Generating temporary DH parameters (512/1024 bits)
[Thu Aug 09 15:27:26 2012] [info] Init: Initializing (virtual) servers for SSL
[Thu Aug 09 15:27:26 2012] [info] Server: Apache/2.2.3, Interface: mod_ssl/2.2.3, Library: OpenSSL/0.9.8e-fips-rhel5
[Thu Aug 09 15:27:26 2012] [notice] Digest: generating secret for digest authentication ...
[Thu Aug 09 15:27:26 2012] [notice] Digest: done
[Thu Aug 09 15:27:26 2012] [debug] util_ldap.c(2052): LDAP merging Shared Cache conf: shm=0x97f4df0 rmm=0x97f4e20 for VHOST: localhost.localdomain
[Thu Aug 09 15:27:26 2012] [info] APR LDAP: Built with OpenLDAP LDAP SDK
[Thu Aug 09 15:27:26 2012] [info] LDAP: SSL support available
Thanks for any help!

Can you enable LogLevel Debug in httpd.conf file and try starting the service. You should then be able to get more details in the error logs. By the way you seem to have SSL enabled so most probably it wouldn't be 80 but port 443. If it is an issue with SSL .. you can probably disable SSL and just enable http and check of apache starts.
Also is you apache configured to talk to any LDAP server for authentication.

Was facing the same problem but
sudo /etc/init.d/apache2 reload
works just fine for me

For me, this worked on RH Linux:
First enable Super User mode:
sudo su -
Now go to Apache (httpd) location in terminal: cd /usr/sbin
To start Apache server: httpd -k start
To stop Apache server: httpd -k stop
Check if httpd service is running: pgrep httpd
Hope it helps someone.

Related

I cant start apache after upgrading to yosemite

I updated to Yosemite and when I type localhost into the browser It says webpage not availible. I tried restarting apache but it still wouldn't work. Does anyone have advice?
Here are my error logs:
[Tue Oct 21 20:04:25 2014] [error] [client ::1] File does not exist: /Library/WebServer/Documents/favicon.ico
[Tue Oct 21 20:55:27 2014] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
httpd: Could not reliably determine the server's fully qualified domain name, using Cliffords-MacBook.local for ServerName
[Tue Oct 21 20:55:28 2014] [notice] Digest: generating secret for digest authentication ...
[Tue Oct 21 20:55:28 2014] [notice] Digest: done
[Tue Oct 21 20:55:28 2014] [emerg] (17)File exists: Couldn't create accept lock (/private/var/log/apache2/accept.lock.22) (5)
[Tue Oct 21 20:55:29 2014] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
httpd: Could not reliably determine the server's fully qualified domain name, using Cliffords-MacBook.local for ServerName
[Tue Oct 21 20:55:29 2014] [notice] Digest: generating secret for digest authentication ...
[Tue Oct 21 20:55:29 2014] [notice] Digest: done
[Tue Oct 21 20:55:29 2014] [warn] pid file /private/var/run/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Tue Oct 21 20:55:29 2014] [notice] Apache/2.2.26 (Unix) DAV/2 PHP/5.5.14 mod_ssl/2.2.26 OpenSSL/0.9.8y configured -- resuming normal operations
[Tue Oct 21 20:57:10 2014] [error] [client ::1] File does not exist: /Library/WebServer/Documents/favicon.ico
[Tue Oct 21 21:35:36 2014] [notice] caught SIGTERM, shutting down

Apache reverse SSL proxy fronting Weblogic

I've ran into a problem using mod_proxy/mod_ssl. The Apache HTTP server on SLES 11 SP3 64 bit, OpenSSL 1.0.1.f acts as SSL proxy to the Weblogic 10.3 running on Redhat. The mod_ssl is configured correctly - it works when proxying to to non-ssl serves. Also, the certificate on the proxy was issued with extensions allowing it to be used as both SSL client and server.
Due the regulations servers in this organisation are not allowed insecure communication, so the proxy must use SSL communicating to the application serves.
The problem occurs with SSL handshake between Apache and Weblogic. Perhaps they can't agree on ciphers? What do those 7 bytes received indicate?
[Thu Sep 18 09:32:14 2014] [debug] mod_proxy.c(1036): Running scheme https handler (attempt 0)
[Thu Sep 18 09:32:14 2014] [debug] mod_proxy_http.c(1995): proxy: HTTP: serving URL https://appdev2.example.com:8102/auth/logon.jsp?aa_param=user
[Thu Sep 18 09:32:14 2014] [debug] proxy_util.c(2022): proxy: HTTPS: has acquired connection for (appdev2.example.com)
[Thu Sep 18 09:32:14 2014] [debug] proxy_util.c(2078): proxy: connecting https://appdev2.example.com:8102/auth/logon.jsp?aa_param=user to appdev2.example.com:8102
[Thu Sep 18 09:32:14 2014] [debug] proxy_util.c(2236): proxy: connected /auth/logon.jsp?aa_param=user to appdev2.example.com:8102
[Thu Sep 18 09:32:14 2014] [debug] proxy_util.c(2487): proxy: HTTPS: fam 2 socket created to connect to appdev2.example.com
[Thu Sep 18 09:32:14 2014] [debug] proxy_util.c(2619): proxy: HTTPS: connection complete to 10.40.0.224:8102 (appdev2.example.com)
[Thu Sep 18 09:32:14 2014] [info] [client 10.40.0.224] Connection to child 0 established (server aaproxiedel1:443)
[Thu Sep 18 09:32:14 2014] [info] Seeding PRNG with 144 bytes of entropy
[Thu Sep 18 09:32:14 2014] [debug] ssl_engine_io.c(1090): [client 10.40.0.224] SNI extension for SSL Proxy request set to 'appdev2.example.com'
[Thu Sep 18 09:32:14 2014] [debug] ssl_engine_kernel.c(1903): OpenSSL: Handshake: start
[Thu Sep 18 09:32:14 2014] [debug] ssl_engine_kernel.c(1911): OpenSSL: Loop: before/connect initialization
[Thu Sep 18 09:32:14 2014] [debug] ssl_engine_kernel.c(1911): OpenSSL: Loop: SSLv2/v3 write client hello A
[Thu Sep 18 09:32:14 2014] [debug] ssl_engine_io.c(1939): OpenSSL: read 7/7 bytes from BIO#994fe0 [mem: 9ea880] (BIO dump follows)
[Thu Sep 18 09:32:14 2014] [debug] ssl_engine_io.c(1872): +-------------------------------------------------------------------------+
[Thu Sep 18 09:32:14 2014] [debug] ssl_engine_io.c(1911): | 0000: 15 03 00 00 02 02 28 ......( |
[Thu Sep 18 09:32:14 2014] [debug] ssl_engine_io.c(1917): +-------------------------------------------------------------------------+
[Thu Sep 18 09:32:14 2014] [debug] ssl_engine_kernel.c(1916): OpenSSL: Read: SSLv2/v3 read server hello A
[Thu Sep 18 09:32:14 2014] [debug] ssl_engine_kernel.c(1940): OpenSSL: Exit: error in SSLv2/v3 read server hello A
[Thu Sep 18 09:32:14 2014] [info] [client 10.40.0.224] SSL Proxy connect failed
[Thu Sep 18 09:32:14 2014] [info] SSL Library Error: 336032784 error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure
[Thu Sep 18 09:32:14 2014] [info] [client 10.40.0.224] Connection closed to child 0 with abortive shutdown (server aaproxiedel1:443)
[Thu Sep 18 09:32:14 2014] [error] (502)Unknown error 502: proxy: pass request body failed to 10.40.0.224:8102 (appdev2.example.com)
[Thu Sep 18 09:32:14 2014] [error] [client 141.1.3.134] proxy: Error during SSL Handshake with remote server returned by /auth/logon.jsp
[Thu Sep 18 09:32:14 2014] [error] proxy: pass request body failed to 10.40.0.224:8102 (appdev2.example.com) from 141.1.3.134 ()
[Thu Sep 18 09:32:14 2014] [debug] proxy_util.c(2040): proxy: HTTPS: has released connection for (appdev2.example.com)
[Thu Sep 18 09:32:14 2014] [debug] ssl_engine_kernel.c(1921): OpenSSL: Write: SSL negotiation finished successfully
[Thu Sep 18 09:32:14 2014] [info] [client 141.1.3.134] Connection closed to child 2 with standard shutdown (server aaproxiedel1:443)
Some of the things you can try is enabling "the WebLogic Plugin". This is in the Domain -> Configuration -> Web Applications and server -> General -> Advanced.. This enables all weblogic related plugins to work.
If this doesn't fix it, try to enable tunneling in protocols.
What do you see on the Weblogic logs? Both Access and the server log file?

Pingfederate with Apache Tomcat

I am trying to get a Tomcat application front-ended by Apache integrate with Pingfederate. Its agent based integration and I have used Apache Integration Kit 3.0. I am bale to get the agent work in the end I am getting this error:
[Tue Aug 05 03:01:59 2014] [info] Entering the Headers Fixup handler
[Tue Aug 05 03:01:59 2014] [info] Client's host is not whitelisted - Agent is enabled
[Tue Aug 05 03:01:59 2014] [info] AuthType is "PFApacheAgent" - Agent is enabled
[Tue Aug 05 03:01:59 2014] [info] Cleaning up headers with prefix "HPPF_AUTH_"...
[Tue Aug 05 03:01:59 2014] [info] Entering the Content handler
[Tue Aug 05 03:01:59 2014] [info] Client's host is not whitelisted - Agent is enabled
[Tue Aug 05 03:01:59 2014] [info] AuthType is "PFApacheAgent" - Agent is enabled
[Tue Aug 05 03:01:59 2014] [info] Checking whether the request implies to fill out and return the start page...
[Tue Aug 05 03:01:59 2014] [info] The request URL does not match the configured start page filter
[Tue Aug 05 03:01:59 2014] [info] The request does not imply to fill out and return the start page
[Tue Aug 05 03:01:59 2014] [info] Filtering by URI is disabled - anonymous filters are not configured
[Tue Aug 05 03:01:59 2014] [info] The URI of GET request does not match the filter
[Tue Aug 05 03:01:59 2014] [info] The requested resource is not protected - no need to validate session
[Tue Aug 05 03:01:59 2014] [info] Granting access to the requested resource
[Tue Aug 05 03:01:59 2014] [info] Returning DECLINED to let Apache take its default actions for the modified request
[Tue Aug 05 03:01:59 2014] [info] Exiting the Content handler
[Tue Aug 05 03:01:59 2014] [info] Returning HTTP code -1 (DECLINED)

Apache wont start with Passenger

After adding the ff lines on httpd.conf
LoadModule passenger_module /usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.13/ext/apache2/mod_passenger.so
PassengerRoot /usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.13
PassengerRuby /usr/local/bin/ruby
Apache won't start anymore
[root#localhost ~]# service httpd restart
Stopping httpd: [FAILED]
Starting httpd: [FAILED]
Got this from log
[Thu Jul 12 11:26:58 2012] [error] *** Passenger could not be initialized because of this error: Unable to start the Phusion Passenger watchdog (/usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.13/agents/PassengerWatchdog): Permission denied (13)
[Thu Jul 12 11:26:58 2012] [notice] Digest: generating secret for digest authentication ...
[Thu Jul 12 11:26:58 2012] [notice] Digest: done
[Thu Jul 12 11:27:13 2012] [notice] SELinux policy enabled; httpd running as context root:system_r:httpd_t:s0
[Thu Jul 12 11:27:13 2012] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Thu Jul 12 11:31:56 2012] [notice] SELinux policy enabled; httpd running as context root:system_r:httpd_t:s0
[Thu Jul 12 11:31:56 2012] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Thu Jul 12 11:38:22 2012] [notice] SELinux policy enabled; httpd running as context root:system_r:httpd_t:s0
[Thu Jul 12 11:38:22 2012] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
Check the file permission on /usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.13/agents/PassengerWatchdog and make sure that your apache user has permission to run it.
I'm not an expert in SELinux, but that's the cause of your problem. (Permissions and access to the watchdog process as the apache user).
Try looking here: Passenger/mod_rails fails to initialize in Fedora 12 when starting Apache

Dazed and confused about configuring Apache with SSL support

I've spent a few hours trying to configure my Apache server to use SSL with no public IP, just localhost. I've created the certificate OK, I think (it has been like a crash course on black magic for me), and when I try tro access https://localhost, the browser says "Connected to localhost..." on the status line but just keeps loading forever. Here's a snippet from error_log:
[Fri Mar 27 22:03:39 2009] [info] Loading certificate & private key of SSL-aware server
[Fri Mar 27 22:03:39 2009] [info] Configuring server for SSL protocol
[Fri Mar 27 22:03:39 2009] [info] Loading certificate & private key of SSL-aware server
[Fri Mar 27 22:03:40 2009] [info] Configuring server for SSL protocol
everything seems to be OK there, but, meanwhile, at ssl_engine_log...
[Fri Mar 27 22:03:39 2009] [info] Init: Initializing OpenSSL library
[Fri Mar 27 22:03:39 2009] [info] Init: Seeding PRNG with 136 bytes of entropy
[Fri Mar 27 22:03:39 2009] [info] Init: Generating temporary RSA private keys (512/1024 bits)
[Fri Mar 27 22:03:39 2009] [info] Init: Generating temporary DH parameters (512/1024 bits)
[Fri Mar 27 22:03:39 2009] [info] Init: Initializing (virtual) servers for SSL
[Fri Mar 27 22:03:39 2009] [info] mod_ssl/2.0.61 compiled against Server: Apache/2.0.61, Library: OpenSSL/0.9.7i
[Fri Mar 27 22:03:39 2009] [warn] module php5_module is already loaded, skipping
[Fri Mar 27 22:03:39 2009] [info] Init: Initializing OpenSSL library
[Fri Mar 27 22:03:39 2009] [info] Init: Seeding PRNG with 136 bytes of entropy[Fri Mar 27 22:03:39 2009] [info] Init: Generating temporary RSA private keys (512/1024 bits)
[Fri Mar 27 22:03:40 2009] [info] Init: Generating temporary DH parameters (512/1024 bits)
[Fri Mar 27 22:03:40 2009] [info] Init: Initializing (virtual) servers for SSL
[Fri Mar 27 22:03:40 2009] [info] mod_ssl/2.0.61 compiled against Server: Apache/2.0.61, Library: OpenSSL/0.9.7i
[Fri Mar 27 22:03:40 2009] [notice] Digest: generating secret for digest authentication ...
[Fri Mar 27 22:03:40 2009] [notice] Digest: done
[Fri Mar 27 22:03:40 2009] [notice] Apache/2.0.61 (Unix) mod_ssl/2.0.61 OpenSSL/0.9.7l DAV/2 PHP/5.2.5 configured -- resuming normal operations
[Fri Mar 27 22:03:40 2009] [info] Server built: Jan 17 2008 17:33:42
[Fri Mar 27 22:03:40 2009] [emerg] (13)Permission denied: apr_proc_mutex_lock failed. Attempting to shutdown process gracefully.
[Fri Mar 27 22:03:40 2009] [emerg] (13)Permission denied: apr_proc_mutex_lock failed. Attempting to shutdown process gracefully.
...many more like these last two lines, until I finally stop the server...
[Fri Mar 27 22:03:43 2009] [info] removed PID file /usr/local/apache2/logs/httpd.pid (pid=8786)
[Fri Mar 27 22:03:43 2009] [notice] caught SIGTERM, shutting down
some googling about this permission denied and the apr_proc_mutex_lock failing hasn't yielded anything useful. Only some results relating to MPM and perchild option, but as they were old (years 2002 and 2003) and I don't really can draw any conclusions after reading them, I'm asking you if there is a way to overcome this problem. Well, first: what is actually the problem? Is there any kind of incompatibility between modules? Do I have to recompile something (please, Lord, not again, no)?
Thanks in advance.
Just be thankful you aren't using apache 1.3--it was way harder to get SSL running on that!
mod_ssl needs write permission on a couple files for it to work. Take a look at this setting and make sure apache has write access to the directory that file is in. For example, if says (for example):
SSLMutex file:/var/run/apache/ssl.mutex
You need to verify apache can write to /var/run/apache.
Almost all of these kinds of errors are usually some kind of permission error on the filesystem.