Skip to content

Auto Pause fails to initialize if UID & GID is specified #1233

@FineWolf

Description

@FineWolf

Describe the problem

In the case where ENABLE_AUTOPAUSE=true, UID=### (not 0) and GID=### (not 0), ENABLE_AUTOPAUSE fails to initialize with the following error:

[init] Updated server port in knockd config
sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper

Container definition

[
    {
       // Docker config
        "Config": {
            "Hostname": "2b7bf2f09776",
            "Domainname": "",
            "User": "",
            "AttachStdin": false,
            "AttachStdout": false,
            "AttachStderr": false,
            "ExposedPorts": {
                "25565/tcp": {},
                "25575/tcp": {}
            },
            "Tty": false,
            "OpenStdin": false,
            "StdinOnce": false,
            "Env": [
                "OVERRIDE_SERVER_PROPERTIES=true",
                "OPS=[REMOVED]",
                "TYPE=SPIGOT",
                "SPIGET_RESOURCES=81534",
                "INIT_MEMORY=512M",
                "MAX_MEMORY=4G",
                "MOTD=[REMOVED]",
                "ENABLE_ROLLING_LOGS=true",
                "USE_AIKAR_FLAGS=true",
                "UID=1000",
                "GID=100",
                "TZ=America/New_York",
                "MODE=survival",
                "SERVER_NAME=[REMOVED]",
                "ENFORCE_WHITELIST=true",
                "ENABLE_AUTOPAUSE=true",
                "EULA=true",
                "DIFFICULTY=normal",
                "ENABLE_WHITELIST=true",
                "SERVER_PORT=25566",
                "SNOOPER_ENABLED=false",
                "MAX_TICK_TIME=-1",
                "VIEW_DISTANCE=10",
                "PATH=/opt/java/openjdk/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
                "LANG=en_US.UTF-8",
                "LANGUAGE=en_US:en",
                "LC_ALL=en_US.UTF-8",
                "JAVA_VERSION=jdk-17.0.1+12",
                "JAVA_HOME=/opt/java/openjdk",
                "MEMORY=1G",
                "VERSION=LATEST",
                "ENABLE_RCON=true",
                "RCON_PORT=25575",
                "RCON_PASSWORD=[REMOVED]",
                "AUTOPAUSE_TIMEOUT_EST=3600",
                "AUTOPAUSE_TIMEOUT_KN=120",
                "AUTOPAUSE_TIMEOUT_INIT=600",
                "AUTOPAUSE_PERIOD=10",
                "AUTOPAUSE_KNOCK_INTERFACE=eth0",
                "ENABLE_AUTOSTOP=false",
                "AUTOSTOP_TIMEOUT_EST=3600",
                "AUTOSTOP_TIMEOUT_INIT=1800",
                "AUTOSTOP_PERIOD=10"
            ],
            "Cmd": null,
            "Healthcheck": {
                "Test": [
                    "CMD-SHELL",
                    "mc-health"
                ],
                "StartPeriod": 60000000000
            },
            "Image": "itzg/minecraft-server",
            "Volumes": {
                "/data": {}
            },
            "WorkingDir": "/data",
            "Entrypoint": [
                "/start"
            ],
            "OnBuild": null,
            "Labels": {
                "org.opencontainers.image.authors": "Geoff Bourne <itzgeoff@gmail.com>",
                "org.opencontainers.image.created": "2021-12-24T00:38:36.444Z",
                "org.opencontainers.image.description": "Docker image that provides a Minecraft Server that will automatically download selected version at startup",
                "org.opencontainers.image.licenses": "Apache-2.0",
                "org.opencontainers.image.revision": "39519427bbc638442773329d88a8bd2d35c42691",
                "org.opencontainers.image.source": "https://github.com/itzg/docker-minecraft-server",
                "org.opencontainers.image.title": "docker-minecraft-server",
                "org.opencontainers.image.url": "https://github.com/itzg/docker-minecraft-server",
                "org.opencontainers.image.version": "master"
            },
            "StopSignal": "SIGTERM"
        },
    }
]

Container logs

[init] Updated server port in knockd config
sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions