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

Spigot fails to start: Version Lookup Failed

Open jcv8-dev opened this issue 3 years ago • 7 comments

Describe the problem

The Docker Container fails to start and keeps restarting over and over. From the logs it seems like the version lookup fails or rather the connection to the mojang server times out. About a week ago it was running just fine.

Container definition

version: "3"

services:
  mc:
    image: itzg/minecraft-server
    container_name: mc
    ports:
      - 25565:25565
    environment:
      EULA: "TRUE"
      MEMORY: "7G"
      TYPE: "SPIGOT"
      DEBUG: "TRUE"
    tty: true
    stdin_open: true
    restart: unless-stopped
    volumes:
      - ./minecraft-data:/data

Container logs

This is what I get from docker logs mc with DEBUG="TRUE". With time the log repeats itself.

+ export HOME=/data
+ HOME=/data
++ id -u
++ id -g
++ ls -lnd /data
+ log 'Running as uid=1000 gid=1000 with /data as '\''drwxrwxr-x 10 1000 1000 4096 Jul  6 10:46 /data'\'''
+ local oldState
++ shopt -po xtrace
+ oldState='set -o xtrace'
+ shopt -u -o xtrace
[init] 2022-07-06 11:11:11+00:00 Running as uid=1000 gid=1000 with /data as 'drwxrwxr-x 10 1000 1000 4096 Jul  6 10:46 /data'
+ '[' '!' -e /data/eula.txt ']'
+ isTrue false
+ local oldState
++ shopt -po xtrace
+ oldState='set -o xtrace'
+ shopt -u -o xtrace
+ return 1
+ isTrue false
+ local oldState
++ shopt -po xtrace
+ oldState='set -o xtrace'
+ shopt -u -o xtrace
+ return 1
+ [[ -n '' ]]
+ [[ -n '' ]]
+ fixJavaPath
+ which java
+ export VERSIONS_JSON=https://launchermeta.mojang.com/mc/game/version_manifest.json
+ VERSIONS_JSON=https://launchermeta.mojang.com/mc/game/version_manifest.json
+ case "X$VERSION" in
++ get --json-path '$.latest.release' https://launchermeta.mojang.com/mc/game/version_manifest.json
++ flags=()
++ local flags
++ isTrue false
++ local oldState
+++ shopt -po xtrace
++ oldState='set -o xtrace'
++ shopt -u -o xtrace
++ return 1
++ mc-image-helper get --json-path '$.latest.release' https://launchermeta.mojang.com/mc/game/version_manifest.json
[mc-image-helper] 11:13:22.929 ERROR : 'get' command failed: Connect to https://launchermeta.mojang.com:443 [launchermeta.mojang.com/152.199.21.175] failed: Connection timed out
+ VANILLA_VERSION=
+ log 'ERROR: version lookup failed: '
+ local oldState
++ shopt -po xtrace
+ oldState='set -o xtrace'
+ shopt -u -o xtrace
[init] 2022-07-06 11:13:22+00:00 ERROR: version lookup failed:
+ exit 1
+ export HOME=/data
+ HOME=/data
++ id -u
++ id -g
++ ls -lnd /data
+ log 'Running as uid=1000 gid=1000 with /data as '\''drwxrwxr-x 10 1000 1000 4096 Jul  6 10:46 /data'\'''
+ local oldState
++ shopt -po xtrace
+ oldState='set -o xtrace'
+ shopt -u -o xtrace
[init] 2022-07-06 11:13:23+00:00 Running as uid=1000 gid=1000 with /data as 'drwxrwxr-x 10 1000 1000 4096 Jul  6 10:46 /data'
+ '[' '!' -e /data/eula.txt ']'
+ isTrue false
+ local oldState
++ shopt -po xtrace
+ oldState='set -o xtrace'
+ shopt -u -o xtrace
+ return 1
+ isTrue false
+ local oldState
++ shopt -po xtrace
+ oldState='set -o xtrace'
+ shopt -u -o xtrace
+ return 1
+ [[ -n '' ]]
+ [[ -n '' ]]
+ fixJavaPath
+ which java
+ export VERSIONS_JSON=https://launchermeta.mojang.com/mc/game/version_manifest.json
+ VERSIONS_JSON=https://launchermeta.mojang.com/mc/game/version_manifest.json
+ case "X$VERSION" in
++ get --json-path '$.latest.release' https://launchermeta.mojang.com/mc/game/version_manifest.json
++ flags=()
++ local flags
++ isTrue false
++ local oldState
+++ shopt -po xtrace
++ oldState='set -o xtrace'
++ shopt -u -o xtrace
++ return 1
++ mc-image-helper get --json-path '$.latest.release' https://launchermeta.mojang.com/mc/game/version_manifest.json

jcv8-dev avatar Jul 06 '22 11:07 jcv8-dev

The image can't do anything about network time outs. Please give it a specific VERSION to work around that.

itzg avatar Jul 06 '22 13:07 itzg

I tried to do a clean reinstall with a specific version and now I get the following output:

+ export HOME=/data
+ HOME=/data
++ id -u
++ id -g
++ ls -lnd /data
+ log 'Running as uid=1000 gid=1000 with /data as '\''drwxrwxr-x 2 1000 1000 4096 Jul  6 12:34 /data'\'''
+ local oldState
++ shopt -po xtrace
+ oldState='set -o xtrace'
+ shopt -u -o xtrace
[init] 2022-07-06 13:43:11+00:00 Running as uid=1000 gid=1000 with /data as 'drwxrwxr-x 2 1000 1000 4096 Jul  6 12:34 /data'
+ '[' '!' -e /data/eula.txt ']'
+ isTrue false
+ local oldState
++ shopt -po xtrace
+ oldState='set -o xtrace'
+ shopt -u -o xtrace
+ return 1
+ isTrue false
+ local oldState
++ shopt -po xtrace
+ oldState='set -o xtrace'
+ shopt -u -o xtrace
+ return 1
+ [[ -n '' ]]
+ [[ -n '' ]]
+ fixJavaPath
+ which java
+ export VERSIONS_JSON=https://launchermeta.mojang.com/mc/game/version_manifest.json
+ VERSIONS_JSON=https://launchermeta.mojang.com/mc/game/version_manifest.json
+ case "X$VERSION" in
+ VANILLA_VERSION=1.18
+ export VANILLA_VERSION
++ get_major_version 1.18
++ version=1.18
++ echo 1.18
++ cut -d. -f 1-2
+ MAJOR_VANILLA_VERSION=1.18
+ export MAJOR_VANILLA_VERSION
+ log 'Resolved version given 1.18 into 1.18 and major version 1.18'
+ local oldState
++ shopt -po xtrace
+ oldState='set -o xtrace'
+ shopt -u -o xtrace
[init] 2022-07-06 13:43:11+00:00 Resolved version given 1.18 into 1.18 and major version 1.18
+ cd /data
+ export ORIGINAL_TYPE=SPIGOT
+ ORIGINAL_TYPE=SPIGOT
+ isTrue false
+ local oldState
++ shopt -po xtrace
+ oldState='set -o xtrace'
+ shopt -u -o xtrace
+ return 1
+ isTrue false
+ local oldState
++ shopt -po xtrace
+ oldState='set -o xtrace'
+ shopt -u -o xtrace
+ return 1
+ [[ -n '' ]]
+ [[ -n '' ]]
+ [[ -n '' ]]
+ [[ -n '' ]]
+ [[ -n '' ]]
+ versionLessThan 1.7
+ mc-image-helper compare-versions 1.18 lt 1.7
+ log 'Resolving type given SPIGOT'
+ local oldState
++ shopt -po xtrace
+ oldState='set -o xtrace'
+ shopt -u -o xtrace
[init] 2022-07-06 13:43:12+00:00 Resolving type given SPIGOT
+ case "${TYPE^^}" in
+ exec /start-deployBukkitSpigot
+ set -e
+ isTrue ''
+ local oldState
++ shopt -po xtrace
+ oldState='set -o xtrace'
+ shopt -u -o xtrace
+ return 1
+ isTrue ''
+ local oldState
++ shopt -po xtrace
+ oldState='set -o xtrace'
+ shopt -u -o xtrace
+ return 1
+ downloadSpigot
+ local match
+ case "$TYPE" in
+ match=Spigot
+ downloadUrl=
+ getbukkitFlavor=spigot
+ [[ 1.18 = LATEST ]]
+ [[ -z '' ]]
+ versionLessThan 1.16.5
+ mc-image-helper compare-versions 1.18 lt 1.16.5
+ [[ spigot = \c\r\a\f\t\b\u\k\k\i\t ]]
+ downloadUrl=https://download.getbukkit.org/spigot/spigot-1.18.jar
+ setServerVar
+ case "$TYPE" in
+ export SERVER=spigot_server-1.18.jar
+ SERVER=spigot_server-1.18.jar
+ '[' -f spigot_server-1.18.jar ']'
+ isDebugging
+ isTrue TRUE
+ local oldState
++ shopt -po xtrace
+ oldState='set -o xtrace'
+ shopt -u -o xtrace
+ return 0
+ return 0
+ curlArgs=' -v'
+ log 'Downloading Spigot from https://download.getbukkit.org/spigot/spigot-1.18.jar ...'
+ local oldState
++ shopt -po xtrace
+ oldState='set -o xtrace'
+ shopt -u -o xtrace
[init] 2022-07-06 13:43:13+00:00 Downloading Spigot from https://download.getbukkit.org/spigot/spigot-1.18.jar ...
+ curl -fsSL -o spigot_server-1.18.jar -v https://download.getbukkit.org/spigot/spigot-1.18.jar
*   Trying 188.114.96.4:443...
* TCP_NODELAY set
*   Trying 2a06:98c1:3121::4:443...
* TCP_NODELAY set
* Immediate connect fail for 2a06:98c1:3121::4: Cannot assign requested address
*   Trying 2a06:98c1:3120::4:443...
* TCP_NODELAY set
* Immediate connect fail for 2a06:98c1:3120::4: Cannot assign requested address
*   Trying 2a06:98c1:3121::4:443...
* TCP_NODELAY set
* Immediate connect fail for 2a06:98c1:3121::4: Cannot assign requested address
*   Trying 2a06:98c1:3120::4:443...
* TCP_NODELAY set
* Immediate connect fail for 2a06:98c1:3120::4: Cannot assign requested address
*   Trying 2a06:98c1:3121::4:443...
* TCP_NODELAY set
* Immediate connect fail for 2a06:98c1:3121::4: Cannot assign requested address
*   Trying 2a06:98c1:3120::4:443...
* TCP_NODELAY set
* Immediate connect fail for 2a06:98c1:3120::4: Cannot assign requested address
*   Trying 2a06:98c1:3121::4:443...
* TCP_NODELAY set
* Immediate connect fail for 2a06:98c1:3121::4: Cannot assign requested address
*   Trying 2a06:98c1:3120::4:443...
* TCP_NODELAY set
* Immediate connect fail for 2a06:98c1:3120::4: Cannot assign requested address
*   Trying 2a06:98c1:3121::4:443...
* TCP_NODELAY set
* Immediate connect fail for 2a06:98c1:3121::4: Cannot assign requested address
*   Trying 2a06:98c1:3120::4:443...
* TCP_NODELAY set
* Immediate connect fail for 2a06:98c1:3120::4: Cannot assign requested address
*   Trying 2a06:98c1:3121::4:443...
* TCP_NODELAY set
* Immediate connect fail for 2a06:98c1:3121::4: Cannot assign requested address
*   Trying 2a06:98c1:3120::4:443...
* TCP_NODELAY set
* Immediate connect fail for 2a06:98c1:3120::4: Cannot assign requested address
*   Trying 2a06:98c1:3121::4:443...
* TCP_NODELAY set
* Immediate connect fail for 2a06:98c1:3121::4: Cannot assign requested address
*   Trying 2a06:98c1:3120::4:443...
* TCP_NODELAY set
* Immediate connect fail for 2a06:98c1:3120::4: Cannot assign requested address
*   Trying 2a06:98c1:3121::4:443...
* TCP_NODELAY set
* Immediate connect fail for 2a06:98c1:3121::4: Cannot assign requested address
*   Trying 2a06:98c1:3120::4:443...
* TCP_NODELAY set
* Immediate connect fail for 2a06:98c1:3120::4: Cannot assign requested address
*   Trying 2a06:98c1:3121::4:443...
* TCP_NODELAY set
* Immediate connect fail for 2a06:98c1:3121::4: Cannot assign requested address
*   Trying 2a06:98c1:3120::4:443...

jcv8-dev avatar Jul 06 '22 13:07 jcv8-dev

Still looks like networking issues. I'm not sure how my image can fix anything. You can see the curl command it's trying there.

itzg avatar Jul 06 '22 14:07 itzg

Yeah, but when I copy the curl command and execute it in the command line it downloads the .jar just fine.

jcv8-dev avatar Jul 06 '22 14:07 jcv8-dev

Command line of the host or within the container with entrypoint override? If it's within the container then you need to troubleshoot your docker networking.

itzg avatar Jul 06 '22 14:07 itzg

HI I have a similar issue. I just use the standard version of the server. This is my compose file.

version: "3"

services:
  minecraft:
    image: itzg/minecraft-server
    container_name: minecraft
    ports:
      - 25565:25565
      - 25575:25575
    environment:
      EULA: "TRUE"
    tty: true
    stdin_open: true
    restart: unless-stopped
    volumes:
      - "/srv/docker/minecraft/1.19:/data"

And I get this error in the Log.

[init] Changing ownership of /data to 1000 ...
[init] Running as uid=1000 gid=1000 with /data as 'drwxrwxr-x. 2 1000 1000 6 Aug  1 17:11 /data'
[mc-image-helper] 17:12:10.037 ERROR : 'get' command failed: launchermeta.mojang.com: Temporary failure in name resolution
[init] ERROR: version lookup failed: 
[init] Running as uid=1000 gid=1000 with /data as 'drwxrwxr-x. 2 1000 1000 22 Aug  1 17:11 /data'
[mc-image-helper] 17:12:31.057 ERROR : 'get' command failed: launchermeta.mojang.com: Temporary failure in name resolution
[init] ERROR: version lookup failed: 
[init] Running as uid=1000 gid=1000 with /data as 'drwxrwxr-x. 2 1000 1000 22 Aug  1 17:11 /data'
[mc-image-helper] 17:12:52.122 ERROR : 'get' command failed: launchermeta.mojang.com: Temporary failure in name resolution
[init] ERROR: version lookup failed: 
[init] Running as uid=1000 gid=1000 with /data as 'drwxrwxr-x. 2 1000 1000 22 Aug  1 17:11 /data'

Thanks for the help.

jbb22 avatar Aug 01 '22 17:08 jbb22

never mind, it was a DNS issue, I just added the DNS to the compose: dns: - 8.8.8.8

jbb22 avatar Aug 01 '22 20:08 jbb22

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[bot] avatar Sep 01 '22 02:09 github-actions[bot]