Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Container not starting, getbukkit.org redirect failure #2371

Closed
ElektroVirus opened this issue Sep 6, 2023 · 11 comments
Closed

Container not starting, getbukkit.org redirect failure #2371

ElektroVirus opened this issue Sep 6, 2023 · 11 comments
Labels
bug confirmed Issue has been reproduced reason/upstream Caused by an upstream vendor (Mojang, Forge, Bukkit, etc) issue status/stale No recently activity has been seen and will be closed soon.

Comments

@ElektroVirus
Copy link

ElektroVirus commented Sep 6, 2023

Describe the problem

Hey, I stopped my minecraft-server container yesterday for backup and restarted it, but it won't start anymore.

Apparently http://getbukkit.org/ isn't redirecting properly.

Before making this issue I of course pulled the newest image.

Just wanted to document this here, I'm not even sure is this project able to fix the problem before getbukkit.org fixes the redirect issue.

I'm running the container on Rocky Linux 8.8 using Podman, but it should not matter.

Have a nice day,
ElektroVirus

Container definition

TYPE="SPIGOT"
CONTAINER_NAME="minecraft-server"

podman rm --force $CONTAINER_NAME
podman pull itzg/minecraft-server:latest

podman run -d
-p 25565:25565
-p 25575:25575
-p 8123:8123
-e MEMORY=""
-e JVM_XX_OPTS="-XX:MaxRAMPercentage=75"
-e EULA=TRUE
-e ENABLE_ROLLING_LOGS=true
-e GUI=FALSE
-e TZ="Europe/Helsinki"
-e TYPE=${TYPE}
-e MOTD="A ${TYPE} Minecraft Server"
-e DIFFICULTY=hard
-e OPS=""
-e ENABLE_RCON=true
-e RCON_PASSWORD=""
-e ENABLE_QUERY=false
-e MAX_PLAYERS=50
-e MAX_WORLD_SIZE=100000
-e ALLOW_NETHER=true
-e ANNOUNCE_PLAYER_ACHIEVEMENTS=true
-e ENABLE_COMMAND_BLOCK=false
-e FORCE_GAMEMODE=false
-e GENERATE_STRUCTURES=true
-e HARDCORE=false
-e SNOOPER_ENABLED=false
-e MAX_BUILD_HEIGHT=256
-e MAX_TICK_TIME=60000
-e SPAWN_ANIMALS=true
-e SPAWN_MONSTERS=true
-e SPAWN_NPCS=true
-e SPAWN_PROTECTION=0
-e VIEW_DISTANCE=32
-e MODE=survival
-e PVP=true
-e LEVEL_TYPE=DEFAULT
-e ONLINE_MODE=true
-e ALLOW_FLIGHT=false
-e SERVER_NAME="My server"
-e SERVER_PORT=25565
-v /home/elias/minecraft-server/data:/data:Z
--name ${CONTAINER_NAME}
itzg/minecraft-server:latest

Container logs

[init] Running as uid=1000 gid=1000 with /data as 'drwxrwxr-x. 9 1000 1000 4096 Sep  5 13:36 /data'
[init] Resolving type given SPIGOT
2023/09/06 12:43:14 Failed to load content: Failed to retrieve response: Get "https://getbukkit.org/download/spigot": stopped after 10 redirects
[mc-image-helper] 12:43:15.866 ERROR : 'compare-versions' command failed. Version is 1.34.7
java.lang.StringIndexOutOfBoundsException: String index out of range: 0
	at java.base/java.lang.StringLatin1.charAt(Unknown Source)
	at java.base/java.lang.String.charAt(Unknown Source)
	at me.itzg.helpers.versions.CompareVersionsCommand.call(CompareVersionsCommand.java:23)
	at me.itzg.helpers.versions.CompareVersionsCommand.call(CompareVersionsCommand.java:8)
	at picocli.CommandLine.executeUserObject(CommandLine.java:2041)
	at picocli.CommandLine.access$1500(CommandLine.java:148)
	at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2461)
	at picocli.CommandLine$RunLast.handle(CommandLine.java:2453)
	at picocli.CommandLine$RunLast.handle(CommandLine.java:2415)
	at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2273)
	at picocli.CommandLine$RunLast.execute(CommandLine.java:2417)
	at picocli.CommandLine.execute(CommandLine.java:2170)
	at me.itzg.helpers.McImageHelper.main(McImageHelper.java:153)
[init] Downloading Spigot from https://download.getbukkit.org/spigot/spigot-.jar ...
curl: (22) The requested URL returned error: 404 Not Found
@itzg
Copy link
Owner

itzg commented Sep 6, 2023

Thanks for reporting this. I have been able to recreate the issue and will start investigating.

@itzg itzg added the confirmed Issue has been reproduced label Sep 6, 2023
@itzg itzg moved this to In progress in Docker Minecraft Sep 6, 2023
@itzg
Copy link
Owner

itzg commented Sep 6, 2023

Their entire website seems to be broken, which I think is what you were initially reporting too:

image

@itzg itzg moved this from In progress to To do in Docker Minecraft Sep 6, 2023
@itzg itzg added the reason/upstream Caused by an upstream vendor (Mojang, Forge, Bukkit, etc) issue label Sep 6, 2023
@finnosdiemitdemo
Copy link

Set the Environment Variable -e BUILD_FROM_SOURCE=true fixed the Problem for me.

@itzg
Copy link
Owner

itzg commented Sep 6, 2023

Another solution is to switch to Paper 😀

@elforesto
Copy link

The domain has been fixed upstream. I still think it would be worth evaluating error handing in this scenario to avoid downtime in the event it happens again.

@itzg
Copy link
Owner

itzg commented Sep 11, 2023

Thanks for pointing out their website is back.

What would the error handling do?

@elforesto
Copy link

My assumption is that it would note the error and continue to function with the previously downloaded executable.

@itzg
Copy link
Owner

itzg commented Sep 12, 2023

That would seem reasonable but it has to query to resolve a VERSION of "latest"

VERSION=$(restify https://getbukkit.org/download/spigot --attribute='property=og:title' | jq -r '.[0] | .attributes | select(.property == "og:title") | .content | split(" ") | .[-1]')

So, as a workaround, users could set VERION specifically and there's already logic to skip download if it's present.

@cringeisen
Copy link

So, as a workaround, users could set VERION specifically and there's already logic to skip download if it's present.

I have tried and tried and tried and I cannot get it to download the latest version. I have manually downloaded the latest myself from the spigot website (1.20.1), uploaded to the directory on my NAS and changed the environmental variable to reflect the version number I've manually put in the directory (1.20.1). Doesn't seem to detect it's present, tried to download anyways, and fails.

      - TYPE=SPIGOT
      - VERSION=1.20.1

Capture2
Capture

Interesting Enough, I am able to download 1.8-R0.1-SNAPSHOT-latest if I want to play on a sever from 2014...

@itzg
Copy link
Owner

itzg commented Sep 28, 2023

@cringeisen please open a new issue, set the env var DEBUG=true, and provide those startup logs.

@github-actions
Copy link

This issue is stale because it has been open 30 days with no activity. Please add a comment describing the reason to keep this issue open.

@github-actions github-actions bot added the status/stale No recently activity has been seen and will be closed soon. label Oct 29, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Nov 4, 2023
@github-project-automation github-project-automation bot moved this from To do to Done in Docker Minecraft Nov 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug confirmed Issue has been reproduced reason/upstream Caused by an upstream vendor (Mojang, Forge, Bukkit, etc) issue status/stale No recently activity has been seen and will be closed soon.
Projects
Status: Done
Development

No branches or pull requests

5 participants