docker-minecraft-server icon indicating copy to clipboard operation
docker-minecraft-server copied to clipboard

add TYPE Limbo

Open rampd2 opened this issue 4 years ago • 7 comments

I had the idea to add the server TYPE Limbo, because it's a standalone server (.jar) and not just any plugin etc.

I'm not sure if I understand the code enough to implement it, but just wanted to add my idea here and maybe later implement/contribute (to) it.

What is Limbo

A Limbo Minecraft Server is just a standalone (non forge, bukkit, spigot, fabric, sponge...) mc server which is a for every player independent newly predefined generated world (as far as I understood). It can for example be used as a afk server or if the server is full (queue).

If you need an example, there is the official __ of __ here (join in mc): mc.loohpjames.com Also the popular server Hypixel.net seems to have a limbo server, used as a afk space.

Full Links

Spigotmc.org: https://www.spigotmc.org/resources/limbo-standalone-server-lightweight-solution-for-afk-or-waiting-rooms-in-your-server-network.82468/ Github repo: https://github.com/LOOHP/Limbo His Jenkins build server: http://ci.loohpjames.com/job/Limbo/

rampd2 avatar Aug 06 '21 22:08 rampd2

Speaking of the links, that server type would go well with the bungeecord image I also maintain. This server type sounds like it should be easy to add. I'm out of town visiting family for a few days so I'll get to it after I get back.

itzg avatar Aug 07 '21 03:08 itzg

Limbo is now supported by the latest image

https://github.com/itzg/docker-minecraft-server#running-a-limbo-server

itzg avatar Aug 15 '21 18:08 itzg

Thank you for the implementation. I hope this answer is not "too late". I tried Limbo now twice but with no success (once with docker-compose, once with raw docker command).

The part that is a bit irritating to me, at least until I saw the code is that the file is named purpur-56.jar: https://github.com/itzg/docker-minecraft-server/blob/f5ea43b3d3699783588eecd6545f3b7b75fddb58/start-deployLimbo#L29

command:

docker run --rm -it -p 25560:25565 -e EULA=true -e TYPE=LIMBO --name limbo-test itzg/minecraft-server

compose:

version: "3.8"

#...

limbo1:
  image: itzg/minecraft-server:latest
  ports:
    - 25599:25565
  networks:
    - some-network-for-later
  environment:
    - TYPE=LIMBO
    - EULA=TRUE
  volumes:
    - ./limbo1-data:/data
    - /etc/timezone:/etc/timezone:ro

console + console error (maybe not the problem, just healthcheck ping that isn't handled correctly?):

[init] Running as uid=1000 gid=1000 with /data as 'drwxrwxr-x 2 1000 1000 4096 Aug 10 ti:me /data'
[init] Resolved version given LATEST into 1.17.1
[init] Resolving type given LIMBO
[init] Downloading Limbo from https://ci.loohpjames.com/job/Limbo/lastStableBuild/artifact/target/Limbo-0.6.1-ALPHA-1.17.1.jar ...
[init] Downloading default schem file
[init] Creating server.properties in /data/server.properties
[init] Disabling whitelist
[init] Setting whitelist to 'false' in /data/server.properties
[init] Setting white-list to 'false' in /data/server.properties
[init] Adding server-name with 'Dedicated Server' in /data/server.properties
[init] Setting server-port to '25565' in /data/server.properties
[init] Setting motd to 'A Limbo Minecraft Server powered by Docker' in /data/server.properties
[init] Setting enable-rcon to 'true' in /data/server.properties
[init] Setting rcon.password to 'minecraft' in /data/server.properties
[init] Setting rcon.port to '25575' in /data/server.properties
[init] Setting level-name to 'Default;default.schem;default.schem' in /data/server.properties
[init] Setting online-mode to 'true' in /data/server.properties
[init] Checking for JSON files.
[init] Setting initial memory to 1G and max to 1G
[init] Starting the Minecraft server...
Aug 28, 2021 [my time] org.jline.utils.Log logr
WARNING: Unable to create a system terminal, creating a dumb terminal (enable debug logging for more information)
[Info] Loading Limbo Version 0.6.1-ALPHA on Minecraft 1.17.1
[Info] No server-icon.png found
[Info] Loaded server.properties
[Info] If you are using bungeecord, consider turning that on in the settings!
[Info] Loading packet id mappings from mapping.json ...
[Info] Loaded all 40 packet id mappings!
[Info] Loading world minecraft:Default with the schematic file default.schem ...
[Info] Loaded world minecraft:Default!
[Info] Loading limbo default commands module...
[Info] Loading plugin LimboDefaultCmd.jar 1.0 by LOOHP
[Info] Enabling plugin LimboDefaultCmd 1.0
[Info] Limbo server listening on /localhost:25565
[Info] [/localhost:39270] <-> Handshake Status has pinged
[Error]com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 4 path $
[Error]        at com.google.gson.JsonParser.parse(JsonParser.java:65)
[Error]        at com.google.gson.JsonParser.parse(JsonParser.java:45)
[Error]        at net.md_5.bungee.chat.ComponentSerializer.parse(ComponentSerializer.java:48)
[Error]        at com.loohp.limbo.server.ClientConnection.run(ClientConnection.java:238)
[Error]Caused by: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 4 path $
[Error]        at com.google.gson.stream.JsonReader.syntaxError(JsonReader.java:1568)
[Error]        at com.google.gson.stream.JsonReader.checkLenient(JsonReader.java:1409)
[Error]        at com.google.gson.stream.JsonReader.doPeek(JsonReader.java:542)
[Error]        at com.google.gson.stream.JsonReader.peek(JsonReader.java:425)
[Error]        at com.google.gson.JsonParser.parse(JsonParser.java:60)
[Error]        ... 3 more

client (1.8.9 and vanilla 1.17.1) error:

java.net.ConnectException: Connection refused: no further information: ...

rampd2 avatar Aug 28 '21 17:08 rampd2

Oops, the "purpur" mention was a left over from copy-pasting that source file 😬 I'll fix that up.

Otherwise...

...the healthcheck behavior is quite strange and I'm not sure what to do about it yet other than documenting setting DISABLE_HEALTHCHECK=true to avoid that.

...and I finally noticed that it's binding to localhost instead of 0.0.0.0, so I'll explore what's going on there.

itzg avatar Aug 29 '21 21:08 itzg

Fixed the binding by explicitly setting SERVER_IP in the limbo setup; however, now I'm wondering how to solve

image

itzg avatar Aug 29 '21 22:08 itzg

Apparently it namespaces the level-name property, so it gets a prefix minecraft::

https://github.com/LOOHP/Limbo/blob/7d8208272f119ecda0d85bd8f8d21b01597ec1e3/src/main/java/com/loohp/limbo/file/ServerProperties.java#L82

I'll push the changes so far and @DanielRamp maybe you can help investigate what might be wrong.

itzg avatar Aug 29 '21 22:08 itzg

~~I'm curious if anyone has had a chance to dig into the error @itzg pointed out regarding the "character in path of location" message. Hitting this same issue and not getting very far with my own investigations.~~

Turns out, you can just set LEVEL to something like world;spawn.schem (replacing spawm.schem with your schema) and it just works. Rereading the message, it seems Minecraft world names can only be lowercase, but it defaulted to uppercase in the config.

gmemstr avatar Jul 16 '22 12:07 gmemstr