Verifying "localhost" is serving HTTPS on port 1012: FAILED

  • KM00402713
  • 11-Apr-2013
  • 04-May-2021

Summary

The article describes how to solve the "Verifying "localhost" is serving HTTPS on port 1012: FAILED" issue encountered at buildmgr startup.

Error

The following issue has been encountered at buildmgr startup:

 >>> Verify buildmgr dependencies...
Verify hostname "occ" is listening on Twist port 1032: SUCCESS
Verify hostname "spin" is listening on port 1004: SUCCESS
Verify communication with "spin": SUCCESS
Verify core gateway at 127.0.0.1 is listening on port 4040: SUCCESS
>>> Starting buildmgr ...
Starting Jetty: 
Console log can be found on /var/log/opsware/buildmgr/console.log
Jetty running pid=16387
Verifying "localhost" is serving HTTPS on port 1012: FAILED
opsware-sas: "buildmgr" failed to startsync
Failed to perform "startsync" operation on Opsware SAS components.
[Apr-11-2013 08:14:35] Component installation script encountered an error (exit status 1)
[Apr-11-2013 08:14:35] Exiting Opsware Installer.
 
For more details, please see the following file:
/var/log/opsware/install_opsware/patch_opsware.2013-04-11.08:07:28_verbose.log
 

Script done on Thu Apr 11 08:14:35 2013

Cause

This error message may be caused by the existence of an https_proxy environment variable set on that server.

To confirm this,

1. add "set -x" in the following script:

          # vi /opt/opsware/buildmgr/bin/jetty.sh

               #!/bin/sh
               set -x              

               #
               # Startup script for jetty under *nix systems (it works under NT/cygwin too).

               ...

2. Restart buildmgr

          # /etc/init.d/opsware-sas restart buildmgr

3. The following messages will appear:

          ++ /opt/opsware/oi_util/curl/bin/curl --silent --insecure --connect-timeout 5 --max-time 10 --write-out '%{http_code}' --output /dev/null https://localhost:1012
     + HTTP_CODE=000
     + '[' 000 -ne 200 ']'
     + STATUS=1
     + MESSAGE=FAILED
     + sleep 5

4. HTTP_CODE=000 means " Network Connection Error"

Fix

1. Verify if an https_proxy has been set on that server:

          # echo $https_proxy

2. Verify if the proxy has exceptions like:

          # echo $no_proxy
      127.0.0.1, localhost

If no exceptions exist:

3. Add the following exceptions:

          # set no_proxy="127.0.0.1, localhost"

          or

          # vi ~/.bash_profile

               - add this entry at the end of the file: export no_proxy="127.0.0.1, localhost"


               - relogin to that server

4. Restart buildmgr

          # /etc/init.d/opsware-sas restart buildmgr

5. The following messages should appear:

          ++ /opt/opsware/oi_util/curl/bin/curl --silent --insecure --connect-timeout 5 --max-time 10 --write-out '%{http_code}' --output /dev/null https://localhost:1012
     + HTTP_CODE=200
     + '[' 200 -ne 200 ']'
     + STATUS=0
     + MESSAGE=SUCCESS
     + break
     + echo SUCCESS
     + exit 0
     SUCCESS

6. HTTP_CODE=200 means " OK / no error"

7. Remove "set -x" from /opt/opsware/buildmgr/bin/jetty.sh

8. Restart buildmgr

          # /etc/init.d/opsware-sas restart buildmgr