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

mapping never ends #238

Closed NoZdageek closed 4 years ago

NoZdageek commented 4 years ago

Hi,

I got an issue since a few days/weeks. The mapping is supposed to happen every 3 hours, but the overviewer process never ends. I thought that maybe my world was too big, so I tried to create a test world, fresh and shiny. When I run "mscs map test2", it just seems to hangson the following:

mscs map test2 The version manifest cache was out of date, it has been removed. Downloading current Minecraft version manifest. Running Minecraft Overviewer mapping: test2

The log looks like this:

tail -f /opt/mscs/worlds/test2/logs/overviewer.log 2020-02-14 19:09:37 W Sorry, you requested dimension 'nether' for the render 'nether-render', but I couldn't find it.


2020-02-14 19:09:37 W Sorry, you requested dimension 'end' for the render 'end-render', but I couldn't find it. 2020-02-14 19:09:37 Initialized an empty UUID cache. 2020-02-14 19:09:37 Done handling POIs 2020-02-14 19:09:37 Writing out javascript files 2020-02-14 19:09:37 Wrote UUID cache with 0 entries. 2020-02-14 19:09:37 Done 2020-02-14 19:15:48 Welcome to Minecraft Overviewer! 2020-02-14 19:15:48 Generating textures...


2020-02-14 19:16:04 W The last render for 'overworld-render' didn't finish. I'll be scanning all the tiles to make sure everything's up to date.


2020-02-14 19:16:04 W The total tile count will be (possibly wildly) inaccurate, because I don't know how many tiles need rendering. I'll be checking them as I go.


2020-02-14 19:16:04 W The last render for 'overworld-caves-render' didn't finish. I'll be scanning all the tiles to make sure everything's up to date.


2020-02-14 19:16:04 W The total tile count will be (possibly wildly) inaccurate, because I don't know how many tiles need rendering. I'll be checking them as I go.


2020-02-14 19:16:04 W Sorry, you requested dimension 'nether' for nether-render, but I couldn't find it.


2020-02-14 19:16:04 W Sorry, you requested dimension 'end' for end-render, but I couldn't find it. 2020-02-14 19:16:04 Preprocessing... 2020-02-14 19:16:20 Rendered 0 of 2730. 0% complete. ETA: ------

And nothing more... I generated the map manually with overviewer and a very simple config files, it's done within a minute.

Everything is up to date, the host, the overviewer program and the minecraft server.

What is wrong with my setup ?

NoZdageek commented 4 years ago

Additional info: if I run manually:

overviewer.py --config="/opt/mscs/worlds/syberius/overviewer-settings.py"

It works !

zanix commented 4 years ago

The script pretty much runs the exact command https://github.com/MinecraftServerControl/mscs/blob/master/msctl#L1702

The only thing I can think of is the generated map files are not owned by the minecraft user

I would chown all of the map files to the minecraft user

chown -R minecraft: /maps/full/path
NoZdageek commented 4 years ago

Hi,

Thanks you for your answer. Actually, when runnunig manually I was using "sudo -u minecraft overviewer.py...." because my main user of course hasn't the rights on /opt/mscs/maps/*. I don't understand what could go wrong.

NoZdageek commented 4 years ago

Here is a complete new test:

myuser@myserver:~$ mscs create test3 25566
Creating Minecraft world: test3.
myuser@myserver:~$ mscs start test3
The version manifest cache was out of date, it has been removed.
Downloading current Minecraft version manifest.
/usr/local/bin/msctl: line 1282: 19485 Terminated              nohup sh -c "tail -f --pid=\$$ $WORLD_DIR/console.in | {
    $SERVER_COMMAND mscs-world=$1 > $WORLD_DIR/console.out 2>&1; kill \$$;
  }" > /dev/null 2>&1
.
myuser@myserver:~$ sudo nano /opt/mscs/worlds/test3/eula.txt

(here I edit the eula.txt to TRUE)

myuser@myserver:~$ mscs start test3
The cached copy of the version manifest is up to date.
Use the force-update option to ensure a new copy is downloaded.
.

(now I join the game to be sure that the chunks are generated)

myuser@myserver:~$ mscs backup test3
Backing up Minecraft Server: test3.
myuser@myserver:~$ mscs map test3
The cached copy of the version manifest is up to date.
Use the force-update option to ensure a new copy is downloaded.
Running Minecraft Overviewer mapping: test3

Aaaaand it's stuck here. The map generation should take a minute at maximum.

zanix commented 4 years ago

Shoot, I'm not sure what is happening. It doesn't make sense to me that running the same command works but running it through mscs hangs.

sandain commented 4 years ago

Sorry about my slow response. @NoZdageek, are you still having issues with this?

My mapping is not even working right now. I'll need to first track down if it is a script error or a local configuration error, then I can look into this issue. My time for this is going to be minimal going forward, but I'll at least attempt to replicate the issue.

Roflicide commented 4 years ago

@NoZdageek Try deleting all versions except the one you are using for the world in /opt/mscs/.minecraft/versions and see if it fixes the issue--this fixed it for me. Also, ensure that mscs-client-version and mscs-server-version are set to the same value in the world's mscs.properties.

sandain commented 4 years ago

It appears that the Overviewer APT repository is messed up (see https://github.com/overviewer/Minecraft-Overviewer/issues/1595), so I had to install Overviewer from source. However, now that I have Overviewer working, I am not able to replicate the issue that you are seeing @NoZdageek.

Roflicide commented 4 years ago

@sandain I was actually able to get this same error, mostly by chance. How I got it was if you download more than 3 versions (I had multiple old versions of minecraft in the default /opt/mscs/.minecraft folder) and then try to run the map command it will hang.

When I debugged it, it seemed like an error in overviewer's code. Overviewer seemed to check each version for a missing texture that actually was located in overviewer's core util files, but it would only check those util files after checking each of the minecraft versions. The problem was that after checking 3 minecraft versions overviewer hung. I believe running the command overviewer.py --config="/opt/mscs/worlds/syberius/overviewer-settings.py somehow changes what textures it looks at or forces it to look at a certain texture directory so the hanging problem doesn't occur

sandain commented 4 years ago

I have seven versions of the client in that directory with no issue:

$ ls /opt/mscs/.minecraft/versions/
1.12.2  1.13.2  1.15.2  1.8.9  20w07a  20w19a  20w20a
NoZdageek commented 4 years ago

Hi, I deleted every old versions in the .minecraft/versions, and kept only 1.15.x. And it worked ! Thank you @Roflicide for the idea, thank everyone for giving time about this issue. I'll set it back on cron and monitor it for the next few days, but it seems OK.

Roflicide commented 4 years ago

No problem.

@sandain I'm not sure why you can't seem to reproduce the issue. Maybe it has to do with the version of overviewer you're using? I managed to get overviewer working through apt, I didn't have to build it from source. Im running debian. im not sure what else could be going on here

sandain commented 4 years ago

@Roflicide Ubuntu moved to a newer version of python than Debian, breaking the single APT repository design that Overviewer uses. They really need to split their repository so that differences between Ubuntu or Debian versions can be accounted for.

It sounds like this is an Overviewer bug. I can only guess on the reason it worked outside of the script: the $HOME directory was different (/opt/mscs/ vs /home/something), and hence the offending client version was not there.

NoZdageek commented 4 years ago

My server is on Ubuntu (16.04) and I can use overviewer from the apt repo. Maybe you're on a higher version ?

sandain commented 4 years ago

I'm currently on Ubuntu 19.10, with a likely upgrade to 20.04 coming soon...

sandain commented 4 years ago

I'm going to close this issue, since it is probably not our bug. Thanks for the help debugging the issue @Roflicide. @NoZdageek, feel free to reopen the issue it if mapping freezes up again.