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
Release : 6.6
Component : CA RELEASE AUTOMATION RELEASE OPERATIONS CENTER
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).
There are two solutions for this problem.
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.
If you're dealing with this problem on Linux then you can troubleshoot this using the following steps:
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.