itzg / itzg/docker-minecraft-server
Server fails to start if Spiget is down and plugins need to be installed
- Dominant language
- Shell
- Stars
- 14.3k
- Forks
- 1.9k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 31
Description
### Describe the problem
The [spiget API status page](https://spiget.org/status/) is currently reporting the api status as "Unknown" and the amount of daily requests took a nose dive tonight so I'm going to assume things are very wrong on their end.

This shouldn't be an issue however because I already have cached versions of these plugins from the previous time the server started and spiget was up. I think we should handle this service degradation gracefully and not exit because plugins can't be downloaded successfully.
### Container definition
I'm using a kubernetes manifest that is split up and non-trivial to paste here, the important part is that I have [`SPIGET_RESOURCES="274,18494"`](https://git.tdude.co/tristan/infrastructure/-/blob/master/k8s-235/apps/minecraft/cacaffichage/overlays/prod/kustomization.yaml#L82) set.
### Container logs
```
chmod: changing permissions of '/data': Operation not permitted
[init] Running as uid=1000 gid=1000 with /data as 'drwxrwsrwx 11 0 2000 35 Jan 26 03:31 /data'
[init] Resolved version given LATEST into 1.18.1
[init] Resolving type given PAPER
[init] Removing old PaperMC versions ...
[init] Downloading PaperMC 1.18.1 (build 176) ...
[init] Getting plugins via Spiget
[init] Downloading resource 274 ...
End-of-central-directory signature not found. Either this file is not
a zipfile, or it constitutes one disk of a multi-part archive. In the
latter case the central directory and zipfile comment will be found on
the last disk(s) of this archive.
unzip: cannot find zipfile directory in one of /tmp/274.zip or
/tmp/274.zip.zip, and cannot find /tmp/274.zip.ZIP, period.
End-of-central-directory signature not found. Either this file is not
a zipfile, or it constitutes one disk of a multi-part archive. In the
latter case the central directory and zipfile comment will be found on
the last disk(s) of this archive.
unzip: cannot find zipfile directory in one of /tmp/274.zip or
/tmp/274.zip.zip, and cannot find /tmp/274.zip.ZIP, period.
[init] ERROR downloaded resource '274' seems to be not a valid plugin
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start from the startup path represented by the [init] logs, especially the “Getting plugins via Spiget” step, and reproduce with SPIGET_RESOURCES="274,18494" while Spiget is unavailable. Check how the cached plugin files and failed /tmp/274.zip download are handled. Done means the server continues startup using valid cached plugins instead of exiting when Spiget cannot be reached.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, kubernetes, shell
- Domain
- devops
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100