Stendhal server trouble shooting
Out of memory error / Lagging / Turn overflows
If while executing the server you get an out of memory error like:
Exception in thread "marauroad" java.lang.OutOfMemoryError: Java heap space
Or you have a lot of lagging and turn overflows after only a little time of running the server, edit your start up script (e.g. marauroa.dat) to replace
java -cp $LOCALCLASSPATH marauroa.server.marauroad -c blah blah blah
with
java -Xmx256m -cp $LOCALCLASSPATH marauroa.server.marauroad -c blah blah blah
Java programs are allocated 64Mb memory heap space by default and this is not enough for the stendhal server. The Xmx switch overrides the default.
Can't login!
You try logging in with the account you made when you first got Stendhal. It doesn't work in your server! You see, the MySQL database we created is the user and some other info database, meaning that we have a list of users, while the main server has it's own list. As granting public access to the MySQL database over there would be a security issue for the users on it, we must click on Create An Account and choose localhost as the server to join.
java.lang.<something>Error:
If your server error or server log contains something like:
Caused by: java.lang.<something>Error: <name>
And doesn't say InvocationTargetError, then you have a version mismatch between what stendhal version you're using and what marauroa version you're [[using. As a rule marauroa and stendhal are released together, so released versions should match. But if you get very latest CVS marauroa and not very latest CVS stendhal (say) then you may get this problem.
log4j:ERROR setFile(null,true) call failed
Did you get this?
log4j:ERROR setFile(null,true) call failed. java.io.FileNotFoundException: log/server.log (No such file or directory) at java.io.FileOutputStream.openAppend(Native Method) at java.io.FileOutputStream.<init>(FileOutputStream.java:177) at java.io.FileOutputStream.<init>(FileOutputStream.java:102)
It just means it can't find the log/ directory to create server logs in. So, make a directory called log in your stendhal_server directory. Ta da! (Logs may end up generating a lot of files and taking up space, it's not a default setting unless you choose to have them, by making the directory.)
Can't create admin
Want to be an admin? Now you can! It's easy! First create a file called admins.list - this is a plain text file. Put each account name which you desire to be an admin on a separate line. End with a new line. The names must be EXACT, or it will not work.
Windows users: if you hide your file extensions then it may actually be called admin.lists.txt - so unhide your file extensions and correct this.
Then go to the directory where you extracted stendhal-server-X.XX.zip, or equivalently, where you put your built server jars, and browse to data/conf (create it if it isn't already there). Add admins.list there. You may need to adjust the classpath which your server loads from, by adding a "." to the classpath.