Page 1 of 2

Error occured when shutdown the server

PostPosted:Fri Feb 24, 2012 3:08 am
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                                                              
请按任意键继续. . .                                                             
                                                                                
                                                                                
                                                                                

Re: Error occured when shutdown the server

PostPosted:Sun Feb 26, 2012 6:54 am
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

Re: Error occured when shutdown the server

PostPosted:Sun Feb 26, 2012 7:11 am
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.

Re: Error occured when shutdown the server

PostPosted:Sun Feb 26, 2012 1:40 pm
by pavila
8)

Re: Error occured when shutdown the server

PostPosted:Sat Jun 30, 2012 12:46 pm
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?

Re: Error occured when shutdown the server

PostPosted:Sun Jul 01, 2012 5:09 pm
by jllort
shutdown.sh -s jnp://localhost:1099

Re: Error occured when shutdown the server

PostPosted:Fri Jul 06, 2012 10:47 am
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.

Re: Error occured when shutdown the server

PostPosted:Sun Jul 08, 2012 4:17 pm
by jllort
Was openkm started with 0.0.0.0 ? otherside change localhost by your ip if you started with ip

Re: Error occured when shutdown the server

PostPosted:Tue Jul 10, 2012 3:01 am
by Alexires
Started by script with:
Code: Select all
run.sh -b 0.0.0.0
The server did move locations recently, and crashed at some point without proper shutdown. May this have anything to do with it?

Re: Error occured when shutdown the server

PostPosted:Wed Jul 11, 2012 8:36 pm
by jllort
It means is not starting OpenKM ? You have moved location directories to other, have you changed new values into database ?

Re: Error occured when shutdown the server

PostPosted:Thu Jul 12, 2012 1:30 am
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).

Re: Error occured when shutdown the server

PostPosted:Thu Jul 12, 2012 10:45 am
by jllort
Same java version ?
Same jboss start / stop script ?
you start and stop with the same user ?

Re: Error occured when shutdown the server

PostPosted:Thu Jul 12, 2012 2:25 pm
by Alexires
Everything is the same.

Is there some kind of cache clear I can do, or something like that?

Re: Error occured when shutdown the server

PostPosted:Sat Jul 14, 2012 9:00 am
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

Re: Error occured when shutdown the server

PostPosted:Sun Jul 15, 2012 3:22 am
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...