Link to home
Start Free TrialLog in
Avatar of cofactor
cofactor

asked on

stop jboss server in Linux

Hi, Here I have tried to stop jboss server in Linux .  This seems does not work. Could you please tell where is the problem ?

Please find the file attached. Sensitive information has been masked.
serverstart.txt
Avatar of enachemc
enachemc
Flag of Afghanistan image

just use the kill command
kill pid

it will not kill the JBoss, just will signal it to close
JBoss will shutdown gracefully
also, if you have multiple IPs on that server, JBoss might bind some ports only to some IP

issue a "netstat -na" and find out the listening port and IP
ASKER CERTIFIED SOLUTION
Avatar of Abhishek_Chib
Abhishek_Chib
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
kill -9 should be the almost the last thing you try (before rebooting)
/home/jboss/bin/shutdown.sh -S

Check this
http://community.jboss.org/wiki/StartStopJBoss
Hi,

try to Set up all the permissions and run levels like this:

sudo chown root:root /etc/init.d/jboss
sudo chmod ug+x /etc/init.d/jboss

ln -s /etc/rc.d/init.d/jboss /etc/rc3.d/S84jboss
ln -s /etc/rc.d/init.d/jboss /etc/rc4.d/S84jboss
ln -s /etc/rc.d/init.d/jboss /etc/rc5.d/S84jboss

ln -s /etc/rc.d/init.d/jboss/etc/rc6.d/K15jboss
ln -s /etc/rc.d/init.d/jboss/etc/rc0.d/K15jboss
ln -s /etc/rc.d/init.d/jboss/etc/rc1.d/K15jboss
ln -s /etc/rc.d/init.d/jboss/etc/rc2.d/K15jboss

and try to start up like :
$ /etc/init.d/./jboss start or $ /etc/init.d/./jboss stop

OR

Stopping JBoss, if you launched JBoss from the command line, the easiest way to stop it is to press ctrl-C.  JBoss should begin it's shutdown. (OR) ./shutdown.sh -S in jboss bin folder.
Avatar of cofactor
cofactor

ASKER

>>/home/jboss/bin/shutdown.sh -S

my jboss start is a bind to host and started as a service . Is not we should stop as a service ?

>>>just use the kill command
>>kill pid

Is it not  good to stop the service  ? is there any way for that ?

Also, how do we know  the startup status when I start jboss as a service ? it does not return anything ..seems things are in the background . How do I know the startup status ?  
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi,

Use this following command to stop the server:-

% ./shutdown.sh --host=myremotemachineOrIP -S

Try providing your machine's ip address instead of "localhost".

and also check the boot & server logs in jboss

MS
>>>look at boot.log - notice the timestamp
>>>look at server.log from the timestamp of the boot.log

why timestamp is required here ? I dont understand why you are telling to note the timestamp . why do I need that ?
to see the log at the time the server started ....
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
>>>Could you post

Yes. But I may not post the entire server details in public . Would you like to see any specific portion ?

Please tell me which portion you would like to check ..I'd copy that part and post it here.

You may tell me which Tag to copy from those files so that it would be helpful to check
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
>>>>Please tye to use
>>/home/jboss/bin/shutdown.sh -S
>>to see if this typical command can stop your jboss smoothly


when I run the above I get this ..

 /home/jboss/bin/shutdown.sh -S
Exception in thread "main" java.io.IOException: Failed to retrieve RMIServer stub: javax.naming.ServiceUnavailableException [Root exception is java.rmi.ConnectException: Connection refused to host: localhost; nested exception is:
        java.net.ConnectException: Connection refused]
        at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:338)
        at javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:248)
        at org.jboss.Shutdown.main(Shutdown.java:235)
Caused by: javax.naming.ServiceUnavailableException [Root exception is java.rmi.ConnectException: Connection refused to host: localhost; nested exception is:
        java.net.ConnectException: Connection refused]
        at com.sun.jndi.rmi.registry.RegistryContext.lookup(RegistryContext.java:101)
        at com.sun.jndi.toolkit.url.GenericURLContext.lookup(GenericURLContext.java:185)
        at javax.naming.InitialContext.lookup(InitialContext.java:392)
        at javax.management.remote.rmi.RMIConnector.findRMIServerJNDI(RMIConnector.java:1886)
        at javax.management.remote.rmi.RMIConnector.findRMIServer(RMIConnector.java:1856)
        at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:257)
        ... 2 more
Caused by: java.rmi.ConnectException: Connection refused to host: localhost; nested exception is:
        java.net.ConnectException: Connection refused
        at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:601)
        at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:198)
        at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:184)
        at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:322)
        at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
        at com.sun.jndi.rmi.registry.RegistryContext.lookup(RegistryContext.java:97)
        ... 7 more
Caused by: java.net.ConnectException: Connection refused
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)
        at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)
        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
        at java.net.Socket.connect(Socket.java:529)
        at java.net.Socket.connect(Socket.java:478)
        at java.net.Socket.<init>(Socket.java:375)
        at java.net.Socket.<init>(Socket.java:189)
        at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:22)
        at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:128)
        at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:595)
        ... 12 more
>>>ps -ef | grep jboss

This shows the list   but not formatted . Hence I find difficult to identify the jboss process id.

Could you please modify the above command so that this prints a nicely formatted  listing . This will help me to dentify the  process id for jboss and thereafter to kill this process.

I'm using putty.exe to connect to server.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial