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 Cloudron is offline reconnecting - Happened after OS upgrade

    Support
    nodejs upgrade
    2
    6
    368
    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.
    • M
      makemrproper last edited by makemrproper

      Problem description

      I cannot reach the control plane of Cloudron!
      598ef4a3-788f-4cde-93bd-271bd62e67a2-image.png

      Context description

      I just upgraded my VPS from Ubuntu 1604 to 1804 after Cloudron recommended it.

      The OS upgrade went well. I followed the instructions provided by you after a VM snapshot. All good. lsb-release -a now shows 1804. Next stop 2004. But not before I fix this issue, and snapshot my VPS again.


      Runtime environment description

      Ubuntu 1804 Ubuntu untouched vanilla, upgraded from 1604 untouched vanilla.
      My containers are up and running, and I can reach them.

      Debug description

      Here is the output in /home/yellowtent/platformdata/logs/box.log

      2021-08-04T20:18:51.562Z box:settings initCache: pre-load settings
      Error starting server { BoxError: Could not save dhparams.pem: Cannot read property 'isPromise' of undefined
          at initSecrets (/home/yellowtent/box/src/blobs.js:80:78)
          at <anonymous>
          at process._tickCallback (internal/process/next_tick.js:188:7)
        name: 'BoxError',
        reason: 'FileSystem Error',
        details: {},
        message: 'Could not save dhparams.pem: Cannot read property \'isPromise\' of undefined' }
      2021-08-04T20:18:55.567Z box:server ==========================================
      2021-08-04T20:18:55.568Z box:server            Cloudron 6.3.5
      2021-08-04T20:18:55.568Z box:server ==========================================
      2021-08-04T20:18:55.656Z box:settings initCache: pre-load settings
      Error starting server { BoxError: Could not save dhparams.pem: Cannot read property 'isPromise' of undefined
          at initSecrets (/home/yellowtent/box/src/blobs.js:80:78)
          at <anonymous>
          at process._tickCallback (internal/process/next_tick.js:188:7)
        name: 'BoxError',
        reason: 'FileSystem Error',
        details: {},
        message: 'Could not save dhparams.pem: Cannot read property \'isPromise\' of undefined' }
      
      

      Deep down in the bowels of Nodejs forums I encountered that it could have something to do with a NodeJS module that needed to behave according to a certain version. Source: https://github.com/TrilonIO/angular-application-insights/issues/31

      Question / request for hlep
      Any help on this would be much appreciated!

      Some analysis:

      Is this an npm cache issue? should I clear the npm cache? How do I do this? Invoke npm cache clean?

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

        @makemrproper Not seen that error before. But it seems that maybe nodejs got downgraded or something. Can you see the output of node --version ? It should be 14.15.4

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

          The error seems to be coming from the use of util.types.isPromise in the code. https://nodejs.org/api/util.html#util_util_types says it was added in node 10. So, maybe node is something < 10 ?

          M 1 Reply Last reply Reply Quote 0
          • M
            makemrproper @girish last edited by makemrproper

            @girish

            Output of node --version:
            v8.10.0

            npm cache verify states:

            | New major version of npm available! 6.14.10 → 7.20.3 │
            | Changelog: https://github.com/npm/cli/releases/tag/v7.20.3 │
            │ Run npm install -g npm to update!

            You were spot on šŸ™‚

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

              @makemrproper Cloudron installs nodejs from nodejs.org itself and not from ubuntu. So, maybe this was just some leftover from your previous installation (?) . Anyway, you can uninstall nodejs entirely. apt remove nodejs. Then, you will find Cloudron's nodejs in /usr/local/node-14.15.4 . Just ln -sf /usr/local/node-14.15.4/bin/node /usr/bin/node. Then, if node --version gives the correct output, do systemctl restart box . šŸ¤ž

              M 1 Reply Last reply Reply Quote 0
              • M
                makemrproper @girish last edited by makemrproper

                @girish Boom! Back up and running šŸ™‚
                Well this was a joyous outcome. Thanks a bunch Girish!

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