Trouble getting osagent data into Lpar2rrd server running in openshift


We have been successfully running an lpar2rrd server in Openshift for a few years; however we have only been collecting HMC data. We would like to add aix osagent data too. We have installed the osagent and created a route in Openshift to direct the connection to port 8162 of the openshift POD. When we try to run the agent we get a Connection refused error. After troubleshooting with our openshift team it turns out that the way we have our Openshift setup it only allows incoming requests to ports 443 or 80 through to the load balancer and then it gets redirected to the appropriate port/POD. For example a connection attempt from an aix client to will not work. It would need to be (Which has a route pointed to port 8162).

Has anyone else ran into this?



  • you can specify port instead of the default one like

    * * * * * /usr/bin/perl /opt/lpar2rrd-agent/ > /var/tmp/lpar2rrd-agent.out 2>&1

  • I did try that but the only allows for using ports that are greater than 1000 (line 4709 and 5149).

    This is the error - error setting port 443 /opt/lpar2rrd-agent/

  • ok, I see it, there is a check in the agent code, but it makes no sense

       if ( ( !isdigit($port) ) || ( $port < 1000 ) ) {

         error( "error setting port $port " . __FILE__ . ":" . __LINE__ );



    /opt/lpar2rrd-agent/ line 4740

    remove these 4 lines and try it again.

  • I changed the less than to be greater than and then received this error when using port 443. The server did not log anything. -

    Thu Sep 7 11:09:07 2023: wrong server response: agent_time:1694008742 39 XX 9XXX-MXX*123456: recv_time: :

    Thu Sep 7 11:09:07 2023: Error: Not all data has been sent out, refused line: 9XX-MXX*123456:XX:39:1694008742:

  • weird, try this:

    rm /var/tmp/lpar2rrd*

    /usr/bin/perl /opt/lpar2rrd-agent/ -d

    # do not miss to use -d option in above cmd

  • same result.

  • According to openshift support in order for this to work we should not be passing in a port number.

    If I curl to the 443 port I get the follow error and nothing is logged on the lpar2rrd server

    curl: (52) Empty reply from server

    If I curl to just the hostname I get this message from curl:

    The server returned an invalid or incomplete response.

    And this error logged to the pod running the lpar2rrd server:

    Thu Sep 7 18:48:39 2023: Received bad conn from: (X.X.XX.X.X) : port:38806 : GET /home/lpar2rrd/lpar2rrd/bin/ :

  • telnet <name> 443

    then type something and enter, what do you get in server's log and on the agent side?

  • nothing in the server log.

    Here is the info from the agent side:

    host:/home/> telnet server 443


    Connected to server

    Escape character is '^]'.


    Connection closed.

  • it is weird, usually lpar2rrd daemon answer like this with "Protocol error"

    It does not seem to reach the lpar2rrd daemon.

    $ telnet localhost 8162

    Trying ::1...

    telnet: connect to address ::1: Connection refused


    Connected to localhost.

    Escape character is '^]'.


    Protocol error: kjh

    Connection closed by foreign host.

Sign In or Register to comment.