-->

Tomcat application not responding with no logs

2019-08-28 22:19发布

问题:

I have configured apache to froward request to tomcat. following are my configuration.

<VirtualHost *:80>

ServerName ***
ServerAlias ***
ServerAlias ***


RewriteEngine on
RewriteCond %{HTTP_HOST} =***
RewriteRule (.*) https://***/ [R]
RewriteCond %{HTTP_HOST} =***
RewriteRule (.*) https://***/ [R]
RewriteCond %{HTTP_HOST} =***
RewriteRule (.*) https://***/ [R]


</VirtualHost>

<VirtualHost *:443>

ServerName ***
ServerAlias ***
ServerAlias ***

ProxyPass / ajp://localhost:8009/
ProxyPassReverse / ajp://localhost:8009/


SSLEngine on
SSLCertificateFile /etc/pki/tls/certs/***.com.crt
SSLCertificateKeyFile /etc/pki/tls/private/***.key
SSLCACertificateFile /etc/pki/tls/certs/***.crt

</VirtualHost>

I am getting following error in apache log

[Sun Feb 26 23:28:28 2012] [error] (111)Connection refused: proxy: AJP: attempt to connect to 127.0.0.1:8009 (localhost) failed   
[Sun Feb 26 23:28:28 2012] [error] ap_proxy_connect_backend disabling worker for (localhost)   
[Sun Feb 26 23:28:28 2012] [error] proxy: AJP: failed to make connection to backend: localhost   
[Sun Feb 26 23:28:29 2012] [error] proxy: AJP: disabled connection for (localhost) 
[Sun Feb 26 23:28:29 2012] [error] proxy: AJP: disabled connection for (localhost)

It works correct for some time then suddenly I am getting the following error

Service Temporarily Unavailable

The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.

When I tried netstat -antup | grep 8009 command I got the following

tcp        1      0 ::1:40293                   ::1:8009                    CLOSE_WAIT  32434/httpd         
tcp        1      0 ::1:40288                   ::1:8009                    CLOSE_WAIT  32430/httpd         
tcp        1      0 ::1:40289                   ::1:8009                    CLOSE_WAIT  32429/httpd         
tcp        1      0 ::1:40294                   ::1:8009                    CLOSE_WAIT  32622/httpd         
tcp        1      0 ::1:40292                   ::1:8009                    CLOSE_WAIT  32435/httpd         
tcp        1      0 ::1:40290                   ::1:8009                    CLOSE_WAIT  32436/httpd         
tcp        1      0 ::1:40287                   ::1:8009                    CLOSE_WAIT  32433/httpd  

I cant figure out where my issue is. Is it with the apache configuration or with the tomcat configuration or it is a coding issue... I believe it is an configuration issue... Please help me..

回答1:

I got two problem after fixing it tomcat is not crashing..

  1. Got bad sectors in Hardisk.. I found in messages log so java was crashing..
  2. I got old quartz schedulers running.. I deleted that then now the tomcat is not crashing..