Could not obtain connection
jagadeshm Mar 14, 2011 3:19 AMHi ,
I was trying to deploy an sample web application , i started the server with ports-03.now i try to deploy the application using twiddle like
twiddle.bat invoke "jboss.system:service=MainDeployer" deploy C:\software\DemoExample.war.
the deployer was throwing an error saying
org.jboss.util.NestedRuntimeException: Could not obtain connection to any of these urls: localhost:1099 and discovery failed with error:javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out]; - nested throwable: (javax.naming.CommunicationException: Could not obtain connection to any of these urls: localhost:1099 and discovery failed with error: javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out] [Root exception is javax.naming.CommunicationException: Failed to connect to server localhost/127.0.0.1:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server localhost/127.0.0.1:1099 [Root exception is java.net.ConnectException: Connection refused: connect]]])
why the server was trying to connect to localhost:1099 , when i started the server with ports-03.
Even i was having the same issue while doing a shutdown of the servers ,i started 2 instances of servers like
run.sh -C node2 -Djboss.service.binding.set=ports-03 -b hostName
run.sh -C node1-b hostName (both the ports are different)
so the node1 will use the default ports and node2 will use ports-03.when i tried to shutdown the server using
shutdown.sh -S node2 -Djboss.service.binding.set=ports-03 , it was throwing the same exception as above saying unable to connect to localhost:1099.
is there any way that i can say to deployer to connect to jmx using this port OR can i say to shutdown.sh saying the port for jmx is this.Iam using Jboss AS 5
Thanks in advance for all the advices and suggestions.