Ahtenus / minecraft-init

Init script for minecraft and bukkit servers
404 stars 125 forks source link

Getting spammed by "Rogue pidfile found!" #121

Open JunZuloo opened 11 years ago

JunZuloo commented 11 years ago

Whenever i try to use "/etc/init.d/minecraft start" i get spammed by the "Rogue pidfile found!" a few times, then i get "Still not running, waiting a while longer...".

Then i get some more "Rogue pid...(blabla)", and then "Failed to start, aborting." I get this every time I try to start the server after it's been shutdown.

Can also add that the PID in the .pid file is not the same as the one i get when i use "ps -ef", I'm new at PIDs so I'm not sure if it's an error.

Den-Valk commented 11 years ago

I am running into the same problem and am at a loss to do anything about it. I am running on a clean install of ubuntu 12.04, I have java installed an working, and I would be happy to provide any other information about my server. I just can't start it. On start it spamms "Rougue PID file!" 'Still not running..." etc. My bash -x is here http://pastebin.com/X2ZqP8sA I hope someone can help me find the problem. Thanks

Edit: I would also add, I can run the server with just a basic run script. It will start and run just fine. I just can't start it via ahtenus. It looks like the problem is with 'grep' and getting the screen session to launch, but I am not familiar with shell.

Den-Valk commented 11 years ago

To close my stretch of this thread. I have found this error can be caused by trying to allocate too much memory to java. I used the wrong USB drive when I installed my OS, and got a 32 bit OS instead of a 64bit OS. This means the max memory Java will allow itself to use is 2G. I was allocating 10G. (More than the OS was even able to utilize.) Try setting your Xms and Xmx to 2G and see if that fixes your problem JunZuloo. If it does, and if you do have more ram and want to use it, upgrade to a 64bit operating system. (I will be doing so this afternoon.)

Rovanion commented 11 years ago

Yes. Under a 32-bit kernel, even with PAE, each process may at maximum allocate ~4GB of memory.

2013/2/2 Den-Valk notifications@github.com

To close my stretch of this thread. I have found this error can be caused by trying to allocate too much memory to java. I used the wrong USB drive when I installed my OS, and got a 32 bit OS instead of a 64bit OS. This means the max memory Java will allow itself to use is 2G. I was allocating 10G. (More than the OS was even able to utilize.) Try setting your Xms and Xmx to 2G and see if that fixes your problem JunZuloo. If it does, and if you do have more ram and want to use it, upgrade to a 64bit operating system. (I will be doing so this afternoon.)

— Reply to this email directly or view it on GitHubhttps://github.com/Ahtenus/minecraft-init/issues/121#issuecomment-13034892.

Linkz57 commented 11 years ago

In line 20 of the config file, it chooses the run either the craftbukkit.jar file or the minecraft_server.jar file. By default it is set to craftbukkit, which I don't have installed. When I ran it with the craftbukkit settings, I got spammed by "Rogue pidfile found!" as well.

When I changed the config file to use the file I actually had, I.E changing line 20 from

SERVICE=$CB_JAR

to

SERVICE=$MC_JAR

it started working for me.