itzg/docker-minecraft-bedrock-server

container alway restarting

Closed this issue · 6 comments

Since last week I got the problem, that my docker container are alway in the restarting status.
Getting the logs by:

docker logs d86683c36cb2

I see many times this:

DEBU[0000] Using /data to match uid and gid             
DEBU[0000] Resolved UID=1000 from match path            
DEBU[0000] Resolved GID=100 from match path             
Looking up latest version...

I have tried to update the container, but unfortunately the behavior did not change.

itzg commented

Can you se the env var DEBUG to "true" and provide those logs?

Now it looks like this:

DEBU[0000] Using /data to match uid and gid             
DEBU[0000] Resolved UID=1000 from match path            
DEBU[0000] Resolved GID=100 from match path             
+ curlArgs=(-v)
++ id -a
++ ls -ld /data
+ echo 'DEBUG: running as uid=1000 gid=100(users) groups=100(users) with drwxr-xr-x 16 1000 users 4096 Sep  5 18:29 /data'
DEBUG: running as uid=1000 gid=100(users) groups=100(users) with drwxr-xr-x 16 1000 users 4096 Sep  5 18:29 /data
++ pwd
+ echo '       current directory is /data'
       current directory is /data
+ export HOME=/data
+ HOME=/data
+ downloadPage=https://www.minecraft.net/en-us/download/server/bedrock
+ [[ TRUE != TRUE ]]
+ case ${VERSION^^} in
+ echo 'Looking up latest version...'
+ lookupVersion serverBedrockLinux
Looking up latest version...
+ platform=serverBedrockLinux
+ for i in {1..3}
++ restify --user-agent=itzg/minecraft-bedrock-server --headers 'accept-language:*' --attribute=data-platform=serverBedrockLinux https://www.minecraft.net/en-us/download/server/bedrock
++ jq -r '.[0].href'
++ echo ''
+ DOWNLOAD_URL=
+ [[ -n '' ]]
+ sleep 1
+ for i in {1..3}
++ restify --user-agent=itzg/minecraft-bedrock-server --headers 'accept-language:*' --attribute=data-platform=serverBedrockLinux https://www.minecraft.net/en-us/download/server/bedrock
++ jq -r '.[0].href'
++ echo ''
+ DOWNLOAD_URL=
+ [[ -n '' ]]
+ sleep 1
+ for i in {1..3}
++ restify --user-agent=itzg/minecraft-bedrock-server --headers 'accept-language:*' --attribute=data-platform=serverBedrockLinux https://www.minecraft.net/en-us/download/server/bedrock
++ jq -r '.[0].href'
++ echo ''
+ DOWNLOAD_URL=
+ [[ -n '' ]]
+ sleep 1
+ [[ -z '' ]]
++ curl -s https://mc-bds-helper.vercel.app/api/latest
+ DOWNLOAD_URL=
itzg commented

Something seems to be different about your networking and is causing an incorrect response from Mojang's website. Please run this and provide the output:

docker run -it --rm --entrypoint curl itzg/minecraft-bedrock-server -A itzg/minecraft-bedrock-server -fsSLv https://www.minecraft.net/en-us/download/server/bedrock

So the container needs internet connection?
This can be the problem I have to use ipvlan to run several containers and a dns-server to connect the switch to the server.
Thank you, I keep you informed.

itzg commented

Yes. How else would it retrieve a copy of the bedrock dedicated server binary from Mojang? The image cannot legally distribute the binary. Besides it gets upgraded quite often.

I solved the problem, strangely the dns via 127.0.0.11 (docker compose) stopped working. I injected thesolve.conf file via volumes.
That restored the dns and the server start working again.
thank you for your fast reply.