NolioAgent: Failed to bind
search cancel

NolioAgent: Failed to bind

book

Article ID: 205346

calendar_today

Updated On:

Products

CA Release Automation - Release Operations Center (Nolio) CA Release Automation - DataManagement Server (Nolio)

Issue/Introduction

We are getting the below error in the agent's nimi.log while trying to start an agent:

2020-12-17 14:04:02,087 [WrapperSimpleAppMain] WARN  (com.nolio.nimi.comm.impl.NetworkConnectionManagerImpl:506) - Could not create server socket. Will retry in 1 sec...

2020-12-17 14:04:12,103 [WrapperSimpleAppMain] ERROR (com.nolio.nimi.comm.impl.NetworkConnectionManagerImpl:517) - Could not open server socket.
org.jboss.netty.channel.ChannelException: Failed to bind to: 0.0.0.0/0.0.0.0:6600
   at org.jboss.netty.bootstrap.ServerBootstrap.bind(ServerBootstrap.java:306)
   at com.nolio.nimi.comm.impl.NetworkConnectionManagerImpl.createServerBootStrap(NetworkConnectionManagerImpl.java:502)
   at com.nolio.nimi.comm.impl.NetworkConnectionManagerImpl.init(NetworkConnectionManagerImpl.java:465)
   at com.nolio.nimi.NimiDirector.init(NimiDirector.java:120)
   at com.nolio.nimi.NimiPostOffice.openOffice(NimiPostOffice.java:49)
   at com.nolio.platform.shared.communication.CommunicationNetwork.connect(CommunicationNetwork.java:58)
   at com.nolio.platform.agent.DeployerLifecycle.start(DeployerLifecycle.java:503)
   at com.nolio.platform.agent.Deployer.main(Deployer.java:64)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at java.lang.reflect.Method.invoke(Method.java:498)
   at org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:290)
   at java.lang.Thread.run(Thread.java:748)
Caused by: java.net.BindException: Address already in use
   at sun.nio.ch.Net.bind0(Native Method)
   at sun.nio.ch.Net.bind(Net.java:433)
   at sun.nio.ch.Net.bind(Net.java:425)
   at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
   at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
   at org.jboss.netty.channel.socket.nio.NioServerSocketPipelineSink.bind(NioServerSocketPipelineSink.java:148)
   at org.jboss.netty.channel.socket.nio.NioServerSocketPipelineSink.handleServerSocket(NioServerSocketPipelineSink.java:100)
   at org.jboss.netty.channel.socket.nio.NioServerSocketPipelineSink.eventSunk(NioServerSocketPipelineSink.java:74)
   at org.jboss.netty.channel.Channels.bind(Channels.java:468)
   at org.jboss.netty.channel.AbstractChannel.bind(AbstractChannel.java:199)
   at org.jboss.netty.bootstrap.ServerBootstrap$Binder.channelOpen(ServerBootstrap.java:351)
   at org.jboss.netty.channel.Channels.fireChannelOpen(Channels.java:176)
   at org.jboss.netty.channel.socket.nio.NioServerSocketChannel.<init>(NioServerSocketChannel.java:85)
   at org.jboss.netty.channel.socket.nio.NioServerSocketChannelFactory.newChannel(NioServerSocketChannelFactory.java:142)
   at org.jboss.netty.channel.socket.nio.NioServerSocketChannelFactory.newChannel(NioServerSocketChannelFactory.java:90)
   at org.jboss.netty.bootstrap.ServerBootstrap.bind(ServerBootstrap.java:285)
   ... 13 more

Environment

Release : 6.6

Component : CA RELEASE AUTOMATION RELEASE OPERATIONS CENTER

Cause

This problem is caused by the agent not being able to use/bind the port it is configured to use. In this case it is port 6600 (the default port used by the agent). 

Resolution

There are two solutions for this problem. 

  1. Identify the program using the port and stop/remove/change it; or
  2. Update the NOLIOAGENT_HOME/conf/nimi_config.xml xml value for "/config/nimi/network/port" from its current port value to an open/available port. To do this:
    1. Stop the agent
    2. Update the value
    3. Start the agent

 

Note:

If the agent is on an Execution Server then it is common for the agent on it to use port 6900. If you decide to update the agent's nimi_config.xml to use port 6900 then confirm that port is not in use before attempting to use. 

 

Additional Information

If you're dealing with this problem on Linux then you can troubleshoot this using the following steps:

  1. Stop the agent
  2. Run the command: netstat -aonp | grep 6600
    Note: You may need need to run this as root to identify the PID of the program using port 6600. The output should look something like this: 
    tcp6       0      0 :::6600                :::*                    LISTEN      158495/./jre/bin/ja  off (0.00/0/0)
    tcp6       0      0 ip.address.x.x:6600       ip.address.x.x:43712      ESTABLISHED 158495/./jre/bin/ja  keepalive (7079.50/0/0)

    The output above confirms that the port is being used by a process with the PID: 158495
  3. Run the command: ps auxww | grep <pid identified in step 2>
    The output could look something like this:
    <auser>  158495  0.5  4.0 6028536 663488 ?      Sl   Dec02 118:45 ./jre/bin/java -Djava.util.logging.config.file=/opt/nolio/test/nes/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Duser.country=US -Duser.language=en -Xms512m -Xmx2048m -XX:+HeapDumpOnOutOfMemoryError -Djava.library.path=./bin -Djava.endorsed.dirs=/opt/nolio/test/nes/endorsed -classpath /opt/nolio/test/nes/bin/bootstrap.jar:/opt/nolio/test/nes/bin/tomcat-juli.jar -Dcatalina.base=/opt/nolio/test/nes -Dcatalina.home=/opt/nolio/test/nes -Djava.io.tmpdir=/opt/nolio/test/nes/temp org.apache.catalina.startup.Bootstrap start start

In the output above we can see that an Execution Server is the owner of the process, so it is using port 6600. However, it may not be an Execution Server. It may be another program. 

Based on the information above determine whether or not the program using port 6600 should be stopped or reconfigured. If not then change the agent's configuration to use an alternative port as described in Resolution #2.