Skip to content

Keep getting not enough space error #3368

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Wordlesschunk opened this issue Mar 16, 2025 · 10 comments
Open

Keep getting not enough space error #3368

Wordlesschunk opened this issue Mar 16, 2025 · 10 comments

Comments

@Wordlesschunk
Copy link

Describe the problem

Morning guys

seem to keep getting this error appearing below

Image

this seems to happen no matter what pack i choose can anyone share some light on a possible solution for this please?

Container definition

  GNU nano 6.2                                                                          docker-compose.yml                                                                                    
services:
  mc:
    image: itzg/minecraft-server:java21
    environment:
      EULA: true
      MODPACK_PLATFORM: AUTO_CURSEFORGE
      CF_SLUG: skyfactory-4
      CF_FILENAME_MATCHER: 4.2.4
      CF_API_KEY: fooBar
      MEMORY: 4G
    ports:
      - "25565:25565"
    volumes:
      - mc-data:/data
volumes:
  mc-data:

Container logs

Attaching to mc-1
mc-1  | [init] Running as uid=1000 gid=1000 with /data as 'drwxr-x--- 14 1000 1000 4096 Mar 16 14:03 /data'
mc-1  | [mc-image-helper] 14:04:02.612 INFO  : Requested CurseForge modpack SkyFactory 4 - 4.2.4 is already installed for SkyFactory 4
mc-1  | [mc-image-helper] 14:04:03.045 INFO  : Forge version 14.23.5.2860 for minecraft version 1.12.2 is already installed
mc-1  | [mc-image-helper] 14:04:06.243 INFO  : Created/updated 1 property in /data/server.properties
mc-1  | [init] Setting initial memory to 4G and max to 4G
mc-1  | [init] Starting the Minecraft server...
mc-1  | #
mc-1  | # There is insufficient memory for the Java Runtime Environment to continue.
mc-1  | # Native memory allocation (mmap) failed to map 4294967296 bytes. Error detail: committing reserved memory.
mc-1  | OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x0000000700000000, 4294967296, 0) failed; error='Not enough space' (errno=12)
mc-1  | # An error report file with more information is saved as:
mc-1  | # /data/hs_err_pid188.log
mc-1  | 2025-03-16T14:04:06.371Z        WARN    mc-server-runner        Minecraft server failed. Inspect logs above for errors that indicate cause. DO NOT report this line as an error.     {"exitCode": 1}
mc-1  | 2025-03-16T14:04:06.371Z        INFO    mc-server-runner        Done
mc-1 exited with code 1```
@itzg
Copy link
Owner

itzg commented Mar 16, 2025

Set DEBUG_MEMORY env var to "true" and provide those logs.

@Wordlesschunk
Copy link
Author

Wordlesschunk commented Mar 16, 2025

Image

thanks for the swift reply!

im also using a digital ocean droplet, unsure if that could be a cause?
8 GB Memory / 2 AMD vCPUs / 80 GB Disk / LON1 - Docker on Ubuntu 22.04

@itzg
Copy link
Owner

itzg commented Mar 16, 2025

You're getting a different error now. You need to adjust your image tag used

https://docker-minecraft-server.readthedocs.io/en/latest/versions/java/#java-8

Preciously, you must have been low on free memory before, which is likely when carving out 4GB from an 8 GB VM. This time you have about 5GB free.

@Wordlesschunk
Copy link
Author

Wordlesschunk commented Mar 18, 2025

Thanks for that @itzg
i made that change to the docker file (see below)

version: '3.8'
services:
  game:
    image: itzg/minecraft-server:java8
    tty: true
    stdin_open: true
    ports:
      - '25565:25565'
    environment:
      EULA: true
      CREATE_CONSOLE_IN_PIPE: true
      MOD_PLATFORM: AUTO_CURSEFORGE
      CF_API_KEY: fooBar     
      MEMORY: 4G
      CF_SLUG: skyfactory-4
      CF_FILENAME_MATCHER: 4.2.4
    volumes:
      - './data:/data'

But i still get the server failing to boot

Image

I thought maybe it was just random and maybe if i tried a different pack that might work instead, so i used:

version: '3.8'
services:
  game:
    image: itzg/minecraft-server:java21
    tty: true
    stdin_open: true
    ports:
      - '25565:25565'
    environment:
      EULA: true
      CREATE_CONSOLE_IN_PIPE: true
      MOD_PLATFORM: AUTO_CURSEFORGE
      CF_API_KEY: fooBar     
      MEMORY: 4G
      CF_SLUG: beyond-depth
    volumes:
      - './data:/data'

but again getting errors when the server is booting

Image

is this just due to me not using the correct java version for each pack and if so is there a easy way for me to know or is this something deeper?
feel like whichever pack i try i get similar errors

Many thanks again!

@itzg
Copy link
Owner

itzg commented Mar 18, 2025

You're getting a totally different error each time since you're changing the scenario each time. What modpack do you actually want to be running? Let's focus on getting that one working.

@Wordlesschunk
Copy link
Author

Okay, lets try and get the skyfactory-4 one working if thats okay.

sorry for changing the scenario, each time i'm just trying to understand if theres a commonality here with this, as before i never had an issue just spinning up any other pack

thanks

@itzg
Copy link
Owner

itzg commented Mar 19, 2025

Server was able to startup with this compose file:

services:
  mc:
    # sky-factory-4 uses Forge 1.12.2 where it and its mods tends to be compatible with Java 8
    # See https://docker-minecraft-server.readthedocs.io/en/latest/versions/java/#java-8
    image: itzg/minecraft-server:java8
    tty: true
    stdin_open: true
    environment:
      EULA: true
      MOD_PLATFORM: AUTO_CURSEFORGE
      # Allocate API key from https://console.curseforge.com/
      # and set in .env file making sure to double up dollar signs, such as
      # CF_API_KEY=$$2a$$10$$....
      # Refer to https://docker-minecraft-server.readthedocs.io/en/latest/types-and-platforms/mod-platforms/auto-curseforge/#api-key
      CF_API_KEY: ${CF_API_KEY}
      CF_SLUG: skyfactory-4
      # exclude client mods not yet listed in
      # https://github.com/itzg/docker-minecraft-server/blob/master/files/cf-exclude-include.json
      CF_EXCLUDE_MODS: |
        waila-stages
      CF_FORCE_SYNCHRONIZE: true
      MEMORY: 4G
    ports:
      - "25565:25565"
    volumes:
      # using a managed volume, but could also be a host directory binding like ./data
      - mc-data:/data
volumes:
  mc-data:

@Wordlesschunk
Copy link
Author

Thanks for the support @itzg i do appreciate it
is there anything that can be taken away from this? i assume that if booting another pack and i get similar errors to that its just a case of excluding that mod

for the beyond-depth error is that more just relating to forge versioning?

thanks

@itzg
Copy link
Owner

itzg commented Mar 19, 2025

Yeah, most of the time with CurseForge modpacks it'll be a client mod that needs to be excluded. More info here:

https://docker-minecraft-server.readthedocs.io/en/latest/types-and-platforms/mod-platforms/auto-curseforge/#exclude-client-mods

Otherwise, yes, the remaining issue was Java version compatibility with Forge.

Now the originally out of memory issue was likely just the VM's operating system simply didn't have enough free memory at the time.

@joeltoth
Copy link

joeltoth commented Apr 3, 2025

No matter what I do and what I change I keep getting an "papermc exited with code 137". My host has a ton of free memory.

  papermc:
    container_name: papermc
    image: itzg/minecraft-server:latest
    tty: true
    stdin_open: true
    network_mode: host
    healthcheck:
      disable: true
    environment:
      EULA: "TRUE"
      SERVER_PORT: 25565
      TYPE: PAPER
      VERSION: "1.21.4"
      MEMORY: "4G"
      DEBUG_MEMORY: "true"
    restart: always
    volumes:
      - /srv/minecraft/data:/data

Image

Image

If I run the thing without docker compose it boots up... what's up with the docker compose not working?
docker run -it --rm
--network host
-e EULA=TRUE
-e MEMORY=4G
-e VERSION=1.21.6
-e TYPE=PAPER
itzg/minecraft-server

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants