Server Stops Abruptly

112 views
Skip to first unread message

Bradley Erickson

unread,
Jan 30, 2014, 2:43:50 PM1/30/14
to jets...@googlegroups.com
I followed this tutorial to get a simple server up and running.  All it does is pass trivia questions to clients at regular intervals.  The client catches the questions and updates it's view.  All of this works perfectly fine when run on my local windows machine using localhost.  It will run for hours on end serving up questions.  My next step in this prototype was to move it to an Ubuntu server running on Amazon's EC2 instances.

With the help of the author of the above tutorial, I was able to get the server to actually start running on the Linux machine.  I have a log file catching my system out.  It show my server loads the questions, then gets down to the the "Started servers" that is in the lost decade example (I left that in).  On my local machine, it will then system out each question it is on at each interval.  However, on the linux box, it hangs for a few seconds and exits altogether.  My GameServer.log file that was created by Log4j is empty.  The only errors I get when I run the jar are:

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation

So, I am assuming my GameServer.log isn't logging any errors?  I compiled my jar using maven in eclipse, and have all libraries included.  Here is the command I run on the jar:

java -classpath ".:lib/*:question-server-0.0.1-SNAPSHOT.jar" -Dlog4j.configuration=GameServerLog4j.properties com.mygame.MyGameServer > game-start.log

I have also opened the Amazon client firewall to the ports specified in the nadron.properties file.  For some reason, the jar just stops running.  Any ideas on a direction I need to go or info I need to provide would be great.

Abraham Menacherry

unread,
Jan 30, 2014, 4:25:36 PM1/30/14
to jets...@googlegroups.com
Since the LDGame is still there in the application, could you try to execute this game from your browser and see if the server logs anything? Generally it should have logs about incoming connections.

Secondly could you run without the > game-start.log option and see if it logs any exceptions. 

Third option is to see if you have some heap dump (usually a file java_pid.hprof ) will be created in the executing directory itself. If so please upload it somewhere so that I can take a look.

Bradley Erickson

unread,
Apr 4, 2014, 2:00:49 PM4/4/14
to jets...@googlegroups.com
My boss only has me working on this in between projects, as this is secondary to our primary business.  So, it's been a few months.  I just wanted to leave this reply here in case anyone else was having problems.  I believe this had to do with my server environment.  I ended up wiping out the instance and starting over because of some problems I had with running apache on the same instance, and the game server no longer exhibits the early exit problem.  I can connect to it just fine now.  I wish I had kept more information about my earlier environment so I could compare them and come to a conclusion, but I am just pushing forward for now since the information is lost.
Reply all
Reply to author
Forward
0 new messages