MinecraftServerControl / mscs

Powerful command-line control for UNIX and Linux powered Minecraft servers
https://minecraftservercontrol.github.io
BSD 2-Clause "Simplified" License
485 stars 62 forks source link

Fail to run in container #267

Closed KisonHe closed 3 years ago

KisonHe commented 3 years ago

Context (Environment)

Proxmox Virtual Environment, Linux version 5.4.65-1-pve (build@pve)

With vanilla container of Ubuntu 1804

Steps to Reproduce

  1. Create a new container in proxmox
  2. Follow the install instructions from the docs

    apt update && apt upgrade apt-get install default-jre perl libjson-perl libwww-perl liblwp-protocol-https-perl python make wget git rdiff-backup rsync socat iptables git clone https://github.com/MinecraftServerControl/mscs.git && cd mscs make install

  3. Create a new world

    mscs create world

  4. Make a dir for minecraft so mscs will not fail to restore initial working directory

    mkdir dir chown minecraft:minecraft dir && cd dir

  5. Start the world and get the error

    mscs start world

This will get output like

The cached copy of the version manifest is up to date. Use the force-update option to ensure a new copy is downloaded. Starting Minecraft Server: worldError starting the server: couldn't retrieve the server's process ID.

sandain commented 3 years ago

First, make sure that you set eula=true in the eula.txt file for the world. If that was already done and still fails, please post a copy of the console.in and console.out files for the world.

KisonHe commented 3 years ago

Thanks!

console.out Error: Invalid or corrupt jarfile /opt/mscs/server/minecraft_server.1.16.4.jar

After force-update it works. I don't know why when I start the world first time it thinks the copy of manifest is up to date. Perhaps some other problem.

zanix commented 3 years ago

My guess is that the server jar didn't download correctly. I bet the filesize of /opt/mscs/server/minecraft_server.1.16.4.jar was 0 then a force-update re-downloaded the file. I wonder if adding a check for a 0 filesize would be a good idea