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.24k stars 1.52k forks source link

forge installation failed #3079

Closed kotorimiku closed 5 days ago

kotorimiku commented 6 days ago

Describe the problem

Even if I have all the forge files in my data directory, this still happens

Container definition

services:
  minecraft:
    image: itzg/minecraft-server
    container_name: mc
    tty: true
    stdin_open: true
    ports:
      - "25565:25565"
    volumes:
      - ./data:/data
    restart: unless-stopped
    environment:
      MEMORY: "2G"
      EULA: "TRUE"
      TYPE: FORGE
      VERSION: "1.20.1"
      FORGE_VERSION: "47.3.5"
      http_proxy: "http://172.17.0.1:7890"
      https_proxy: "http://172.17.0.1:7890"

Container logs

[init] Running as uid=1000 gid=1000 with /data as 'drwxr-xr-x 9 1000 1000 4096 Sep 23 14:12 /data'
[init] Resolving type given FORGE
[mc-image-helper] 15:29:18.492 ERROR : 'install-forge' command failed. Version is 1.39.11
reactor.core.Exceptions$ReactiveException: io.netty.channel.ConnectTimeoutException: connection timed out after 30000 ms: files.minecraftforge.net/172.67.161.211:443
    at reactor.core.Exceptions.propagate(Exceptions.java:408)
    at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:101)
    at reactor.core.publisher.Mono.block(Mono.java:1712)
    at me.itzg.helpers.http.ObjectFetchBuilder.execute(ObjectFetchBuilder.java:44)
    at me.itzg.helpers.forge.ForgeInstallerResolver.loadPromotions(ForgeInstallerResolver.java:115)
    at me.itzg.helpers.forge.ForgeInstallerResolver.resolve(ForgeInstallerResolver.java:40)
    at me.itzg.helpers.forge.ForgeInstaller.install(ForgeInstaller.java:58)
    at me.itzg.helpers.forge.InstallForgeCommand.call(InstallForgeCommand.java:103)
    at me.itzg.helpers.forge.InstallForgeCommand.call(InstallForgeCommand.java:19)
    at picocli.CommandLine.executeUserObject(CommandLine.java:2045)
    at picocli.CommandLine.access$1500(CommandLine.java:148)
    at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2465)
    at picocli.CommandLine$RunLast.handle(CommandLine.java:2457)
    at picocli.CommandLine$RunLast.handle(CommandLine.java:2419)
    at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2277)
    at picocli.CommandLine$RunLast.execute(CommandLine.java:2421)
    at picocli.CommandLine.execute(CommandLine.java:2174)
    at me.itzg.helpers.McImageHelper.main(McImageHelper.java:159)
    Suppressed: java.lang.Exception: #block terminated with an error
        at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:103)
        ... 16 common frames omitted
Caused by: io.netty.channel.ConnectTimeoutException: connection timed out after 30000 ms: files.minecraftforge.net/172.67.161.211:443
    at io.netty.channel.epoll.AbstractEpollChannel$AbstractEpollUnsafe$2.run(AbstractEpollChannel.java:615)
    at io.netty.util.concurrent.PromiseTask.runTask(PromiseTask.java:98)
    at io.netty.util.concurrent.ScheduledFutureTask.run(ScheduledFutureTask.java:156)
    at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:173)
    at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:166)
    at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:469)
    at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:408)
    at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:994)
    at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
    at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
    at java.base/java.lang.Thread.run(Unknown Source)
[init] ERROR failed to install Forge
itzg commented 6 days ago

The proxy variables seem to be wrong. Look at

https://docker-minecraft-server.readthedocs.io/en/latest/configuration/misc-options/#http-proxy

Also, having "the files" is not good enough. Forge needs to run the installer to setup.

kotorimiku commented 6 days ago

After changing the proxy variables, the error still occurs.

[init] Running as uid=1000 gid=1000 with /data as 'drwxr-xr-x 9 1000 1000 4096 Sep 23 14:12 /data'
[init] INFO: Giving proxy time to startup...
[init] Resolving type given FORGE
Picked up JAVA_TOOL_OPTIONS: -Djava.net.useSystemProxies=true
[mc-image-helper] 01:20:08.058 ERROR : 'install-forge' command failed. Version is 1.39.11
reactor.core.Exceptions$ReactiveException: io.netty.channel.ConnectTimeoutException: connection timed out after 30000 ms: files.minecraftforge.net/172.67.161.211:443
    at reactor.core.Exceptions.propagate(Exceptions.java:408)
    at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:101)
    at reactor.core.publisher.Mono.block(Mono.java:1712)
    at me.itzg.helpers.http.ObjectFetchBuilder.execute(ObjectFetchBuilder.java:44)
    at me.itzg.helpers.forge.ForgeInstallerResolver.loadPromotions(ForgeInstallerResolver.java:115)
    at me.itzg.helpers.forge.ForgeInstallerResolver.resolve(ForgeInstallerResolver.java:40)
    at me.itzg.helpers.forge.ForgeInstaller.install(ForgeInstaller.java:58)
    at me.itzg.helpers.forge.InstallForgeCommand.call(InstallForgeCommand.java:103)
    at me.itzg.helpers.forge.InstallForgeCommand.call(InstallForgeCommand.java:19)
    at picocli.CommandLine.executeUserObject(CommandLine.java:2045)
    at picocli.CommandLine.access$1500(CommandLine.java:148)
    at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2465)
    at picocli.CommandLine$RunLast.handle(CommandLine.java:2457)
    at picocli.CommandLine$RunLast.handle(CommandLine.java:2419)
    at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2277)
    at picocli.CommandLine$RunLast.execute(CommandLine.java:2421)
    at picocli.CommandLine.execute(CommandLine.java:2174)
    at me.itzg.helpers.McImageHelper.main(McImageHelper.java:159)
    Suppressed: java.lang.Exception: #block terminated with an error
        at reactor.core.publisher.BlockingSingleSubscriber.blockingGet(BlockingSingleSubscriber.java:103)
        ... 16 common frames omitted
Caused by: io.netty.channel.ConnectTimeoutException: connection timed out after 30000 ms: files.minecraftforge.net/172.67.161.211:443
    at io.netty.channel.epoll.AbstractEpollChannel$AbstractEpollUnsafe$2.run(AbstractEpollChannel.java:615)
    at io.netty.util.concurrent.PromiseTask.runTask(PromiseTask.java:98)
    at io.netty.util.concurrent.ScheduledFutureTask.run(ScheduledFutureTask.java:156)
    at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:173)
    at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:166)
    at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:469)
    at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:408)
    at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:994)
    at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
    at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
    at java.base/java.lang.Thread.run(Unknown Source)
[init] ERROR failed to install Forge

The data directory is like this, why does it still need to install forge

image

itzg commented 6 days ago

You'll need to investigate your network issue.

As I mentioned it needs a Forge installer since it can't simply detect Forge was already installed

https://docker-minecraft-server.readthedocs.io/en/latest/types-and-platforms/server-types/forge/#:~:text=to%20use%20a%20pre%2Ddownloaded%20forge%20installer%2C%20place%20it%20in%20a%20location%20mounted%20into%20the%20container%20and%20specify%20the%20container%20path%20with%20forge_installer "To use a pre-downloaded Forge installer, place it in a location mounted into the container and specify the container path with FORGE_INSTALLER"