• Error occured when shutdown the server

  • 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.
 #14123  by liruixinsnake
 
OpenKM Version: 5.1.9 (build: 7447)
Server 2003 System Enterprise Edition Service Pack 2


I'm running OpenKM system on windows Server 2003 system, there's no problem when server starts, but when I want to shutdown the server, (run C:\openKM\bin\shutdown.bat -S) ,some errors occured, can you help me analyze this issue and find the solution?
thank you !

the log is as below:
Code: Select all
C:\openKM\bin>cd C:\openKM\bin                                                  
                                                                                
C:\openKM\bin>shutdown -S                                                       
Exception in thread "main" javax.naming.CommunicationException: Could not obtain
 connection to any of these urls: localhost:1099 [Root exception is javax.naming
.CommunicationException: Failed to connect to server localhost:1099 [Root except
ion is javax.naming.ServiceUnavailableException: Failed to connect to server loc
alhost:1099 [Root exception is java.net.ConnectException: Connection refused: co
nnect]]]                                                                        
        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 loca
lhost:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed t
o connect to server localhost:1099 [Root exception is java.net.ConnectException:
 Connection refused: connect]]                                                  
        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
 localhost:1099 [Root exception is java.net.ConnectException: Connection refused
: connect]                                                                      
        at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:248)   
        ... 5 more                                                              
Caused by: java.net.ConnectException: Connection refused: connect               
        at java.net.PlainSocketImpl.socketConnect(Native Method)                
        at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)         
        at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)  
        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)           
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)           
        at java.net.Socket.connect(Socket.java:519)                             
        at java.net.Socket.connect(Socket.java:469)                             
        at java.net.Socket.<init>(Socket.java:366)                              
        at java.net.Socket.<init>(Socket.java:267)                              
        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                                                              
请按任意键继续. . .                                                             
                                                                                
                                                                                
                                                                                
 #14139  by liruixinsnake
 
I found it was related to the bind parameter when I started the server.
when i start the server, i excute the commad
'run.bat -b x.x.x.x' to enable this system be accessible from others computers in my network.

but the question is how should I add the address parameter when stopping the server? tks
 #14140  by liruixinsnake
 
problem solved. I knew how to shutdown it properly.

learning about JBOSS, to shutdown the server , I can use the commad as ' ./shutdown.sh --server 192.168.1.188 '

tks this forum to give me the learning chance.
 #17033  by Alexires
 
I'm getting this error and I'm not sure what to put for the IP of the server (or how to shut it down at all!!)

./shutdown.sh -S used to work, but now it doesn't for some reason. This happened while it was running 5.1.9, and continues now that I've upgraded to 5.1.10. How do I find out what to use as the argument to shutdown the server, guys?
 #17133  by Alexires
 
Code: Select all
Exception in thread "main" javax.naming.CommunicationException: Could not obtain connection to any of these urls: localhost:1099 [Root exception is javax.naming.CommunicationException: Failed to connect to server localhost:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root exception is java.net.SocketException: Network is unreachable]]]
        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 localhost:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root exception is java.net.SocketException: Network is unreachable]]
        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 localhost:1099 [Root exception is java.net.SocketException: Network is unreachable]
        at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:248)
        ... 5 more
Caused by: java.net.SocketException: Network is unreachable
        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: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
That is what is spat out in the terminal when I try that, jllort.
 #17154  by jllort
 
Was openkm started with 0.0.0.0 ? otherside change localhost by your ip if you started with ip
 #17175  by jllort
 
It means is not starting OpenKM ? You have moved location directories to other, have you changed new values into database ?
 #17178  by Alexires
 
OpenKM starts fine, and it is hosted on a VPS, so to OpenKM, the directories/database are the same (I would expect).

This is what happens:

Server boots.
OpenKM starts.
Web interface works fine, documents can be uploaded/downloaded/etc.
When OpenKM shutdown is called (shutdown.sh -S), the error I gave above is put out in the terminal window that shutdown.sh was called in.
OpenKM continues to run.
Can only be shutdown by calling a sigterm in htop (a variation of the top program in linux).
 #17180  by jllort
 
Same java version ?
Same jboss start / stop script ?
you start and stop with the same user ?
 #17188  by jllort
 
if you take a look on binding ports 1099 is in use ? use the netstat command if 1099 is binding could be used for other application otherside I can not imagine why you got this problem
 #17192  by Alexires
 
Netstat doesn't report 1099 being in use. The only ports in use are 8009, 2002 and some misc high ports (greater than 40,000).

I don't have any idea what to do now...

Edit: Boot.log reports "Port set to 1099 in jboss:service=Naming", so apparently it is listening on the right port...

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.