Closed camalot closed 5 months ago
Having the same issue with a private modpack.
version: "3.8"
services:
mc_helltime:
image: itzg/minecraft-server
container_name: mc_helltime
tty: true
stdin_open: true
ports:
- "25565:25565"
environment:
EULA: "TRUE"
# allocate from https://console.curseforge.com/ and set in .env file
CF_API_KEY: ${CF_API_KEY}
TYPE: AUTO_CURSEFORGE
CF_MODPACK_MANIFEST: /manifests/manifest.json
CF_SLUG: "custom"
REMOVE_OLD_MODS: "TRUE"
ENABLE_ROLLING_LOGS: "true"
MEMORY: "4G"
OVERRIDE_SERVER_PROPERTIES: "true"
DIFFICULTY: "normal"
SPAWN_PROTECTION: "4"
VIEW_DISTANCE: "10"
ALLOW_FLIGHT: "TRUE"
USE_NATIVE_TRANSPORT: "TRUE"
EXEC_DIRECTLY: "TRUE"
MOTD: "A not so hard modpack"
CF_EXCLUDE_MODS: |
ding
controlling
tips
entity-model-features
entity-texture-features-fabric
extreme-sound-muffler
ambientsounds
overflowing-bars
better-fps-render-distance
yeetusexperimentus
embeddium
embeddiumplus
textrues-embeddium-options
tool-stats
journeymap-integration
inventory-hud-forge
toast-control
clean-tooltips
bad-wither-no-cookie-reloaded
seasonhud
model-gap-fix
entityculling
distant-horizons
betterf3
fix-gpu-memory-leak
CF_FORCE_SYNCHRONIZE: "TRUE"
restart: unless-stopped
volumes:
# attach the relative directory 'data' to the container's /data path
- ./data:/data
- ./manifests:/manifests:ro
volumes:
data: {}
mc_helltime | [init] Running as uid=1000 gid=1000 with /data as 'drwxr-xr-x 2 1000 1000 4096 Feb 8 21:23 /data'
mc_helltime | [mc-image-helper] 21:23:56.268 ERROR : Invalid parameter provided for 'install-curseforge' command: Access to https://api.curseforge.com is forbidden or rate-limit has been exceeded. Ensure CF_API_KEY is set to a valid API key from https://console.curseforge.com/ or allow rate-limit to reset.
mc_helltime | [init] ERROR failed to auto-install CurseForge modpack
I highly recommend you remove the restart
policy parameter until you have your container setup initially. Otherwise, you will exceed the rate limit that CurseForge imposes.
Pretty sure its sends it's rate limit in the http response, so maybe we can add delays so we dont run into the timeout?
Pretty sure its sends it's rate limit in the http response, so maybe we can add delays so we dont run into the timeout?
@Shawak How are you pretty sure about that? Can you provide a network capture?
...OK, I grabbed a new capture and only the body seems to indicate the rate limit. I was previously looking only at the headers, since that's where APIs like Github's put rate limit information:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML><HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<TITLE>ERROR: The request could not be satisfied</TITLE>
</HEAD><BODY>
<H1>403 ERROR</H1>
<H2>The request could not be satisfied.</H2>
<HR noshade size="1px">
Request blocked.
We can't connect to the server for this app or website at this time. There might be too much traffic or a configuration error. Try again later, or contact the app or website owner.
<BR clear="all">
If you provide content to customers through CloudFront, you can find steps to troubleshoot and help prevent this error by reviewing the CloudFront documentation.
<BR clear="all">
<HR noshade size="1px">
<PRE>
Generated by cloudfront (CloudFront)
Request ID: gj-mv1BaNzWG0vrGDCer8ewJ4DH8vHbz_sbrjfewGW6SZ23aulBcKw==
</PRE>
<ADDRESS>
</ADDRESS>
</BODY></HTML>
Ye.. checked it myself. Can't find any rate limit headers in the response, its pretty weird to not send them there. Probably they just set a rate limit via cloudfront, guess we have to guess then, kinda wild ngl
I'll add a conditional on a phrase in the response body. It's a little cheesy and brittle, but better than being totally vague with a failure reason.
Just my 2 cents, ignore if unimportant: make sure your .env file is in this format:
CF_API_KEY='yourapikeywith$^""specialsymbols'
single quotes, or dollar signs will be interpreted as variable-in-variable.
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.
Describe the problem
If there are manual files that need to be downloaded, and it fails to start over and over due to this, eventually CurseForge ends up complaining about the API key.
This is likely due to API throttling.
Container definition
Container logs