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.