History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: JEEAS-49
Type: Exception Exception
Status: Open Open
Priority: Critical Critical
Assignee: Martin Fuhrer
Reporter: Mikhail Gedzberg
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
JEE Application Servers

Root exception is java.net.ConnectException: Connection refused: connect

Created: 16 Nov 06 18:10   Updated: 17 Nov 06 16:19
Component/s: JBoss
Affects Version/s: None
Fix Version/s: None

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown

Build: 6,107


 Description  « Hide
Exception in thread "main" javax.naming.CommunicationException: Could not obtain connection to any of these urls: localhost:1099 [Root exception is javax.naming.CommunicationException: Failed to connect to server localhost:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root exception is java.net.ConnectException: Connection refused: connect]]]
at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1399)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:579)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:572)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at org.jboss.Shutdown.main(Shutdown.java:202)
Caused by: javax.naming.CommunicationException: Failed to connect to server localhost:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root exception is java.net.ConnectException: Connection refused: connect]]
at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:254)
at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1370)
... 4 more
Caused by: javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root exception is java.net.ConnectException: Connection refused: connect]
at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:228)
... 5 more
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:364)
at java.net.Socket.connect(Socket.java:507)
at java.net.Socket.connect(Socket.java:457)
at java.net.Socket.<init>(Socket.java:365)
at java.net.Socket.<init>(Socket.java:265)
at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:69)
at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:62)
at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:224)
... 5 more

 All   Comments   Work Log   Change History      Sort Order:
Mikhail Gedzberg - 16 Nov 06 18:14
Here is my steps:
1) create new project
2) add web module
3) create new HTML file in resource folder (mapped as "/")
4) run deployment under JBoss 4.0, this attempt failed due to impossibility to connect server (port is already in use! readlly it was not true: no application used the port)

java.net.BindException: Address already in use: JVM_Bind:8080
at org.apache.tomcat.util.net.PoolTcpEndpoint.initEndpoint(PoolTcpEndpoint.java:297)
at org.apache.tomcat.util.net.PoolTcpEndpoint.startEndpoint(PoolTcpEndpoint.java:312)
at org.apache.coyote.http11.Http11Protocol.start(Http11Protocol.java:182)
at org.apache.catalina.connector.Connector.start(Connector.java:1001)
at org.jboss.web.tomcat.tc5.Tomcat5.startConnectors(Tomcat5.java:510)
at org.jboss.web.tomcat.tc5.Tomcat5.handleNotification(Tomcat5.java:539)
at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.notification.NotificationListenerProxy.invoke(NotificationListenerProxy.java:138)
at $Proxy32.handleNotification(Unknown Source)
at org.jboss.mx.util.JBossNotificationBroadcasterSupport.handleNotification(JBossNotificationBroadcasterSupport.java:112)
at org.jboss.mx.util.JBossNotificationBroadcasterSupport.sendNotification(JBossNotificationBroadcasterSupport.java:93)
at org.jboss.system.server.ServerImpl.sendNotification(ServerImpl.java:879)
at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:468)
at org.jboss.system.server.ServerImpl.start(ServerImpl.java:330)
at org.jboss.Main.boot(Main.java:187)
at org.jboss.Main$1.run(Main.java:438)
at java.lang.Thread.run(Thread.java:595)

5) press "Stop process" button


Martin Fuhrer - 16 Nov 06 18:27
Could you please check the JBoss server log if there's anything about port 1099 being already in use?

Mikhail Gedzberg - 17 Nov 06 14:31
I double checked and made sure that I was wrong about port occupation. 1099 was taken by another program.
But the think is that exception mention in above is generated as a result of attempt to DISCONNECT from (non connected) JBoss server....

Martin Fuhrer - 17 Nov 06 16:19
After the 'Stop process' button has been pressed the plugin opens a connection to port 1099 (or whatever JNDI port is configured in JBoss) to send a shutdown message to the server. And of course this fails if the server isn't listening on port 1099.