Printer FriendlyEmail Article Link

VisionWorks T&D: Why does the MetroUI UI not come up? Why does the MetroUI show status of Stopped?

Environment/Versions
Lumos T&D 10.500.
Answer
When do a stop and start of the MetroUI processes, the process goes into a stopped state:
As user smartsys in directory $METRO_HOME/MetroUI issue:

=> node app list
    uid      command                             script        forever  pid     id logfile                                  uptime 
[0] hostname /spirent/cots/Node/0.10.38/bin/node tnd-server.js 11141296 4784370    /spirent/metro/logs/MetroUI-hostname.log STOPPED

The /spirent/metro/<version>/MetroUI/logs/metroui-ds.log shows error that socket is in use:
[2017-01-19 11:43:12] [main] [m.d.App:70] [INFO] Starting Metro UI Data Service
[2017-01-19 11:43:16] [main] [m.d.App:80] [ERROR] Error
java.net.BindException: The socket name is already in use.
        at sun.nio.ch.Net.bind0(Native Method) ~[na:1.7.0]
        at sun.nio.ch.Net.bind(Net.java:568) ~[na:1.7.0]
        at sun.nio.ch.Net.bind(Net.java:548) ~[na:1.7.0]
        at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:260) ~[na:1.7.0]
        at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:87) ~[na:1.7.0]
        at org.eclipse.jetty.server.nio.SelectChannelConnector.open(SelectChannelConnector.java:182) ~[ds.jar:na]
        at org.eclipse.jetty.server.AbstractConnector.doStart(AbstractConnector.java:311) ~[ds.jar:na]
        at org.eclipse.jetty.server.nio.SelectChannelConnector.doStart(SelectChannelConnector.java:260) ~[ds.jar:na]
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59) ~[ds.jar:na]
        at org.eclipse.jetty.server.Server.doStart(Server.java:274) ~[ds.jar:na]
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59) ~[ds.jar:na]
        at metroui.ds.App.main(App.java:74) ~[ds.jar:na]
[2017-01-19 11:43:16] [main] [m.d.App:82] [ERROR] Critical error has occurred. The socket name is already in use.

To start the MetroUI processes properly do the following as user smartsys:
  1. Stop the application:
    cd $METRO_HOME/MetroUI
    node app stop
  2. Using netstat command, check the ports used by MetroUI.  Ports used by MetroUI are 3000, 3001, 3002, 8083.
    netstat -an | grep 3000
    netstat -an | grep 3001
    netstat -an | grep 3002
    netstat -an | grep 8083

    Example of problem:
    => netstat -an | grep 8083
     tcp4       0      0  *.8083                 *.*                    LISTEN
     
  3. For the port(s) that show LISTEN use the lsof command to identify the pid of the process that is still running. 

    In the case above the 8083 port show it is in use as "LISTEN".  Find the process ID that is using the port with the 'lsof' command:

    => $COTS_PATH/lsof/4.85/lsof -i :8083
     COMMAND      PID     USER   FD   TYPE             DEVICE SIZE/OFF NODE NAME
     java    11075716 smartsys   68u  IPv4 0xf100050000f5f3b8      0t0  TCP *:8083 (LISTEN)
     lsof.6.1.0.0: WARNING: /spirent/home/smartsys/.lsof_hostname was updated.
     
  4. Verify the process is MetroUI process:
    => ps -ef | grep 11075716
     smartsys 11075716        1   0   Jan 13      -  4:20 java -Dalias.list=scout -Dscout.jdbc.driver=undefined -Dscout.jdbc.url=jdbc:informix-sqli://cidc2106:4301/scout:INFORMIXSERVER=metrotcp;IFX_ISOLATION_LEVEL=1;IFX_LOCK_MODE_WAIT=120 -Dscout.jdbc.user=smartsys -Dscout.jdbc.password=01ee9b0c4386c98edd3a40d7a2ecb280 -Dscout.jdbc.max.connections=undefined -Dscout.jdbc.init.scripts= -jar ds/target/ds.jar -port 8083
  5. Kill the process:
    => kill 11075716
  6. Start MetroUI processes as normal:
    =>  cd $METRO_HOME/MetroUI

     => node app list
     null

     => node app start
     info: Started

     => node app list
         uid      command                             script        forever  pid      id logfile                                  uptime
     [0] cidc2106 /spirent/cots/Node/0.10.38/bin/node tnd-server.js 11796642 11075740    /spirent/metro/logs/MetroUI-cidc2106.log 0:0:0:3.693
     

Product : VW Controller T&D Classic