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

Vulnerable to similar screen sessions #27

Open
marcuswhybrow opened this issue Jun 17, 2012 · 5 comments
Open

Vulnerable to similar screen sessions #27

marcuswhybrow opened this issue Jun 17, 2012 · 5 comments
Assignees
Labels
Milestone

Comments

@marcuswhybrow
Copy link

As seen in issue #23 (specifically this comment) MSM fails to stop servers when multiple screen sessions are found matching the expected name. Guards must be put in place to gracefully deal with this problem or eliminate it.

A solution may be to append salt data to the screen name on each start up, save that to file and check it subsequently. Or just be damn sure a screen session is dead when stopping servers.

@ghost ghost assigned marcuswhybrow Jun 17, 2012
@k1n6b0b
Copy link

k1n6b0b commented Aug 14, 2012

same problem here. somehow got 2 screens running and all msm commands stopped working (problem for me because I crontab start/stop my server). Posting to follow to resolution :)

@PugTsurani
Copy link

I fixed this by getting the PID of the Java process after spawning the screen session and saving it in SERVER_PATH/SERVER_NAME.pid. This is used to accurately determine if the server is running and prevents another screen session from starting. How do I give the changes back to the community? I'm new to GitHub.

@FabianN
Copy link

FabianN commented Dec 13, 2012

@PugTsurani
Start here: https://help.github.com/articles/set-up-git
Then go over 'Fork A Repository' and 'Be Social'

That should get you going.

@PugTsurani
Copy link

Awesome! Thanks for the tip, @FabianN.

@TrogloGeek
Copy link
Contributor

I had similar problem when a server name includes another (I had "zavxmieux" and "zavxmieux-test"), I solved it setting DEFAULT_SCREEN_NAME="msm-{SERVER_NAME}-#screen"
If this could be of any help...
There still is a problem if you change JAR_PATH or RAM on a running server because new SERVER_INVOCATION won't match the running process.
I plan to just issue an error when trying to change one of those two properties on a running server. But handmade modification of those msm-* properties is still a problem (which is not a problem for me, it will only be changed by using msm command on my server.
One dirty solution would be to temporary set SERVER_RAM and SERVER_JAR_PATH to wildcards and unset them right after when filtering ps output with grep...

Or, why not to filter grep output with SERVER_PATH instead of full SERVER_INVOCATION ?

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

6 participants
@marcuswhybrow @FabianN @k1n6b0b @PugTsurani @TrogloGeek and others