Results 1 to 1 of 1
Thread: JAR server timeout
- 10-24-2011, 07:22 PM #1
Member
- Join Date
- Oct 2011
- Posts
- 4
- Rep Power
- 0
JAR server timeout
Hey guys,
I've got a weird question I can't seem to figure out. I have a chat/game server that compiles into a JAR and is run simply using the java -jar Server.jar command. It was running on a Windows Server machine for months, without interruption. You could disconnect come back days later and it would work. Now, we've upgraded it to a CentOS linux distribution, in a VPS environment. I issue the command over SSH and the server starts. Background and disown and it stays running even after closing. But after a day or so, it will all of a sudden no longer accept any connections. What I really don't get is I kill the process and issue the command again, no dice. Won't even see an incoming connection. But, if I FTP in and delete the JAR and reupload it, then issue the command on SSH, it will run and connect again.
Any ideas are greatly appreciated.
Thanks,Java Code:ss = new ServerSocket(port); ss.setPerformancePreferences(0, 1, 2); ss.setReuseAddress(true); toLog("TPC Games chat server is now listening on port " + ss); while (true) { Socket s = ss.accept(); s.setKeepAlive(true); s.setPerformancePreferences(0, 2, 1); s.setReuseAddress(true); s.setTcpNoDelay(true); toLog("New client connection with " + s + ". Wating for username..."); String un = null;
Adam
Similar Threads
-
Timeout waiting for Oracle WebLogic Server v10.3 at localhost to start
By gopikrish81 in forum EclipseReplies: 2Last Post: 09-24-2011, 08:53 AM -
Implement a timeout
By pjmorce in forum Advanced JavaReplies: 5Last Post: 04-27-2010, 02:36 AM -
Socket Timeout?
By Moncleared in forum New To JavaReplies: 1Last Post: 09-12-2009, 04:12 AM -
session timeout
By nmbalaji in forum JavaServer Pages (JSP) and JSTLReplies: 4Last Post: 12-12-2008, 04:04 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks