docker-minecraft-server
                                
                                 docker-minecraft-server copied to clipboard
                                
                                    docker-minecraft-server copied to clipboard
                            
                            
                            
                        Stuck to Start My Container
I get an Error about to Start the Container: 2024-02-03T06:24:47.879259175Z me.itzg.helpers.errors.InvalidParameterException: 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.
The API Key is Valid
What I Can do?
I'm seconding this issue.
[init] Changing uid of minecraft to 1001
[init] Changing gid of minecraft to 1001
[init] Running as uid=1001 gid=1001 with /data as 'drwxr-xr-x 2 1001 1001 4096 Feb  3 11:32 /data'
[mc-image-helper] 11:48:11.172 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.
[init] ERROR failed to auto-install CurseForge modpack
Have you properly escaped your API key?
That's not correct, the docs go into detail what you need to do with escaping the $s.
That's not correct, the docs go into detail what you need to do with escaping the $s.
Yeah, realized. Now it works, my bad
@meltymon please check the same.
I only use the container privately from my home network and the server is not publicly accessible. I am not an expert in encryption or similar topics, and I simply integrated the API key as described in the documentation. Maybee you can Help me with that
@meltymon home network/public or not doesn't make a difference.
Please read (or re-read) this section and make sure you have doubled up all three dollar signs in the API key value
https://docker-minecraft-server.readthedocs.io/en/latest/types-and-platforms/mod-platforms/auto-curseforge/#api-key
I added the 3 $ in the API value but I get the same error.
Must be the CueseForge imposed rate limit then.
I have now generated a new API token, but that did not solve the problem.
Can the fixed rate limit be changed?
I have now generated a new API token, but that did not solve the problem.
Are you totally sure you have escaped the dollar signs correctly? Your CF_API_KEY should start out with something like:
$$2a$$10$$[and remainder will be here]
Can the fixed rate limit be changed?
That is in CurseForge's control, but make sure your container is not set with a restart policy. If it is, the container will continually restart and quickly exhaust all of the allowed API calls from your IP address. If this has been happening, then stop the container and wait at least an hour to start it again.
I have now generated a new API token, but that did not solve the problem.
Are you totally sure you have escaped the dollar signs correctly? Your
CF_API_KEYshould start out with something like:$$2a$$10$$[and remainder will be here]Can the fixed rate limit be changed?
That is in CurseForge's control, but make sure your container is not set with a restart policy. If it is, the container will continually restart and quickly exhaust all of the allowed API calls from your IP address. If this has been happening, then stop the container and wait at least an hour to start it again.
Speaking of the API limit, does it eat up an API call with every container restart?
Speaking of the API limit, does it eat up an API call with every container restart?
Yes. Even with the modpack already installed it has to make at least one or two calls to ensure it is still valid. Those calls are fine normally, but if the container is crash looping and still trying to install mods then CurseForge's limit will be reached pretty quickly.
How many and for what duration, I have no idea. It would be great if somebody asked CurseForge.
Speaking of the API limit, does it eat up an API call with every container restart?
Yes. Even with the modpack already installed it has to make at least one or two calls to ensure it is still valid. Those calls are fine normally, but if the container is crash looping and still trying to install mods then CurseForge's limit will be reached pretty quickly.
How many and for what duration, I have no idea. It would be great if somebody asked CurseForge.
Alright thanks, I will make sure to change my compose to not restart automatically. Any clue what the daily limit is? There is no "x of x API calls remaining" counter.
okay the restart policy was on never until stop :D this is right now https://pastebin.com/AUk4gGUr
other question , have you an public server ? i have hosted my docker-server on a intel-xeon cluster over proxmox (16 Nodes) with 32* E5-2699V3 with 768GB DDR4 Ram for Each Cpu. not only used about Minecraft container lol
Alright thanks, I will make sure to change my compose to not restart automatically.
To clarify what I was trying to say: restart policy is fine once the container setup is stable.
Any clue what the daily limit is? There is no "x of x API calls remaining" counter.
Like I said, no, I don't know the limit. Ask CurseForge. No, they provide absolutely no indication of remaining usage and their API doesn't even say the rate limit was reached. It just fails with a generic authorization failed status. Please share your complaints with CurseForge.
okay the restart policy was on never until stop :D this is right now https://pastebin.com/AUk4gGUr
can you see in the log file any solve ?
The log file states what's wrong and action needed. There's 3 mods you have to manually download and provide to the server. It's listed in the table at the end.
how I do that for a container is not running? with docker exec -it Minecraft-server /bin/bash not works
Look at the example. Though if your using docker run you'll need to use the -v option to mount /downloads.
another problem with my docker-compose script I get an error , how I can solve it? There is an error in the yaml syntax: YAMLSyntaxError: Invalid escape sequence :
https://pastebin.com/FwBe3pGq
Look at the example. Though if your using
docker runyou'll need to use the-voption to mount/downloads.
thanks I solved that
You can't use the raw server.properties in the environment section. Please check the documentation on how to set each item.
You can't use the raw server.properties in the environment section. Please check the documentation on how to set each item.
I Solved it but now I have the problem the jvm only use 1g of ram , I tried to change that but it don't work: JAVA_OPTS: "-Xms16G -Xmx64G" deploy: resources: limits: memory: 128G
2024-02-04T23:55:35.647037576Z + return 1 2024-02-04T23:55:35.647045263Z + isTrue '' 2024-02-04T23:55:35.647051870Z + case "${1,,}" in 2024-02-04T23:55:35.647058460Z + return 1 2024-02-04T23:55:35.647065797Z + isTrue '' 2024-02-04T23:55:35.647072412Z + case "${1,,}" in 2024-02-04T23:55:35.647079281Z + return 1 2024-02-04T23:55:35.647118429Z + [[ -n 1G ]] 2024-02-04T23:55:35.647135867Z + log 'Setting initial memory to 1G and max to 1G' 2024-02-04T23:55:35.647150928Z + local oldState 2024-02-04T23:55:35.647764181Z ++ shopt -po xtrace 2024-02-04T23:55:35.648032958Z + oldState='set -o xtrace' 2024-02-04T23:55:35.648049205Z + shopt -u -o xtrace 2024-02-04T23:55:35.649910668Z [init] 2024-02-04 23:55:35+00:00 Setting initial memory to 1G and max to 1G 2024-02-04T23:55:35.649955364Z + [[ -n 1G ]] 2024-02-04T23:55:35.649979699Z + JVM_OPTS='-Xms1G ' 2024-02-04T23:55:35.649987865Z + [[ -n 1G ]] 2024-02-04T23:55:35.649994608Z + JVM_OPTS='-Xmx1G -Xms1G '
2024-02-05T00:05:20.064767305Z java.lang.OutOfMemoryError: Java heap space
the server has 768GB RAM and the Docker-Daemon runs Native Debian
Look at the memory setting of the image.
By the way, the docs have a search option that's super helpful to find what your looking for.
sorry my English isn't the best to search in the docs. can I add environment values to the container like? -e MEMORY="128G" -e JVM_XX_OPTS="-XX:MaxRAMPercentage=75" -m 128G I separate the environments about the server.properties to an env file and add them to Container , is that right?
I'd say keep it simple and use specific limits rather than percentage based. Since I assume you're initially using a compose file, replace
  JAVA_OPTS: "-Xms16G -Xmx64G"
with
  INIT_MEMORY: 16G
  MAX_MEMORY: 64G
and remove the JVM_XX_OPTS.
I'd say keep it simple and use specific limits rather than percentage based. Since I assume you're initially using a compose file, replace
JAVA_OPTS: "-Xms16G -Xmx64G"with
INIT_MEMORY: 16G MAX_MEMORY: 64Gand remove the
JVM_XX_OPTS.
Yes you Are Right
This is my Docker-Compose File
version: "3.8"
services:
  minecraft-server:
    container_name: minecraft-server  # Set the container name
    image: itzg/minecraft-server
    ports:
      - "25565:25565"  # Expose Minecraft server port
    environment:
      EULA: "TRUE"
      DEBUG: "true"
      OVERRIDE_SERVER_PROPERTIES: "true"  # Enable custom properties
      MEMORY: "128G"
      CF_API_KEY: "secure"  
      CF_SLUG: "all-the-mods-9"
       TYPE: "AUTO_CURSEFORGE"  
    volumes:
      - /minecraft-server:/data  # Mount /minecraft-server on the host to /data in the container
      - /minecraft-server/mods:/mods  # Mount /minecraft-server/mods on the host to /mods in the container
    networks:
      local:  # Set the network name
        ipv4_address: 192.168.2.180  # Assign a specific IP address to the container
    
networks:
  local:  # Define the network
    external: true  # Join the existing network named "minecraft-server-network"
ENV:
OVERRIDE_SERVER_PROPERTIES=true
DIFFICULTY=peacefull
MAX_TICK_TIME=-1
VIEW_DISTANCE=100
ALLOW_FLIGHT=true
OPS=meltymon
VIEW_DISTANCE=100
MAX_PLAYERS=2000
PVP=true
LEVEL_TYPE=biomesoplenty
MOTD=Welcome Home
"I have tried a lot, and I finally have the auto-download of mod packages from CurseForge up and running, but I keep encountering errors. Now, I have received a crash dump. When I disable the mods, the server works. Here is the crash dump: [link] (https://pastebin.com/skxr7FUK)."