itzg / docker-minecraft-server

Docker image that provides a Minecraft Server that will automatically download selected version at startup
https://docker-minecraft-server.readthedocs.io/
Apache License 2.0
9.31k stars 1.53k forks source link

ERROR unable to locate the installed FTB server jar #1492

Closed Phelms215 closed 2 years ago

Phelms215 commented 2 years ago

New FTBA installs fine, but on the run I get the crash loop. The server file does exist though, as do all of the mods the pack downloads.

[init] Running as uid=1004 gid=1004 with /data as 'drwxrwxr-x 9 1004 1004 4096 Apr 27 15:50 /data' [init] Resolved version given LATEST into 1.18.2 and major version 1.18 [init] Resolving type given FTBA [init] FTB modpack ID 94, version ID 2120 is ready to go [init] ERROR unable to locate the installed FTB server jar minecraft_server.1.18.2.jar

crafty615 commented 2 years ago

I'm getting the same error with the same modpack.

itzg commented 2 years ago

Can you list what files it places in the container's /data path?

crafty615 commented 2 years ago

.ftb-installed eula.txt ftb-installer gamemode.json minecraft_server.1.18.2.jar run.bat run.sh user_jvm_args.txt version.json

itzg commented 2 years ago

Thanks. Ah yes, the FTBA support doesn't yet know to use the run scripts.

bradsk88 commented 2 years ago

Is there any way to work around this? For example, can I disable the automatic server startup so that I can do it manually via interactive console?

itzg commented 2 years ago

@bradsk88 given the modpack zip you can try using GENERIC_PACK along with TYPE=FORGE and the specific VERSION the pack expects.

rickyelopez commented 2 years ago

I'm hitting this too with the new Direwolf20 pack (pack 95 version 2125). No way to download a pack zip from FTB though as far as I can tell? So can't try the fix above. Any other way to get around this?

bradsk88 commented 2 years ago

I've whipped up a hackfix that works

https://github.com/bradsk88/docker-minecraft-server https://hub.docker.com/r/bradsk88/docker-minecraft-server

Not a proper solution by any means. But it'll get you gaming.

rickyelopez commented 2 years ago

Hey that worked, thanks! I just downloaded the modified script and mounted it over the one in the build, rather than pulling your image.

itzg commented 2 years ago

@bradsk88 is there part of that that could be PR'ed here?

bradsk88 commented 2 years ago

I'll open a PR. It's definitely a shortcut fix tho.

seanwcom commented 2 years ago

I got around the error by adding a new variant to the start-deployFTBA script.

Example:

variants=(
  forge-${mcVersion}-${forgeVersion}.jar
  forge-${mcVersion}-${forgeVersion}-universal.jar
  forge-${mcVersion}-${forgeVersion}-${mcVersion}-universal.jar
  fabric-${mcVersion}-${fabricVersion}-server-launch.jar
  run.sh
)

Doing this allows the remaining scripts to run, and then ultimately in start-finalExec there is code that recognizes when $SERVER has run.sh in the var, and uses that appropriately. I haven't tested extensively, but building and running the new Direwolf20 pack was successful.

itzg commented 2 years ago

@seanwcom I like that!

@bradsk88 I know I asked for it, but do you mind if I close your PR and we can do one with this new idea?

bradsk88 commented 2 years ago

Fine by me :+1:

dualmacops commented 2 years ago

I got around the error by adding a new variant to the start-deployFTBA script.

Example:

variants=(
  forge-${mcVersion}-${forgeVersion}.jar
  forge-${mcVersion}-${forgeVersion}-universal.jar
  forge-${mcVersion}-${forgeVersion}-${mcVersion}-universal.jar
  fabric-${mcVersion}-${fabricVersion}-server-launch.jar
  run.sh
)

Doing this allows the remaining scripts to run, and then ultimately in start-finalExec there is code that recognizes when $SERVER has run.sh in the var, and uses that appropriately. I haven't tested extensively, but building and running the new Direwolf20 pack was successful.

How do i apply this change? Or is goint to be applied soon?

seanwcom commented 2 years ago

@dualmacops - I assume the dev will integrate it into the next release, but if you wanted to do it yourself you would need to download the source, make this change, then build your own docker image. If you're familiar with Docker this is pretty straightforward, but if not then I would recommend just waiting.

dualmacops commented 2 years ago

@seanwcom I'm familiar with docker, but i'm trying to use it with Truenas Scale and changing the image doesn't look easy.

rickyelopez commented 2 years ago

@dualmacops or you could just use the solution I posted above, just make the file locally and mount it over the default location in the container.

seanwcom commented 2 years ago

@dualmacops - Oh gotcha. I'm not familiar with Truenas Scale and how it implements docker images. I'm using Unraid on my home server, and I'm able to specify the image to use. So I had to pull down code, build new image, and push that image to a location that Unraid could pull it from (in my case, up to Dockerhub). So instead of itzg/minecraft-server I'm using my newly pushed image.

itzg commented 2 years ago

Sorry, I think I was waiting on you @seanwcom to submit a PR for that...but I didn't actually say that. I can make the change or a PR would be great too.

seanwcom commented 2 years ago

Oh! Haha, happy to submit one.

SjessN commented 2 years ago

Hi. Just wanted to say that I set up my container yesterday and that I am still having the issue as described here. Logs _minecraft_mc_1_logs.txt Files in the volume config defaultconfigs eula.txt ftb-installer kubejs libraries log4jfix minecraft_server.1.18.2.jar mods resourcepacks run.bat run.sh user_jvm_args.txt version.json Compose file version: "3"

services: mc: image: itzg/minecraft-server:multiarch ports:

I have also deleted the volume entirely and set up the container from scratch numerous times.

seanwcom commented 2 years ago

Hey @SjessN, I just tried to run with your compose file and got the same error, but I think has something to do with the image:tag combo you are using. I just ran a test by replacing multiarch with latest and it works fine. I also tested with java17-alpine which also worked.

Looking through the list of published tags on Dockerhub, I don't see one for just multiarch, but I'm relatively new to using this project though, so I don't know if that's something previously supported or not.

Here's my compose file for reference:

version: "3"

services:
  mc:
    image: itzg/minecraft-server:latest
    ports:
    - 25565:25565
    volumes:
    - /home/seanwcom/dev/tmp/data:/data
    environment:
      EULA: "TRUE"
      TYPE: FTBA
      FTB_MODPACK_ID: 95
      MEMORY: 4G
      MOTD: "Testing"
    tty: true
    stdin_open: true
    restart: unless-stopped
SjessN commented 2 years ago

@seanwcom : Thank you for responding. I'm pretty sure I know just enough about docker to take examples too literally. The only reason I used multiarch was because that was in the direwolf 1.12 ftb example in the readme.

Changing over to image: itzg/minecraft-server:latest worked perfectly. I'm going to go put my server through its paces since it is running now!

Thanks!

itzg commented 2 years ago

Oops, that particular image tag is ancient. I also need to update something in the docs ...can you give me the link to the section that had that info?

SjessN commented 2 years ago

@itzg https://github.com/itzg/docker-minecraft-server#example

dualmacops commented 2 years ago

@seanwcom i looked for the tags that were updated in the last day in dockerhub, in my case i'm using itzg/minecraft-server:java17 for DW20 1.18.2 pack

seanwcom commented 2 years ago

@dualmacops - yeah, that tag is good as well (just ran a quick test). I suspect itzg has quite a robust deployment system in place that tests before he releases/publishes to Dockerhub. With that many different server types to support, I hope so at least. :)