• service jboss restart slow

  • We tried to make OpenKM as intuitive as possible, but an advice is always welcome.
We tried to make OpenKM as intuitive as possible, but an advice is always welcome.
Forum rules: Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
 #9970  by seanwhe
 
Why when I issue command like

service jboss stop
or
service jboss restart

does it take so long.

Heres the output and it can go on this way for hours.

service jboss restart
Code: Select all
Stopping JBoss....Exception in thread "main" javax.naming.CommunicationException: Could not obtain connection to any of these urls: 0.0.0.0 [Root exception is javax.naming.CommunicationException: Failed to connect to server 0.0.0.0:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server 0.0.0.0:1099 [Root exception is java.net.ConnectException: Connection timed out]]]
	at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1562)
	at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:634)
	at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:627)
	at javax.naming.InitialContext.lookup(InitialContext.java:392)
	at org.jboss.Shutdown.main(Shutdown.java:214)
Caused by: javax.naming.CommunicationException: Failed to connect to server 0.0.0.0:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server 0.0.0.0:1099 [Root exception is java.net.ConnectException: Connection timed out]]
	at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:274)
	at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1533)
	... 4 more
Caused by: javax.naming.ServiceUnavailableException: Failed to connect to server 0.0.0.0:1099 [Root exception is java.net.ConnectException: Connection timed out]
	at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:248)
	... 5 more
Caused by: java.net.ConnectException: Connection timed out
	at java.net.PlainSocketImpl.socketConnect(Native Method)
	at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)
	at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:211)
	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:276)
	at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:84)
	at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:77)
	at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:244)
	... 5 more
.....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
 #10003  by seanwhe
 
Bump. I still have this problem. It takes less time for me to reboot the server than it does to do a service jboss stop or restart.

Any clues I can follow, I've look hi and low and not finding anything that makes sense to this problem.

Many thanks

Sean
 #10038  by jllort
 
This kind of error normally is caused by bad starting. Take a look at starting server.log if there's some problem on port yet binding , probably that's the cause why you can not shutdown.

with jboss stoped can try
Code: Select all
net start -anp tcp 
TAke a look if port 1098 or 1099 are binding by other application
 #10040  by seanwhe
 
Hi,

Thanks for the suggestion.

I can see via netstat that the only thing holding these ports is java.

# netstat -pant | grep 1099
tcp 0 0 0.0.0.0:1099 0.0.0.0:* LISTEN 1357/java

# netstat -pant | grep 1098
tcp 0 0 0.0.0.0:1098 0.0.0.0:* LISTEN 1357/java

Since the only thing java running on the system is openkm it is safe to assume that it is listening on those ports but to check this I

# ps aux | grep java
openkm 1357 2.7 7.7 1652080 633612 ? Sl 21:59 0:57 java -Dprogram.name=run.sh -server -Xms256m -Xmx1024m -XX:PermSize=64m -XX:MaxPermSize=128m -Djava.awt.headless=true -Djava.net.preferIPv4Stack=true -Djava.library.path=/home/openkm/jboss-4.2.3.GA/bin/native -Djava.endorsed.dirs=/home/openkm/jboss-4.2.3.GA/lib/endorsed -classpath /home/openkm/jboss-4.2.3.GA/bin/run.jar org.jboss.Main -b 0.0.0.0

The PID from netstat and ps match.

Checking when openkm is not running

kill -9 1357

# netstat -pant | grep 1098
# netstat -pant | grep 1099
#

Shows that nothing else is contending for the port.

I can start jbos without problem

# service jboss start
Starting JBoss.
# netstat -pant | grep 1098
tcp 0 0 0.0.0.0:1098 0.0.0.0:* LISTEN 1729/java
# netstat -pant | grep 1099
tcp 0 0 0.0.0.0:1099 0.0.0.0:* LISTEN 1729/java

Do you have any other ideas I could check. Anything is worth a shot :-)

Sean
 #10041  by seanwhe
 
Sorry I forgot to say.

I ran a tail on /home/openkm/jboss-4.2.3.GA/server/default/log/server.log while performing service jboss stop.

There is no output appended to the file. Looking the file I see startup information and other stuff but nothing to indicate a problem from a shutdown. The only errors I get are in the terminal thread where the stop command was issued.

But if I do ps after killing the shutdown with CTRL+C

# ps aux | grep openkm
openkm 1967 0.0 0.0 4092 656 pts/0 S 22:50 0:00 /bin/sh /home/openkm/jboss-4.2.3.GA/bin/run.sh -b 0.0.0.0
openkm 2003 10.0 4.9 1563068 405068 pts/0 Sl 22:50 0:31 java -Dprogram.name=run.sh -server -Xms256m -Xmx1024m -XX:PermSize=64m -XX:MaxPermSize=128m -Djava.awt.headless=true -Djava.net.preferIPv4Stack=true -Djava.library.path=/home/openkm/jboss-4.2.3.GA/bin/native -Djava.endorsed.dirs=/home/openkm/jboss-4.2.3.GA/lib/endorsed -classpath /home/openkm/jboss-4.2.3.GA/bin/run.jar org.jboss.Main -b 0.0.0.0
root 2123 0.0 0.0 9752 868 pts/1 S+ 22:52 0:00 tail -f /home/openkm/jboss-4.2.3.GA/server/default/log/server.log

Sean
 #10053  by jllort
 
On which Os are you ?
I suggest try configuring jboss as service, not starting in terminal and then stopping.
 #10062  by seanwhe
 
I am using Ubuntu 10.4 LTS (64-bit)
and OpenKM 5.0.3

It is a service, hence I can use service jboss stop|start|restart

Sean
 #10066  by jllort
 
I was talking about service because you use CTRL+C to stop applition server.

The problem to shutdown the jboss continues ? because Ubuntu 10.04 is well tested environment and must not present this kind of problems.
 #10095  by pavila
 
Try to start JBoss from the command line:
Code: Select all
$ ./bin/run.sh -b 0.0.0.0
And stop from another terminal:
Code: Select all
$ ./bin/shutdown.sh -s 0.0.0.0
Tell me if the same error is thrown.

About Us

OpenKM is part of the management software. A management software is a program that facilitates the accomplishment of administrative tasks. OpenKM is a document management system that allows you to manage business content and workflow in a more efficient way. Document managers guarantee data protection by establishing information security for business content.