Can't shutdown when running multiple instances (LONG, sorry)
dbronk Mar 11, 2004 8:09 AMI have posted this several times over the past several months and have yet to get it to work. Last time I posted in the config forum and received one reply which did not work. I have not seen anything in the docs either and really don't want to pay $200/hr for someone to tell me how to shutdown the server when it should be in the docs and a very easy thing to do. Yes, I may have missed it in the docs, but the docs are not that great. Yes, the product is free so I don't really bitch too much about the docs (although other open source have great docs).
Windows 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, etc.
defaultE2RD naming port 1199, defaultE2RD rmi port 1198, etc + 100.
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. Stack trace below.
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
Receive on reply that did not work:
shutdown.sh --server=localhost:1099 --serverName=jboss.system:type=Server
where 1099 is your jnp port (see your server.log)
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)