Can't shutdown when running multiple instances
dbronk Feb 25, 2004 9:55 AMWindows 2000 server
JBoss 3.2.3
Setup my service-binding.xml as in the example and it is working great. My basic setup is that I have the default server setup in the service-binding.xml and for each additional instance I need I simply copy the default server and paste it in the same file, then change the name and simply increment each port by 100 from the last. Again, starting up multiple instances works great.
Example: Default naming port 1099, default rmi port 1098
defaultE2RD naming port 1199, defaultE2RD rmi port 1198
My problem is shutting down. The only option for me is ctrl+c but that sucks as I want to have scripts to deploy, stop, start, etc.
The shutdown command I enter is:
C:\jboss-3.2.3\bin\shutdown.bat --server=defaultE2RD
Note: I also don't know the command to stop/start remotely.
The exception I get is below
Note: it is trying to connect to defaultE2RD:1099, it should use the service-binding.xml and connect to defaultE2RD:1199
What do I need to enter for shutdown? Added bonus... How to do it remotely?
Thanks,
Dale
10:33:00,231 WARN [NamingContext] Failed to connect to defaultE2RD:1099
javax.naming.CommunicationException: Failed to connect to server defaultE2RD:1099 [Root exception is
javax.naming.ServiceUnavailableException: Failed to connect to server defaultE2RD:1099 [Root except
ion is java.net.UnknownHostException: defaultE2RD: defaultE2RD]]
at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:215)
at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1181)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:514)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:507)
at javax.naming.InitialContext.lookup(InitialContext.java:347)
at org.jboss.Shutdown.main(Shutdown.java:182)
Caused by: javax.naming.ServiceUnavailableException: Failed to connect to server defaultE2RD:1099 [R
oot exception is java.net.UnknownHostException: defaultE2RD: defaultE2RD]
at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:190)
... 5 more
Caused by: java.net.UnknownHostException: defaultE2RD: defaultE2RD
at java.net.InetAddress.getAllByName0(InetAddress.java:1011)
at java.net.InetAddress.getAllByName0(InetAddress.java:981)
at java.net.InetAddress.getAllByName(InetAddress.java:975)
at java.net.InetAddress.getByName(InetAddress.java:889)
at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:61)
at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:186)
... 5 more
Exception in thread "main" java.lang.ClassCastException
at org.jnp.interfaces.NamingContext.discoverServer(NamingContext.java:986)
at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1192)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:514)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:507)
at javax.naming.InitialContext.lookup(InitialContext.java:347)
at org.jboss.Shutdown.main(Shutdown.java:182)