Ahtenus / minecraft-init

Init script for minecraft and bukkit servers
402 stars 124 forks source link

is_running() appears to be creating busted .pid files #148

Open ajwharton opened 11 years ago

ajwharton commented 11 years ago

When I start the server using /etc/init.d/minecraft start is creates a pid file that is bogus. Example, the pidfile "server_screen.pid" on my Ubuntu box right now contains the following chars:

1014208341827910440918982452696

The pid is actually the beginning of the string, to whit:

andrew@plutonium:/opt/craftbukkit$ ps aux | grep java bukkit 1014 0.0 0.0 27028 1264 ? Ss 09:26 0:00 SCREEN -dmS server_screen java -Xmx6144M -Xms4096M -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalPacing -XX:ParallelGCThreads=2 -XX:+AggressiveOpts -jar craftbukkit.jar nogui bukkit 1015 15.9 13.1 7740936 1075532 pts/2 Ssl+ 09:26 18:17 java -Xmx6144M -Xms4096M -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalPacing -XX:ParallelGCThreads=2 -XX:+AggressiveOpts -jar craftbukkit.jar nogui

Not sure why, but when I delete the pid file on a running server and then shut it down, it creates a pid file with just the pid in it. Clearly, there are two competing pid file algos.

This is in the zip that I pulled on 8/17/2013

ajwharton commented 11 years ago

I think that this might be an artifact of the "Rogue Pidfile Found!" fix, BTW.