Port Conflict

If you are installing XorMon NG on on a machine where is already running LPAR2RRD then you hit into a port conflict where both tools want to listen on port 8162 which is used for OS agent communication.
XorMon NG fails to start OS agent service as port 8162 is already occupied by LPAR2RRD daemon listener.

Solutions

  1. Stop LPAR2RRD daemon service, start XorMon NG OS agent service
    All OS agent data will be handled by XorMon NG
  2. Start XorMon NG on different port
    Direct some al all OS agents to that port, both tools might receive all agent data
  3. Start LPAR2RRD on a different port
    XorMon NG will use the default one 8162 and hand over all traffic, some agents can be directed to LPAR2RRD new port then

1. Stop LPAR2RRD daemon service, start XorMon NG OS agent service

  • Stop LPAR2RRD daemon (under lpar2rrd user)
    cd /home/lpar2rrd/lpar2rd
    vi etc/lpar2rrd.cfg
    
      LPAR2RRD_AGENT_DAEMON=1
    -->
      LPAR2RRD_AGENT_DAEMON=0
    
    ./load.sh daemon_stop
    
    Make sure port is free, nothing should be listed by this cmd
    netstat -an | grep 8162| grep -i listen
    
  • Start XorMon NG OS agent service
    UI ➡ settings ➡ Application ➡ Services ➡ OS agent ➡ ON
    If that does not start, check logs in: UI ➡ settings ➡ Logs ➡ Microservice ➡ OS agent

2. Start XorMon NG on different port

  • Congfigure OS Agent port in the XorMon NG UI
    UI ➡ Settings ➡ Configuration ➡ Application ➡ Services ➡ Open Advanced settings for "OS Agent" ➡ Add new key:value pair:
    key: PORT
    value: 7162
    
    Start OS agent service:UI ➡ settings ➡ Application ➡ Services ➡ OS agent ➡ ON
    If that does not start, check log in: UI ➡ settings ➡ Logs ➡ Microservice ➡ OS agent

  • Direct OS agent to that new port, change crontab entry on the OS agent side
    su - lpar2rrd
    crontab -e
    
    * * * * * /usr/bin/perl /opt/lpar2rrd-agent/lpar2rrd-agent.pl <XorMon-NG-host>    > /var/tmp/lpar2rrd-agent.out 2>&1
    
    -->
    
    * * * * * /usr/bin/perl /opt/lpar2rrd-agent/lpar2rrd-agent.pl <XorMon-NG-host>:7162    > /var/tmp/lpar2rrd-agent.out 2>&1
    
    You can even direct OS agent to more servers (LPAR2RRD and XorMon NG, just add new host into the crontab)
    su - lpar2rrd
    crontab -e
    
    * * * * * /usr/bin/perl /opt/lpar2rrd-agent/lpar2rrd-agent.pl <LPAR2RRD-host> <XorMon-NG-host>:7162    > /var/tmp/lpar2rrd-agent.out 2>&1
    

3. Start LPAR2RRD on a different port

  • Change LPAR2RRD daemon port from 8162 to for example 7162 (under lpar2rrd user)
    cd /home/lpar2rrd/lpar2rd
    vi etc/lpar2rrd.cfg
    
      LPAR2RRD_AGENT_DAEMON_PORT=8162  
    -->
      LPAR2RRD_AGENT_DAEMON_PORT=7162  
    
    ./load.sh daemon_stop
    ./load.sh daemon_start
    
    You should see new port in listening state now
    netstat -an | grep 7162| grep -i listen
      tcp        0      0 0.0.0.0:7162            0.0.0.0:*               LISTEN     
    
  • Direct OS agent to that new port, change crontab entry on the OS agent side
    su - lpar2rrd
    crontab -e
    
    * * * * * /usr/bin/perl /opt/lpar2rrd-agent/lpar2rrd-agent.pl <LPAR2RRD-host>    > /var/tmp/lpar2rrd-agent.out 2>&1
    
    -->
    
    * * * * * /usr/bin/perl /opt/lpar2rrd-agent/lpar2rrd-agent.pl <LPAR2RRD-host>:7162    > /var/tmp/lpar2rrd-agent.out 2>&1
    
    You can even direct OS agent to more servers (LPAR2RRD and XorMon NG, just add new host into the crontab)
    su - lpar2rrd
    crontab -e
    
    * * * * * /usr/bin/perl /opt/lpar2rrd-agent/lpar2rrd-agent.pl <XorMon-NG-host> <LPAR2RRD-host>:7162    > /var/tmp/lpar2rrd-agent.out 2>&1