TheRemote / MinecraftBedrockServer

Sets up a Minecraft Bedrock dedicated server on Ubuntu with options for automatic updates and running at startup
https://jamesachambers.com/minecraft-bedrock-edition-ubuntu-dedicated-server-guide/
MIT License
811 stars 173 forks source link

Invalid user userxname #73

Closed terrykimura closed 3 years ago

terrykimura commented 3 years ago

https://github.com/TheRemote/MinecraftBedrockServer/blob/ad339020db34387ea991a9b5e57b9ebd84dc2e79/start.sh#L35

Who is userxname? This (predictably) causes the following error:

terry@os3-354-10066:~/minecraftbe/Bedrock-KIX$ ./start.sh 
[sudo] password for terry: 
chown: invalid user: 'userxname'
Checking for the latest version of Minecraft Bedrock server ...
<SNIP>
NanoCode012 commented 3 years ago

I also got this error. Even, after I changed it to my real username, I can't start Minecraft now.

# SetupMinecraft.sh
Start Minecraft server at startup automatically (y/n)?n
Setup is complete.  Starting Minecraft server...
Minecraft server failed to start after 20 seconds.
There is no screen to be resumed matching Test.
# start.sh
Minecraft Bedrock server is up to date...
Starting Minecraft server.  To view window type screen -r Test
To minimize the window and let the server run in the background, press Ctrl+A then Ctrl+D
# nothing appear
Goodsoldier commented 3 years ago

same problem

terrykimura commented 3 years ago

@NanoCode012 @Goodsoldier The issue with the server not starting is likely because of https://github.com/TheRemote/MinecraftBedrockServer/issues/74, tl;dr bedrock_server lost its executable bit for some reason, and chmod +x fixes it. Now my Minecraft server runs, still with this error message invalid user: 'userxname'.

NanoCode012 commented 3 years ago

Re-running Setup now works! The owner fixed the bug really quickly.

TheRemote commented 3 years ago

Hey guys,

Sorry about this, I was working with people on this bug via jamesachambers.com and didn't see it here.

This can happen if you reuse a old SetupMinecraft.sh script as well since the old version of the script didn't look for userxname in the systemd service. Go ahead and remove the old version of SetupMinecraft.sh and run it with the fresh one and it should fix your service/userxname issue!