Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


    Cloudron Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular

    Solved Forge app update

    Minecraft
    4
    12
    243
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • BrutalBirdie
      BrutalBirdie Staff @nebulon last edited by

      @atridad could you take a look at your forge app? It seems outdated and a simple swap in new versions ended up in a borked server.

      Like my work? Consider donating a beer 🍻 Cheers!

      ? 2 Replies Last reply Reply Quote 1
      • BrutalBirdie
        BrutalBirdie Staff @Guest last edited by

        @atridad said in Minecraft - Package Updates:

        Heads up, if you use a non-standard port you will need to restart the app for it to work. The server.properties file always starts at 25565. I believe this is the case for the other MC apps as well, but correct me if I am wrong.

        In your app package the server.properties is generated by the server it self on runtime.
        Meaning the first start will always generate the default file.

        For example - normal Minecraft app:
        https://git.cloudron.io/cloudron/minecraft-app

        COPY index.js package.json package-lock.json start.sh server.properties.template /app/code/
        

        then in the start.sh

        https://git.cloudron.io/cloudron/minecraft-app/-/blob/master/start.sh

        if [[ ! -f ${SETTINGS_FILE} ]]; then
            echo "=> Copy initial server.properties"
            cp /app/code/server.properties.template ${SETTINGS_FILE}
        fi
        
        if [[ -f ${SETTINGS_FILE} ]]; then
            echo "=> Update server port"
            sed -e "s/server-port.*/server-port=${SERVER_PORT}/" -i ${SETTINGS_FILE}
        
            if [[ -z "${RCON_PORT:-}" ]]; then
                echo "=> Disable rcon port"
                sed -e "s/rcon.port.*/rcon.port=/" -i ${SETTINGS_FILE}
                sed -e "s/enable-rcon.*/enable-rcon=false/" -i ${SETTINGS_FILE}
            else
                echo "=> Update rcon port"
                sed -e "s/rcon.port.*/rcon.port=${RCON_PORT}/" -i ${SETTINGS_FILE}
                sed -e "s/enable-rcon.*/enable-rcon=true/" -i ${SETTINGS_FILE}
            fi
        fi
        

        note: just noticed the RCON_PORT mapping is also missing in your start.sh, will fix that.

        We templated the server.properties file and copy and edit it before the first gosu start.
        In your case the file is missing and will be generated and by that always default.

        Like my work? Consider donating a beer 🍻 Cheers!

        1 Reply Last reply Reply Quote 1
        • ?
          A Former User @BrutalBirdie last edited by

          @BrutalBirdie I have it mostly working on a fork (cloudron Git). Just need to make sure the port gets set for server.properties on first start.

          1 Reply Last reply Reply Quote 1
          • ?
            A Former User @BrutalBirdie last edited by A Former User

            @BrutalBirdie @girish @nebulon Fixed: https://git.cloudron.io/cloudron/minecraft-forge-app/-/merge_requests/9

            Heads up, if you use a non-standard port you will need to restart the app for it to work. The server.properties file always starts at 25565. I believe this is the case for the other MC apps as well, but correct me if I am wrong.

            Basically I couldn't figure out a good way to fix what I mentioned above.

            BrutalBirdie 2 Replies Last reply Reply Quote 2
            • BrutalBirdie
              BrutalBirdie Staff @Guest last edited by BrutalBirdie

              @atridad Thanks! I will take a look at it.

              Like my work? Consider donating a beer 🍻 Cheers!

              1 Reply Last reply Reply Quote 0
              • BrutalBirdie
                BrutalBirdie Staff @Guest last edited by

                @atridad said in Minecraft - Package Updates:

                Heads up, if you use a non-standard port you will need to restart the app for it to work. The server.properties file always starts at 25565. I believe this is the case for the other MC apps as well, but correct me if I am wrong.

                In your app package the server.properties is generated by the server it self on runtime.
                Meaning the first start will always generate the default file.

                For example - normal Minecraft app:
                https://git.cloudron.io/cloudron/minecraft-app

                COPY index.js package.json package-lock.json start.sh server.properties.template /app/code/
                

                then in the start.sh

                https://git.cloudron.io/cloudron/minecraft-app/-/blob/master/start.sh

                if [[ ! -f ${SETTINGS_FILE} ]]; then
                    echo "=> Copy initial server.properties"
                    cp /app/code/server.properties.template ${SETTINGS_FILE}
                fi
                
                if [[ -f ${SETTINGS_FILE} ]]; then
                    echo "=> Update server port"
                    sed -e "s/server-port.*/server-port=${SERVER_PORT}/" -i ${SETTINGS_FILE}
                
                    if [[ -z "${RCON_PORT:-}" ]]; then
                        echo "=> Disable rcon port"
                        sed -e "s/rcon.port.*/rcon.port=/" -i ${SETTINGS_FILE}
                        sed -e "s/enable-rcon.*/enable-rcon=false/" -i ${SETTINGS_FILE}
                    else
                        echo "=> Update rcon port"
                        sed -e "s/rcon.port.*/rcon.port=${RCON_PORT}/" -i ${SETTINGS_FILE}
                        sed -e "s/enable-rcon.*/enable-rcon=true/" -i ${SETTINGS_FILE}
                    fi
                fi
                

                note: just noticed the RCON_PORT mapping is also missing in your start.sh, will fix that.

                We templated the server.properties file and copy and edit it before the first gosu start.
                In your case the file is missing and will be generated and by that always default.

                Like my work? Consider donating a beer 🍻 Cheers!

                1 Reply Last reply Reply Quote 1
                • girish
                  girish Staff last edited by

                  @atridad @BrutalBirdie thanks for this. So, I pushed a new package now. Can you check if a fresh install works OK?

                  Update is marked as unstable currently, so things won't auto update.

                  1 Reply Last reply Reply Quote 0
                  • Topic has been marked as a question  BrutalBirdie BrutalBirdie 
                  • Topic has been marked as solved  BrutalBirdie BrutalBirdie 
                  • T
                    TLeM4 last edited by

                    I think i have some crash with the new release.
                    Update from 1.16.5.

                    I have the full log if you need it

                    2022-05-08T01:22:51.000Z at processTimers (internal/timers.js:497:7) [ /app/code/node_modules/express/lib/application.js:630:43 ]
                    2022-05-08T01:22:51.000Z ERROR ServiceUnavailableError: Response timeout
                    2022-05-08T01:22:51.000Z at IncomingMessage.<anonymous> (/app/code/node_modules/connect-timeout/index.js:84:8)
                    2022-05-08T01:22:51.000Z at IncomingMessage.emit (events.js:315:20)
                    2022-05-08T01:22:51.000Z at Timeout.<anonymous> (/app/code/node_modules/connect-timeout/index.js:49:11)
                    2022-05-08T01:22:51.000Z at listOnTimeout (internal/timers.js:554:17)
                    2022-05-08T01:22:51.000Z at processTimers (internal/timers.js:497:7) [ /app/code/node_modules/express/lib/application.js:630:43 ]
                    2022-05-08T01:24:38.000Z ERROR LDAP error connect ETIMEDOUT 172.18.0.1:3002 [ /app/code/backend/routes.js:75:21 ]
                    2022-05-08T01:24:38.000Z connect ETIMEDOUT 172.18.0.1:3002 Error: connect ETIMEDOUT 172.18.0.1:3002
                    2022-05-08T01:24:38.000Z at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1146:16)
                    2022-05-08T01:24:50.000Z ERROR LDAP error connect ETIMEDOUT 172.18.0.1:3002 [ /app/code/backend/routes.js:75:21 ]
                    2022-05-08T01:24:50.000Z connect ETIMEDOUT 172.18.0.1:3002 Error: connect ETIMEDOUT 172.18.0.1:3002
                    2022-05-08T01:24:50.000Z at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1146:16)
                    2022-05-08T01:24:50.000Z ERROR LDAP error connect ETIMEDOUT 172.18.0.1:3002 [ /app/code/backend/routes.js:75:21 ]
                    2022-05-08T01:24:50.000Z connect ETIMEDOUT 172.18.0.1:3002 Error: connect ETIMEDOUT 172.18.0.1:3002
                    2022-05-08T01:24:50.000Z at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1146:16)
                    2022-05-08T18:25:11.000Z [18:25:11] [Server thread/INFO] [ne.mi.co.AdvancementLoadFix/]: Using new advancement loading for net.minecraft.advancements.PlayerAdvancements@6122d325
                    2022-05-08T18:25:11.000Z [18:25:11] [Server thread/INFO] [minecraft/PlayerList]: User3[/3.4.5.6:56382] logged in with entity id 139 at (20.849399336919795, 73.0, -53.43918182426666)
                    2022-05-08T18:25:11.000Z [18:25:11] [Server thread/INFO] [minecraft/DedicatedServer]: User3 joined the game
                    2022-05-08T18:30:05.000Z [18:30:05] [Server thread/INFO] [minecraft/DedicatedServer]: User3 has made the advancement [Sweet Dreams]
                    2022-05-08T20:23:40.000Z [20:23:40] [Server thread/INFO] [minecraft/ServerPlayNetHandler]: User3 lost connection: Disconnected
                    2022-05-08T20:23:40.000Z [20:23:40] [Server thread/INFO] [minecraft/DedicatedServer]: User3 left the game
                    2022-05-09T08:38:56.000Z => Ensure directories
                    2022-05-09T08:38:56.000Z => Accept EULA
                    2022-05-09T08:38:56.000Z => Update server port
                    2022-05-09T08:38:56.000Z => Update query port
                    2022-05-09T08:38:56.000Z => Disable rcon port
                    2022-05-09T08:38:56.000Z => Ensure permissions
                    2022-05-09T08:38:56.000Z => Starting management server
                    2022-05-09T08:38:56.000Z Use ldap auth
                    2022-05-09T08:38:56.000Z Server is up and running on port 3000
                    2022-05-09T08:38:56.000Z start minecraft server with memory limit 1638 M
                    2022-05-09T08:38:56.000Z Error: could not open `libraries/net/minecraftforge/forge/1.18.2-40.1.0/unix_args.txt'
                    2022-05-09T08:39:39.000Z => Ensure directories
                    2022-05-09T08:39:39.000Z => Accept EULA
                    2022-05-09T08:39:39.000Z => Update server port
                    2022-05-09T08:39:39.000Z => Update query port
                    2022-05-09T08:39:39.000Z => Disable rcon port
                    2022-05-09T08:39:39.000Z => Ensure permissions
                    2022-05-09T08:39:39.000Z => Starting management server
                    2022-05-09T08:39:40.000Z Use ldap auth
                    2022-05-09T08:39:41.000Z Server is up and running on port 3000
                    2022-05-09T08:39:41.000Z start minecraft server with memory limit 1638 M
                    2022-05-09T08:39:41.000Z Error: could not open `libraries/net/minecraftforge/forge/1.18.2-40.1.0/unix_args.txt'
                    
                    ? 1 Reply Last reply Reply Quote 0
                    • ?
                      A Former User @TLeM4 last edited by

                      @TLeM4 the update might be the issue. I found I am not great at managing updates vs fresh installs.

                      Any ideas @BrutalBirdie ?

                      BrutalBirdie 1 Reply Last reply Reply Quote 0
                      • BrutalBirdie
                        BrutalBirdie Staff @Guest last edited by

                        I did not test the update step as well.
                        Also afaik the app also has no automated tests.

                        Right now the best solution might be to install a fresh forge server and migrate the world from the backup.
                        If I find the time I can take a look at it.

                        Like my work? Consider donating a beer 🍻 Cheers!

                        1 Reply Last reply Reply Quote 1
                        • girish
                          girish Staff last edited by

                          The error here seems same as https://forum.cloudron.io/topic/5719/minecraft-admin-ui-ldap-errors

                          1 Reply Last reply Reply Quote 0
                          • girish
                            girish Staff last edited by

                            The app update issue has to do with the package using /app/data in the Dockerfile for storing the forge code. The thumbrule is to not use /app/data in the Dockerfile directly. During an update, nobody copies over the latest "/app/data" into existing "/app/data".

                            I am making a fix.

                            ? 1 Reply Last reply Reply Quote 1
                            • ?
                              A Former User @girish last edited by A Former User

                              @girish huh I thought I put it in app code this time. Was the previous version using app/data? That’ll definitely do it.

                              Never mind I had issues with Minecraft itself being in there with their new install method

                              1 Reply Last reply Reply Quote 0
                              • First post
                                Last post
                              Powered by NodeBB