Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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     Connection refused]]]
    at org.jnp.interfaces.NamingContext.checkRef(
    at org.jnp.interfaces.NamingContext.lookup(
    at org.jnp.interfaces.NamingContext.lookup(
    at javax.naming.InitialContext.lookup(
    at org.jboss.Shutdown.main(
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 Connection refused]]
    at org.jnp.interfaces.NamingContext.getServer(
    at org.jnp.interfaces.NamingContext.checkRef(
    ... 4 more
Caused by: javax.naming.ServiceUnavailableException: Failed to connect to server <servername>:1459 [Root exception is Connection refused]
    at org.jnp.interfaces.NamingContext.getServer(
    ... 5 more
Caused by: Connection refused
    at Method)
    at org.jnp.interfaces.TimedSocketFactory.createSocket(
    at org.jnp.interfaces.TimedSocketFactory.createSocket(
    at org.jnp.interfaces.NamingContext.getServer(
    ... 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.



share|improve this question
You sound like you seriously need the help of the devs. You may have better luck posting it on StackOverflow. – tombull89 Mar 7 '13 at 9:52
Oh, I see you have. Please don't cross-post to sites. – tombull89 Mar 7 '13 at 9:52
I'm sorry for that, but I was advised to post that here since I was told it is most likely a firewall/OS Issue. – Dennis Röttger Mar 7 '13 at 9:55
Maybe silly question, by are you sure you starting JBoss, not stopping it? Because exception in Shutdown class. org.jboss.Shutdown.main( – user1516873 Mar 7 '13 at 10:48
Oh yeah, I should've gone into that in my question - the startup itself is just fine, and nothing shows up on the logs. This error only shows upon shutdown (but it shouldn't as it worked before), so this is the only lead I've got. – Dennis Röttger Mar 7 '13 at 11:36

2 Answers 2

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 and

and snipplets from articles:

JBoss 7.x Ports

Defined in standalone.xml (or what you're using for start jboss)

<socket-binding name="jndi" port="1099"/>
   <socket-binding name="jmx-connector-registry" port="1090"/>
   <socket-binding name="jmx-connector-server" port="1091"/>
   <socket-binding name="http" port="8080"/>
   <socket-binding name="https" port="8443"/>
   <socket-binding name="jacorb" port="3528"/>
   <socket-binding name="jacorb-ssl" port="3529"/>
   <socket-binding name="osgi-http" port="8090"/>
   <socket-binding name="remoting" port="4447"/>
   <socket-binding name="txn-recovery-environment" port="4712"/>
   <socket-binding name="txn-status-manager" port="4713"/>
   <socket-binding name="messaging" port="5445"/>
   <socket-binding name="messaging-throughput" port="5455"/>

JBoss 6.X Ports Most of the default ports are listed in server/default/conf/bindingservice.beans/META-INF/bindings-jboss-beans.xml.

1090 RMI/JRMP for Remote JMX
1091 RMI server socket
1098 Naming Service - RMI requests from client proxies
1099 Naming Service - Main port
3873 EJB3 Remoting Connector
4446 JBoss Remoting Connector - Unified Invoker
4712 JBossTS Recovery Manager
4713 JBossTS Transaction Status Manager
4714 JBossTS - used to create a unique process id
5445 HornetQ
5455 Socket for HornetQ throughput connection factory
5500 Non-SSL Remoting
5501 SSL Remoting
8009 AJP Port
8080 HTTP Port
8083 Dynamic class and resource loading 

JBoss 4.x Ports

 1099 ./conf/jboss-service.xml or ./naming.sar/META-INF/jboss-service.xml Bootstrap JNP port. 
 1098 (anon) ./conf/jboss-service.xml or ./naming.sar/META-INF/jboss-service.xml RMI naming service port. Use '0' for an anonymous port. 
 4444 ./conf/jboss-service.xml or ./deploy/invokers-service.xml RMI/JRMP invoker port
 4445 ./conf/jboss-service.xml or ./deploy/invokers-service.xml Pooled invoker
 8083 ./conf/jboss-service.xml or ./deploy/dynclassloader-service.xml RMI dynamic class loader port
 8080 ./deploy/jbossweb-tomcat55.sar/server.xml HTTP port for the web container
 8009 ./deploy/jbossweb-tomcat55.sar/server.xml AJP port for the web container
 8093 ./deploy/jms/uil2-service.xml UIL for JMS.
 8443 (optional) ./deploy/jbossweb-tomcat55.sar/server.xml HTTPS port for the web container
share|improve this answer

We see from your application exception that it is trying to connect to some server on port 1459, and that the reason for the failure is Connection refused.

This has two possible causes:

  1. Most likely: The remote service is not running. To resolve, start the remote service.
  2. Less likely: The remote service is firewalled. To resolve, open the firewall.
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.