MinecraftServerControl / mscs

Powerful command-line control for UNIX and Linux powered Minecraft servers

Home Page:https://minecraftservercontrol.github.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

unable to import world

TheRanker opened this issue · comments

image

it just tells me the directory doesn't contain a world. it most certainly do, as its running currently in another screen. this is 1.16.5. i dont know what else to try .. ps. im using sudo just to hammer the command in and make sure it runs. i know im in as root lol also this is ubuntu 20.04 focal fisa.

The import command requires a full path to the directory, this should probably be added to the docs

The import command requires a full path to the directory, this should probably be added to the docs

image
full path.. still same error. also did this for 5 hours yesterday.. used full paths there too. didnt work.

If you are in the folder that contains the server.properties file, the following should work:

mscs import . Val32Server 25565

The . means current folder.

If you are in the folder that contains the server.properties file, the following should work:

mscs import . Val32Server 25565

The . means current folder.

image
failed

Odd. let me go audit the code real quick and see if I can figure this out. I don't have a test server right now (in the middle of a move), so I can't try this myself.

It looks like a permissions issue, I think. The command is failing at https://github.com/MinecraftServerControl/mscs/blob/main/msctl#L2641 which is checking to make sure that both . and ./server.properties exist and are readable.

If you haven't already done so, try:

sudo mscs import . Val32Server 25565

It looks like a permissions issue, I think. The command is failing at https://github.com/MinecraftServerControl/mscs/blob/main/msctl#L2641 which is checking to make sure that both . and ./server.properties exist and are readable.

If you haven't already done so, try:

sudo mscs import . Val32Server 25565

image
still same. :(

Could you provide the results of ls -la while in the world folder?

Could you provide the results of ls -la while in the world folder?

image

I don't see a server.properties file in that directory listing. Is it in the serverconfig folder? This might be complicated if so...

the server.properties is not located within the world folder..... its in the previous folder.. /home/theranker/minecraft/val32server/

You need to be in the same folder as the server.properties file when executing the import.

Could you provide the results of ls -la while in the world folder?.

that was your questoin.. i followed ur directions.. i got you the listing in the world folder. as you asked.

server.properties is not located within the world folder.. never have been. its seperate from world.

Sorry to confuse. You have world specific files (which absolutely includes the configuration file for the world, server.properties) mixed in with server files, so it is a little confusing

i have a minecraft folder .. called val32server... which i have a world created on called Val32Server . it can be confusing if not use to it. lol

my server.properties is in my minecraft folder thats starts the jar. it is not located within a world folder... its basically in the main folder to start minecraft along with my startup scripts and such. which also contains the jar.. and folder for the world.

dont believe you mean to tell me to put the server.properties in the same folder that the world files are in.

Ok. Lets rule out the script and just test the section where the error happens. Try the following command in the same folder that contains the server.properties file:

if [ ! -d "." ] || [ ! -r "./server.properties" ]; then
  printf "Directory containing a Minecraft world was not provided.\n"
fi

my server.properties is in my minecraft folder thats starts the jar. it is not located within a world folder... its basically in the main folder to start minecraft along with my startup scripts and such. which also contains the jar.. and folder for the world.

dont believe you mean to tell me to put the server.properties in the same folder that the world files are in.

no. don't make any changes to your config

Ok. Lets rule out the script and just test the section where the error happens. Try the following command in the same folder that contains the server.properties file:

if [ ! -d "." ] || [ ! -r "./server.properties" ]; then
  printf "Directory containing a Minecraft world was not provided.\n"
fi

done... nothing appeared on screen.
image

ohh. something got messed up with the formatting of that command. you are still stuck in the if statement.

Try this oneliner instead:

if [ ! -d "." ] || [ ! -r "./server.properties" ]; then printf "Directory containing a Minecraft world was not provided.\n"; fi

Note: you probably have to hit ctrl-c to get back to your normal prompt.

i cant paste.. i hate this ssh crap lol

ohh, let me shorten it!

if [ ! -d "." ] || [ ! -r "./server.properties" ]; then echo "error"; fi

got it entered.a nd came back to root again
no errors
currently awaiting next command on the path

Ok. that is the expected result. If it had said error then we know something is wrong with that line.

However, this opens up the question of why that command works when you run it by hand, but fails when the script runs it!

I have a meeting to get to, so I can't help any more for a little bit. I'll give this some thought though and probably ask you some more questions later.

Ok. that is the expected result. If it had said error then we know something is wrong with that line.

However, this opens up the question of why that command works when you run it by hand, but fails when the script runs it!

I have a meeting to get to, so I can't help any more for a little bit. I'll give this some thought though and probably ask you some more questions later.

please by all means id love to get this worked out and fixed up. this sesems like a great way to setup some worlds and chron job some schedulted restarts. cant use the setup if i gotta create a new world with it :(

is it looking in the server.properties for a specific location for the world name? like a perticular line? or statement? mine is as follows... level-name=Val32Server located on line 21. if any of this helps ya when ur back at it :)

No, it is simply looking to make sure that the server.properties file exists at the location provided. I don't currently understand where the problem is at...

Okay, short meeting.

Let's try a full path just because:

mscs import /home/theranker/minecraft/val32server Val32Server 25565

Try it with sudo if that doesn't work.

Can you show the entire directory structure for your entire minecraft folder?
Also, I noticed there is a mscs folder in the same directory, did you install mscs using the make install or did you do the manual install, or is this just the git clone folder for the script?

Can you show the entire directory structure for your entire minecraft folder?
Also, I noticed there is a mscs folder in the same directory, did you install mscs using the make install or did you do the manual install, or is this just the git clone folder for the script?

the mscs was intially installed there. not realizing what folder i was in.
tree structure is quite long. so here it goes. lol i did the git clone folder in the mscs initially.
image
image
image
image
image
image

Okay, short meeting.

Let's try a full path just because:

mscs import /home/theranker/minecraft/val32server Val32Server 25565

Try it with sudo if that doesn't work.

same response, world folder not found :(
image

to note.... Shift + Insert .. is paste command. lol

Hmm. I don't understand what is happening. As far as I can tell, we are getting stuck where we shouldn't be...

Give me some more info on your setup. How did you install mscs? Did you use the make install method? What is the output of which mscs?

Hmm. I don't understand what is happening. As far as I can tell, we are getting stuck where we shouldn't be...

Give me some more info on your setup. How did you install mscs? Did you use the make install method? What is the output of which mscs?

i did the dependiencies.. as i already had one or two. have webmin also installed. then i did
git clone https://github.com/MinecraftServerControl/mscs.git && cd mscs
sudo make install

basically followed the install guide for it all

what identifies the folder as a world folder? is it just the string in server.properties for level-name= ?

Ok, great. That should simplify things. What is the output of:

which mscs

/usr/local/bin/mscs

It appears you are running all of these commands as root. Have you tried using a normal user?

It appears you are running all of these commands as root. Have you tried using a normal user?

im running it as root to avoid permission problems. i have the minecraft user setup i can use that but may run into perm issues.

just switched to minecraft user and ran into the same error
cant use sudo while minecraft cause that user not in a sudoer. and dont want them to be :D lol

Maybe the minecraft files need to be owned by the mscs user (minecraft)?

Maybe the minecraft files need to be owned by the mscs user (minecraft)?

that wouldnt matter if i ran it as root anyway.
id like to get it to work then i can worry about permissions for user minecraft.

Even if run by root, the mscs script calls everything using the minecraft user.

Try running these commands using your normal user, theranker.

Even if run by root, the mscs script calls everything using the minecraft user.

Try running these commands using your normal user, theranker.
same o error. :(
image

I still think it is a permissions issue. Try:

sudo chown -R minecraft:minecraft /home/theranker/minecraft/val32server
mscs import /home/theranker/minecraft/val32server Val32Server 25565

I still think it is a permissions issue. Try:

sudo chown -R minecraft:minecraft /home/theranker/minecraft/val32server
mscs import /home/theranker/minecraft/val32server Val32Server 25565

RESOLVED~
currently importing
image

holy cow. should have tried that to begin with. rofl. Let's update those docs

i did run that command beofre.. may have had a typo and missed somethign though lol

glad i could provide you guys with some tinkering :D and im very thankful in the support here!! lookin forward to usin this service :D

Where is the table flip emoji? I feel like that's appropriate here.

Where is the table flip emoji?

(╯°□°)╯︵ ┻━┻

So @TheRanker, since it appears you are using Forge, you will want to follow the directions at: https://minecraftservercontrol.github.io/docs/mscs/adjusting-world-server-properties/forge to get that setup as well.

So @TheRanker, since it appears you are using Forge, you will want to follow the directions at: https://minecraftservercontrol.github.io/docs/mscs/adjusting-world-server-properties/forge to get that setup as well.

o no wories..already taken care of :D hahaha

Docs are updated to add the permissions step.