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

Creating new server? #23

Closed
polkunus opened this issue Jun 17, 2012 · 26 comments
Closed

Creating new server? #23

polkunus opened this issue Jun 17, 2012 · 26 comments
Assignees

Comments

@polkunus
Copy link

I don't understand/ it doesn't work.

Does this script install the server.jar or do I get it myself? And if I do get it myself where exactly do I put it? It would be great for this script to be specific when something doesn't go as planned. There aren't even any errors as to why my server isn't even starting.

Right now its just stuck at "Starting server"

I'm trying to run a server from scratch, so I use the create new server command. The script didn't install the minecraft_server.jar so I went ahead and installed it myself. I threw it in the jar folder and still nothing. Nothing happens. The documentation doesn't really help either....

@polkunus
Copy link
Author

With default settings, the script does not make a jar folder or world folder. So I make a jar folder

so I rename the minecraft_server.jar to server.jar and still yet all I'm getting is "Starting Server..."

@polkunus
Copy link
Author

So I tried to figure out what on earth "jargroups" were since the documentation said nothing about them.

I tried creating one, but its telling the jargroup doesn't exist. Which doesn't really make sense because well, I'm trying to create something that doesn't exist and its telling me I can't create it because the thing I'm trying to create does not exist:

/opt/msm/jars# msm jargroup create test http://www.minecraft.net/download/minecraft_server.jar
Creating jar group... -su: /opt/msm/jars/test/target.txt: No such file or directory
Done.
There is no jar group with the name "test".

@polkunus
Copy link
Author

So after hours of playing around I finally found a solution for this thing to work.

I was guessing that jargroups are the issue, MSM could not find a proper server.jar to work with. After some fiddling, I create a jargroup manually by creating a folder called "JG1" inside "jars", then moving "server.jar" (the mc_server.jar) to "JG1" and finally running "msm jar JG1 server.jar and it finally worked.

I highly suggest putting this in the installation wiki since its essential to the setup. It also seems like I'm either not using the jargroup command properly or its broken because I simply cannot get it to work so I'd have to manually move the files and create the folders myself.

@polkunus
Copy link
Author

hmm, now I'm having another issue. After going through and double checking write perms for folders that msm writes to... I'm getting "hangs" whenever I issue a command.

Msm would start a server for example and say "Done" but any other command like backup or stopping for example would just hang. :/

@polkunus
Copy link
Author

msm stop
There are several suitable screens on:
    3597.msm-AfterKraft (06/16/2012 11:51:48 PM)    (Detached)
    3374.msm-AfterKraft (06/16/2012 11:49:56 PM)    (Detached)
Use -S to specify a session.
Server "AfterKraft" was running, now stopping:
    Issued the warning "SERVER SHUTTING DOWN IN 10 SECONDS!" to players.
    Stopping after 10 seconds.
All servers will have been issued the stop command... in 0 second.There are several suitable screens on:
    3597.msm-AfterKraft (06/16/2012 11:51:47 PM)    (Detached)
    3374.msm-AfterKraft (06/16/2012 11:49:55 PM)    (Detached)
Use -S to specify a session.
                                                      Now.
Ensuring server "AfterKraft" has stopped... 

@polkunus
Copy link
Author

The warning never makes it to players either.

@polkunus
Copy link
Author

Ok so I got most of the hanging issues done (it was a permissions thing, I just chmod 777 -R the entire opt folder for now). However the "forcing save" still hangs... Is this a bukkit issue? Since the worldstorage folder is gone because of bukkit does it conflict with saving at all?

@polkunus
Copy link
Author

Ok well it looks like most of the hanging is back again.

Its usually when I'm backing up worlds, backing up server, restarting, or saving.

That and the worldstorage thing are the only two issues I'm having.

Hopefully you didn't take the time reading through any of this... It would be exhausting

@marcuswhybrow
Copy link

Firstly thanks @polkunus for the detailed information, it's a massive help. Lets tackle each of your problems:

Creating a server

You fixed it correctly by chmod-ing the /opt/msm directory—and its contents—to 775. This step should have been mentioned in the install instructions, and thanks to you it now is.

Jar groups and Stopping

I have now added jar groups to the server creation section in the installation docs, which wasn't there before. The problem you are having however is that msm commands must be issued as the root user or the USERNAME specified in the config. So just add sudo to the start of your commands and I expect they will work correctly.

World folder

Currently when a server starts up for the first time, it always creates it new world directly in the server folder, and not a worldstorage folder. I have created an improvement issue (#26) for this, and will add it in a future version.

I have also added a not on this in the installation docs until the behaviour is changed.

Improvements

You have helped me identify some issues with MSM, the primary one seems to be that commands need to be strict about which user is calling it, and provide better error messages when that user is incorrect.

Secondly I agree that the starting... output is far too opaque, and could use some more information and report errors if the server does not start.

I have added improvement issues for both the the user problem (#24) and the starting output issue (#25).

Since I have created individual issues for the specific problems identified, I will consider this issue closed. If you have more to add, be sure to do it on one of issues #24, #25 or #26 if it fits them.

@polkunus
Copy link
Author

I'm still having an issue with not being able to restart/start etc. I wasn't in need of sudo because I was on the root user name. After switching to sudo, as you suggested, I'm still not able to save or restart or whatnot.

@marcuswhybrow marcuswhybrow reopened this Jun 17, 2012
@marcuswhybrow
Copy link

Could you tell me the version of MSM you are running, if you downloaded all the files, check CHANGELOG.markdown for the most recent item.

If you followed the wiki installation instructions and wget-ted the individual files the run the msm version command. The version command was introduced in 0.2.2, and—because of bug—shows 0.2.5 even for version 0.2.6 (now fixed in new downloads).

From what you have said so far I would say you are at 0.2.5 or less. Anyhow, this will prevent me wasting time looking at the wrong code.


Also you mentioned your world is not in the worldstorage folder, MSM only back's up worlds that are in that folder and generally expects them to be there, anywhere else, and they are invisible to MSM. You should (when your server is stopped-I know your having problems with that too) move the world folder into a directory you create in the server folder called "worldstorage". Although I don't think that's the cause of the save-all hang, since it's all handled by the server itself, not MSM.


In terms of stopping/starting issues, first try msm AfterKraft stop instead of the global msm stop since it's less complicated code. The reason it's not being stopped is there are somehow multiple screen sessions open for the same name—usually caused by a crash—and MSM can't decide which one to use (I've created a bug for this). I'll look into guarding against this If you need to stop them try looking for theirprocess id's using ps and issuing the kill command to it:

$ ps aux | grep screen
...
username process_id bla bla bla
...

$ sudo kill -9 process_id

In summary, I require the MSM version number it you can get it, and also the Bukkit version you are using would be nice.

@polkunus
Copy link
Author

I had 2.5beta, I tried updating and now I got

/usr/local/bin/msm: line 2290: (-1): substring expression < 0

I just copied and pasted the wget link you had in your installation page - I'm guessing its the newest version

@marcuswhybrow
Copy link

I have updated again to version 0.2.8 (commit 57f4af9). If you install 0.2.8 like you just did 0.2.7, it will protect against this error, and instead give a detailed reason why it's happening, try it out and paste the result back here.

@polkunus
Copy link
Author

Its still giving me that same error, I can't even tell what version I'm using. I tried to wget and refollow all the instructions, but I still got nothing.

I recently deleted my local bin folder (not the usr bin) recently and I was wondering if that effected msm at all

@polkunus
Copy link
Author

(and yes I did recreate the syslink in the local/bin folder)

@marcuswhybrow
Copy link

If you are in fact using version 0.2.8 Beta, that error message you had before should have changed from line 2290 to line 2292, so something like this:

/usr/local/bin/msm: line 2292: (-1): substring expression < 0

Is that the case? (Note to self: It seems like a good idea to have a version command that always works, and doesn't fail with the others in cases like these.)

@polkunus
Copy link
Author

root@AfterKraft:/home/polkunus# msm
/usr/local/bin/msm: line 2292: (-1): substring expression < 0
root@AfterKraft:/home/polkunus# 

yep.

You're welcome to ssh to my server with root access if you'd like.

@marcuswhybrow
Copy link

That's very kind, send the information to marcus@marcuswhybrow.net if you want to do that. I'll find out what's up pretty quickly.

Do you hand out your root password often? :D

@polkunus
Copy link
Author

lol no I do not,

I've been working on this mc server and I just received all the parts (brand spanking e5-1620 (not even available in stores yet) on a new release mobo, completely out of manufacture new parts - the old thing I didn't receive is the ecc ram) and I was looking for an init script because I dislike the bloatedness of most minecraft cmses. I was thinking of using https://github.com/endofzero/Minecraft-Sheller , but its a bit too old and I noticed your link recently added to the minecraft wiki.

The server is currently hosting the mc test/build server for staff inside the temp folder of /AKMC with a different init script. I'm testing your init script in the default /opt folder but plan to move to /AKMC later. (AKMC is a raid 1 array with 2 ssds).

forum.afterkraft.com is our community (don't worry, you won't touch this because the forums and ts are hosted on a different box).

Should be an email in your inbox

@polkunus
Copy link
Author

oh and where are my manners?

Thanks a bunch!

@marcuswhybrow
Copy link

I won't hear it, you've helped me a bunch.

And I have identified and fixed the problem!

@polkunus
Copy link
Author

oh wow really? I helped? cool, :D

out of curiosity, what was the issue?

it wasn't something stupid was it? was it..? Did I forget to do something :(

@marcuswhybrow
Copy link

No no, it seems a particular substring command syntax doesn't work in all cases. Line 2292 was:

regex="${regex:0:(-1)}\$"

and I changed it to

regex="${regex:0:${#regex}-1}\$"

A bit more verbose, but far more robust!

Seriously, thanks for your help.

@polkunus
Copy link
Author

ofc, no problem

And thank you for helping me out and coding this awesome init script!

I'll go ahead and post anymore issues if I have them

@marcuswhybrow
Copy link

If you have any more problems with my script, another good one is minecraft-init, which is what I used before MSM, and still use on one of my servers. MSM evolved out of that, so it should feel similar (indeed it has similar commands). It's a lot simpler due to the fact it can only handle a single server, but that might be the right choice for you. Check it out anyway.

@polkunus
Copy link
Author

oh yeah thanks, I've looked at that script before, I'm actually (if I
remember correctly) using this exact init script while I'm trying to get
yours to work. Your init is a bit more polished and utilizes things like
screen with easier commands that my admins can understand.

Thanks though!

On Mon, Jun 18, 2012 at 2:27 AM, Marcus Whybrow <
reply@reply.github.com

wrote:

If you have any more problems with my script, another good one is
minecraft-init, which is what I used before MSM, and
still use on one of my servers. MSM evolved out of that, so it should feel
similar (indeed it has similar commands). It's a lot simpler due to the
fact it can only handle a single server, but that might be the right choice
for you. Check it out anyway.


Reply to this email directly or view it on GitHub:

#23 (comment)

@ghost ghost assigned marcuswhybrow Jul 20, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants
@marcuswhybrow @polkunus and others