What steps will reproduce the problem?
We start wlsagent using this:
${JAVA_PATH} -Xmx32m -cp ${CLASSPATH} net.wait4it.nagios.wlsagent.core.WLSAgent
${HOST} ${PORT} > /tmp/wlsagent.log 2>&1 &
The CLASSPATH is correct.
After a period of time (could be 5 mins, could be a day) we can't run
wlsagent.sh any more. A check of the log yields:
weblogic-02:/opt/wlsagent# cat /tmp/wlsagent.log
2014-09-09 13:17:36.520:INFO:oejs.Server:jetty-7.6.2.v20120308
2014-09-09 13:17:36.556:INFO:oejsh.ContextHandler:started
o.e.j.s.ServletContextHandler{/wlsagent,null}
2014-09-09 13:17:36.569:WARN:oejuc.AbstractLifeCycle:FAILED
SelectChannelConnector@0.0.0.0:9090: java.net.BindException: Address already in
use
java.net.BindException: Address already in use
at sun.nio.ch.Net.bind(Native Method)
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:119)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:59)
at org.eclipse.jetty.server.nio.SelectChannelConnector.open(SelectChannelConnector.java:182)
at org.eclipse.jetty.server.AbstractConnector.doStart(AbstractConnector.java:311)
at org.eclipse.jetty.server.nio.SelectChannelConnector.doStart(SelectChannelConnector.java:260)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)
at org.eclipse.jetty.server.Server.doStart(Server.java:272)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)
at net.wait4it.nagios.wlsagent.core.WLSAgent.main(Unknown Source)
2014-09-09 13:17:36.570:WARN:oejuc.AbstractLifeCycle:FAILED
org.eclipse.jetty.server.Server@6581ed9e: java.net.BindException: Address
already in use
java.net.BindException: Address already in use
at sun.nio.ch.Net.bind(Native Method)
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:119)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:59)
at org.eclipse.jetty.server.nio.SelectChannelConnector.open(SelectChannelConnector.java:182)
at org.eclipse.jetty.server.AbstractConnector.doStart(AbstractConnector.java:311)
at org.eclipse.jetty.server.nio.SelectChannelConnector.doStart(SelectChannelConnector.java:260)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)
at org.eclipse.jetty.server.Server.doStart(Server.java:272)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)
at net.wait4it.nagios.wlsagent.core.WLSAgent.main(Unknown Source)
Exception in thread "main" java.net.BindException: Address already in use
at sun.nio.ch.Net.bind(Native Method)
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:119)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:59)
at org.eclipse.jetty.server.nio.SelectChannelConnector.open(SelectChannelConnector.java:182)
at org.eclipse.jetty.server.AbstractConnector.doStart(AbstractConnector.java:311)
at org.eclipse.jetty.server.nio.SelectChannelConnector.doStart(SelectChannelConnector.java:260)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)
at org.eclipse.jetty.server.Server.doStart(Server.java:272)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)
at net.wait4it.nagios.wlsagent.core.WLSAgent.main(Unknown Source)
weblogic-02:/opt/wlsagent#
wlsagent process is still running:
weblogic-02:/opt/wlsagent# ps ax | grep wlsagent
9897 ? Sl 0:00 /usr/bin/java -Xmx32m -cp /opt/wlsagent/wlsagent.jar:/opt/wlsagent/lib/wlclient.jar:/opt/wlsagent/lib/servlet-api-2.5.jar:/opt/wlsagent/lib/jetty-servlet-7.6.2.v20120308.jar:/opt/wlsagent/lib/wljmxclient.jar:/opt/wlsagent/lib/wlfullclient.jar net.wait4it.nagios.wlsagent.core.WLSAgent 0.0.0.0 9090
15496 pts/0 R+ 0:00 grep wlsagent
weblogic-02:/opt/wlsagent#
But can't connect to the port
weblogic-02:/opt/wlsagent# telnet localhost 9090
Trying 127.0.0.1...
telnet: connect to address 127.0.0.1: Connection refused
telnet: Unable to connect to remote host: Connection refused
weblogic-02:/opt/wlsagent#
running wlsagent.sh yields nothing:
weblogic-02:/opt/wlsagent# !1003
./wlsagent.sh
'hostname=localhost&port=7001&username=nagios&password=nagios36&jvm=UsedMemory,9
0,95'
weblogic-02:/opt/wlsagent#
Nothing is running on 9090
weblogic-02:/opt/wlsagent# lsof -i :9090
weblogic-02:/opt/wlsagent#
Original issue reported on code.google.com by mferrare...@ampurta.com.au on 9 Sep 2014 at 6:16
Original issue reported on code.google.com by
mferrare...@ampurta.com.au
on 9 Sep 2014 at 6:16