I'm trying to move an existing project over to a new (linux) server environment (note, I have no direct access to the code nor do I have any knowledge about the project in general – talk about a great start), upon starting the project I receive the following error:
Exception in thread "main" javax.naming.CommunicationException: Could not obtain connection to any of these urls: <servername>:1459 [Root exception is javax.naming.CommunicationException: Failed to connect to server <servername>:1459 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server <servername>:1459 [Root exception is java.net.ConnectException: Connection refused]]]
at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1562)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:634)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:627)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at org.jboss.Shutdown.main(Shutdown.java:214)
Caused by: javax.naming.CommunicationException: Failed to connect to server <servername> [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server <servername>:1459 [Root exception is java.net.ConnectException: Connection refused]]
at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:274)
at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1533)
... 4 more
Caused by: javax.naming.ServiceUnavailableException: Failed to connect to server <servername>:1459 [Root exception is java.net.ConnectException: Connection refused]
at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:248)
... 5 more
Caused by: java.net.ConnectException: Connection refused
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:366)
at java.net.Socket.connect(Socket.java:529)
at java.net.Socket.connect(Socket.java:478)
at java.net.Socket.<init>(Socket.java:375)
at java.net.Socket.<init>(Socket.java:276)
at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:84)
at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:77)
at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:244)
... 5 more
Now, I've opened the port in question to see whether there are any changes when I do so, alas, nothing happens.
I'm sorry about this very vague level of information, but it's really all I have, I'll gladly provide what I can if you have any ideas what could be at fault here.
Regards,
Dennis
Best Answer
It's simple, no one listen on port 1459. You configured jboss not exactly as on previous setup. Here is defaults for varios jboss versions http://shrubbery.mynetgear.net/c/display/W/JBoss+Ports and https://docs.jboss.org/author/display/AS7/Interfaces+and+ports?_sscc=t
and snipplets from articles:
JBoss 7.x Ports
Defined in standalone.xml (or what you're using for start jboss)
JBoss 6.X Ports Most of the default ports are listed in server/default/conf/bindingservice.beans/META-INF/bindings-jboss-beans.xml.
JBoss 4.x Ports