itzg / itzg/docker-minecraft-server
an internet connection is required to restart the server
- Dominant language
- Shell
- Stars
- 14.3k
- Forks
- 1.9k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 31
Description
### Describe the problem
It looks like the container was restarted, and rather than coming back as expected it failed to start as there was no connection to the internet. I would expect this behaviour for first start, but if the server and mods are already downloaded, why should a lack of internet connection prevent the server from starting?
### Container definition
https://github.com/uhthomas/automata/blob/60fd02f4c0a34fe99e3b8d707cee5a46436ba55d/k8s/unwind/minecraft/cf_atm8/stateful_set_list.cue
### Container logs
```
- minecraft-cf-atm8-0 › minecraft-server
+ minecraft-cf-atm8-0 › minecraft-server
minecraft-cf-atm8-0 minecraft-server chmod: changing permissions of '/data': Operation not permitted
minecraft-cf-atm8-0 minecraft-server [init] Running as uid=1000 gid=3000 with /data as 'drwxrwsr-x 22 0 2000 4096 Jun 3 20:04 /data'
minecraft-cf-atm8-0 minecraft-server [mc-image-helper] 11:28:12.166 ERROR : 'get' command failed. Version is 1.29.1
minecraft-cf-atm8-0 minecraft-server java.net.UnknownHostException: launchermeta.mojang.com: Temporary failure in name resolution
minecraft-cf-atm8-0 minecraft-server at java.base/java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
minecraft-cf-atm8-0 minecraft-server at java.base/java.net.InetAddress$PlatformNameService.lookupAllHostAddr(Unknown Source)
minecraft-cf-atm8-0 minecraft-server at java.base/java.net.InetAddress.getAddressesFromNameService(Unknown Source)
minecraft-cf-atm8-0 minecraft-server at java.base/java.net.InetAddress$NameServiceAddresses.get(Unknown Source)
minecraft-cf-atm8-0 minecraft-server at java.base/java.net.InetAddress.getAllByName0(Unknown Source)
minecraft-cf-atm8-0 minecraft-server at java.base/java.net.InetAddress.getAllByName(Unknown Source)
minecraft-cf-atm8-0 minecraft-server at java.base/java.net.InetAddress.getAllByName(Unknown Source)
minecraft-cf-atm8-0 minecraft-server at org.apache.hc.client5.http.SystemDefaultDnsResolver.resolve(SystemDefaultDnsResolver.java:43)
minecraft-cf-atm8-0 minecraft-server at org.apache.hc.client5.http.impl.io.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:141)
minecraft-cf-atm8-0 minecraft-server at org.apache.hc.client5.http.impl.io.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:447)
minecraft-cf-atm8-0 minecraft-server at org.apache.hc.client5.http.impl.classic.InternalExecRuntime.connectEndpoint(InternalExecRuntime.java:162)
minecraft-cf-atm8-0 minecraft-server at org.apache.hc.client5.http.impl.classic.InternalExecRuntime.connectEndpoint(InternalExecRuntime.java:172)
minecraft-cf-atm8-0 minecraft-server at org.apache.hc.client5.http.impl.classic.ConnectExec.execute(ConnectExec.java:142)
minecraft-cf-atm8-0 minecraft-server at org.apache.hc.client5.http.impl.classic.ExecChainElement.execute(ExecChainElement.java:51)
minecraft-cf-atm8-0 minecraft-server at org.apache.hc.client5.http.impl.classic.ProtocolExec.execute(ProtocolExec.java:192)
minecraft-cf-atm8-0 minecraft-server at org.apache.hc.client5.http.impl.classic.ExecChainElement.execute(ExecChainElement.java:51)
minecraft-cf-atm8-0 minecraft-server at org.apache.hc.client5.http.impl.classic.HttpRequestRetryExec.execute(HttpRequestRetryExec.java:96)
minecraft-cf-atm8-0 minecraft-server at org.apache.hc.client5.http.impl.classic.ExecChainElement.execute(ExecChainElement.java:51)
minecraft-cf-atm8-0 minecraft-server at org.apache.hc.client5.http.impl.classic.ContentCompressionExec.execute(ContentCompressionExec.java:152)
minecraft-cf-atm8-0 minecraft-server at org.apache.hc.client5.http.impl.classic.ExecChainElement.execute(ExecChainElement.java:51)
minecraft-cf-atm8-0 minecraft-server at org.apache.hc.client5.http.impl.classic.RedirectExec.execute(RedirectExec.java:115)
minecraft-cf-atm8-0 minecraft-server at org.apache.hc.client5.http.impl.classic.ExecChainElement.execute(ExecChainElement.java:51)
minecraft-cf-atm8-0 minecraft-server at me.itzg.helpers.http.LatchingUrisInterceptor.execute(LatchingUrisInterceptor.java:27)
minecraft-cf-atm8-0 minecraft-server at org.apache.hc.client5.http.impl.classic.ExecChainElement.execute(ExecChainElement.java:51)
minecraft-cf-atm8-0 minecraft-server at org.apache.hc.client5.http.impl.classic.InternalHttpClient.doExecute(InternalHttpClient.java:170)
minecraft-cf-atm8-0 minecraft-server at org.apache.hc.client5.http.impl.classic.CloseableHttpClient.execute(CloseableHttpClient.java:245)
minecraft-cf-atm8-0 minecraft-server at org.apache.hc.client5.http.impl.classic.CloseableHttpClient.execute(CloseableHttpClient.java:188)
minecraft-cf-atm8-0 minecraft-server at org.apache.hc.client5.http.impl.classic.CloseableHttpClient.execute(CloseableHttpClient.java:162)
minecraft-cf-atm8-0 minecraft-server at me.itzg.helpers.get.GetCommand.processSingleUri(GetCommand.java:439)
minecraft-cf-atm8-0 minecraft-server at me.itzg.helpers.get.GetCommand.call(GetCommand.java:187)
minecraft-cf-atm8-0 minecraft-server at me.itzg.helpers.get.GetCommand.call(GetCommand.java:54)
minecraft-cf-atm8-0 minecraft-server at picocli.CommandLine.executeUserObject(CommandLine.java:2041)
minecraft-cf-atm8-0 minecraft-server at picocli.CommandLine.access$1500(CommandLine.java:148)
minecraft-cf-atm8-0 minecraft-server at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2461)
minecraft-cf-atm8-0 minecraft-server at picocli.CommandLine$RunLast.handle(CommandLine.java:2453)
minecraft-cf-atm8-0 minecraft-server at picocli.CommandLine$RunLast.handle(CommandLine.java:2415)
minecraft-cf-atm8-0 minecraft-server at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2273)
minecraft-cf-atm8-0 minecraft-server at picocli.CommandLine$RunLast.execute(CommandLine.java:2417)
minecraft-cf-atm8-0 minecraft-server at picocli.CommandLine.execute(CommandLine.java:2170)
minecraft-cf-atm8-0 minecraft-server at me.itzg.helpers.McImageHelper.main(McImageHelper.java:139)
minecraft-cf-atm8-0 minecraft-server [init] ERROR: version lookup failed:
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the container definition at k8s/unwind/minecraft/cf_atm8/stateful_set_list.cue and trace the startup path associated with the mc-image-helper version lookup in the logs. Reproduce a restart without network access and determine which existing files are consulted. Done means an already-downloaded server and mods can restart successfully offline.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, shell
- Domain
- devops, infrastructure
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100