Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop/restart commands hang when using snapshot 12w27a #43

Closed
mdeabreu opened this issue Jul 9, 2012 · 11 comments
Closed

Stop/restart commands hang when using snapshot 12w27a #43

mdeabreu opened this issue Jul 9, 2012 · 11 comments
Assignees
Labels

Comments

@mdeabreu
Copy link

mdeabreu commented Jul 9, 2012

When using the most recent snapshot (12w27a) using the stop or restart command hangs waiting for the server to stop. I suspect this is because when the server stop the log message is different but am not sure.

@ghost ghost assigned marcuswhybrow Jul 9, 2012
@marcuswhybrow
Copy link

From watching the snapshot myself, I would agree. This, as you have surmised, makes MSM hang as it is expecting a different non-existent message.

It is possible (yet a clunky solution) for you to configure what MSM expects from an individual server's logs: See the server configuration wiki page and the Log Confirmation section for how to override that in your servers server.properties file.

However I also want admins to be able to disable this feature completely, or on an individual setting basis, and fall back to fixed time based waiting seen in other init scripts. This would allow new Minecraft versions to be ran without hangs straight away.

I am also planning to refactor the above linked confirmation configuration approach to divide into files for different versions. Allowing MSM to build a collection of different configurations for use in all circumstances.

Thanks for writing up this issue, I will leave it open until I have at least implemented a way to fall back gracefully from this problem.

@mdeabreu
Copy link
Author

mdeabreu commented Jul 9, 2012

Ah thank you for reminding me about being able to change expected log messages. Sounds like you have some good ideas to future proof this.

However, looking into this problem it seems that when stopping a server the script doesn't look at the log file instead it looks for the pid (see server_wait_for_stop())... And yet it still hangs...

Just a little more information, hopefully that'll help. Thank you very much for this awesome set of scripts!

@marcuswhybrow
Copy link

Ah, you are quite right. Could you post the exact output you do get so that I might follow the logic path myself.

Thanks for compliment by the way, it means a lot.

@mdeabreu
Copy link
Author

mdeabreu commented Jul 9, 2012

matthew@li485-70:/opt/msm/servers/snapshot$ sudo msm snapshot stop
Issued the warning "SERVER SHUTTING DOWN IN 10 SECONDS!" to players.
Shutting down... Now.
Forcing save... ^C
matthew@li485-70:/opt/msm/servers/snapshot$ 

and here is the server.log:

2012-07-09 14:11:52 [INFO] Saving...
2012-07-09 14:11:52 [INFO] Saved the world

Ah, it's hanging on the save function and waiting for the proper log message. You're original comment is correct and the expected log message just needs to be updated.

If I understand the wiki correctly I need only add the line msm-confirm-save-all="Saved the world" to the server.properties file, unfortunately that doesn't seem to work either...

No problem, these are by far the most full featured set of scripts I've found and it makes running and admining my little server really easy.

@marcuswhybrow
Copy link

msm-confirm-save-all=Saved the world (without the quotations) would work with your current version. However I have updated MSM (to version 0.4.3) to accept quotations around server.properties values exactly as you have written. You can update to this version by replacing your msm file:

sudo wget https://raw.github.com/marcuswhybrow/minecraft-server-manager/latest/init/msm -O /etc/init.d/msm

@mdeabreu
Copy link
Author

Ahh... The quotes, it's always the quotes haha Thanks! Works perfectly!

@marcuswhybrow
Copy link

No problem.

@MrShortie
Copy link

I also found I needed the following two lines:
CONFIRM_SAVE_ON="Turned on world auto-saving"
CONFIRM_SAVE_OFF="Turned off world auto-saving"

This was an older MSM version on a server that's not active any more, so used server.conf rather than the new syntax.
It was also with a weekly build from a couple of weeks ago, but I'm guessing the new strings will be the same.

@marcuswhybrow
Copy link

Thanks for the addition, yes they are the same across the old server.conf and the new server.properties.

@jvz
Copy link
Contributor

jvz commented Aug 4, 2012

Naturally, this is still an issue in Minecraft 1.3.1. The main problem is still that the three world save messages have all changed in the server itself. Are these messages matched via regexp? If so, a simple patch for now could be implemented by just checking for both the old and new message.

@marcuswhybrow
Copy link

Ah that's a better an simpler idea than the one I had of having separate configurations for each Minecraft version. I'll implement something along those lines.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants