• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to shutdown a JBOSS client

 
Jonilie Echavez
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have JBOSS running which i ran using the command:

./run.sh -b uatappl001.opticx.com -c newbieServer

This client is running in port 38080.

How do i properly shutdown this JBOSS?

In my shutdown.sh, i have specifically put the following:

JAVA_OPTS="$JAVA_OPTS -Djava.naming.provider.url=jnp://uatappl001.opticx.com:38080"

But when i run the following command:

./shutdown.sh -S

I get this error:

Exception in thread "main" javax.naming.CommunicationException: Could not obtain connection to any of
these urls: uatappl001.opticx.com:38080 [Root exception is javax.naming.CommunicationException:
Failed to retrieve stub from server uatappl001.opticx.com:38080 [Root exception is java.io.EOFException]]


Am i missing something else in the shutdown script?


 
Rene Larsen
Ranch Hand
Posts: 1179
Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you changed the port for JNDI from 1099 to 38080 (same as the HTTP port) ??

Just use your bind host "jnp://uatappl001.opticx.com:1099" when setting - I normally use the -s flag when shutting down

 
Jonilie Echavez
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, i have changed the port to 38080.

Following your suggestion, i've put :

$ ./shutdown.sh -S -s jnp://uatappl001.opticx.com:38080

But still came up with the same error.

I remembered i have run it while the previous one was still running. Then i killed the process id used in running JBOSS(not a graceful way to shutdown), and i think that left the ports open. So maybe my problem is how to manually close the ports?
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Doing either a CTRL-C or killing the process (except for maybe a "kill -9") will cause JBoss AS to shut down gracefully, which includes closing the ports. For 'kill -9' the OS should be reclaiming the ports.

Run a netstat to determine which ports JBoss AS is using. See: http://community.jboss.org/wiki/DebugBindException
Also, when using shutdown, pass the JNDI port, not the HTTP port (you post is unclear as to whether JNDI or HTTP is using port 38080).
 
Jonilie Echavez
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Peter,

Thanks for your reply. It has been quite awhile, and by now the problem has gone away, but i didn't resolved it, and i wanted to clarify on the would-have-been a solution to the problem i had.

Yes, 38080 was HTTP port number instead of JNDI.

But which one are you exactly referring to for JNDI?

Referring back to my server-bindings.xml as below, is it under my Naming config, and if so, then in the example below, do i take the RmiPort 31098 or binding port 31099?

<!-- ********************* jboss-service.xml ****************** -->

<service-config name="jboss:service=Naming"
delegateClass="org.jboss.services.binding.AttributeMappingDelegate"
>
<delegate-config portName="Port" hostName="BindAddress">
<attribute name="RmiPort">31098</attribute>
</delegate-config>
<binding port="31099" host="${jboss.bind.address}"/>
</service-config>

There is also a JNDI, but i didn't think it was this one?

<!-- ********************* cluster-service.xml **************** -->

<service-config name="jboss:service=HAJNDI"
delegateClass="org.jboss.services.binding.AttributeMappingDelegate">
<delegate-config portName="Port" hostName="BindAddress">
<attribute name="RmiPort">31101</attribute>
</delegate-config>
<binding port="31100" host="${jboss.bind.address}"/>
</service-config>

 
ravikanth reddy
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Jonilie,

In your case 31099 is the JNP port.

$JBOSS_HOME/bin/shutdown.sh -s jnp://"$PKG_NAME":31099

It will properly stops the server.
 
Vikram Saxena
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ravikanth reddy wrote:Hello Jonilie,

In your case 31099 is the JNP port.

$JBOSS_HOME/bin/shutdown.sh -s jnp://"$PKG_NAME":31099

It will properly stops the server.


Instead of $PKG_NAME use uatappl001.opticx.com and this will work !!
So the final command should be
$JBOSS_HOME/bin/shutdown.sh -s jnp://uatappl001.opticx.com:31099
 
Jonilie Echavez
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you all! Your comments were helpful and it worked!

$JBOSS_HOME/bin/shutdown.sh -s jnp://uatappl001.opticx.com:31099

where 31099 is the Naming(JNDI) binding port.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic