Unable to access Java website on port 80: 503 Service Temporarily Unavailable

Created:

2016-11-16 12:50:25 UTC

Modified:

2017-04-24 11:19:29 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Unable to access Java website on port 80: 503 Service Temporarily Unavailable

Applicable to:

  • Plesk 12.0 for Linux

Symptoms

  • Java Application is showing the following error on port 80:

    503 Service Temporarily Unavailable
  • The following errors can be found in /var/log/httpd/mod_jk.log :

    [96401:140619925256160] [info] jk_open_socket::jk_connect.c (758): connect to ::1:9008 failed (errno=111)
    [96401:140619925256160] [info] ajp_connect_to_endpoint::jk_ajp_common.c (1019): Failed opening socket to (::1:9008) (errno=111)
    [96401:140619925256160] [error] ajp_send_request::jk_ajp_common.c
  • Java Application works fine on port 9080.

  • Server uses IPv6

Cause

This is Plesk bug #PPPM-1864 . The fix will be included in the next Plesk updates.

Resolution

Reconfigure mod_jk to redirect requests to IPv4 version:

  1. Change value worker.ajp13.host in /etc/httpd/conf/workers.properties to:

    worker.ajp13.host=127.0.0.1
  2. Reload httpd :

    service httpd reload

Note: This setting will be overwritten on the next Java application start/stop cycle performed via Plesk GUI. To apply a permanent workaround, you need to overwrite the value which gets written to workers.properties by Plesk:

  1. Backup the original file:

    # cp /usr/local/psa/admin/conf/templates/default/server/tomcat.php{,.bck}
  2. Edit the /usr/local/psa/admin/conf/templates/default/server/tomcat.php . Replace the following line:

    ...workerName}.host=localhost

    with this one:

    ...workerName}.host=127.0.0.1
Have more questions? Submit a request
Please sign in to leave a comment.