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


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Support
  3. box service keeps restarting, SyntaxError: Unexpected token '.'

box service keeps restarting, SyntaxError: Unexpected token '.'

Scheduled Pinned Locked Moved Solved Support
cloudronerror msgboxfailure
20 Posts 5 Posters 933 Views 5 Watching
  • 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.
  • S Offline
    S Offline
    SunDevil
    wrote on last edited by
    #3

    Here's a screenshot showing the output of both cloudron-support --troubleshoot and node --version. Apologies for the attitude in the original post. Just frustrated.

    Screenshot

    girishG 1 Reply Last reply
    1
    • S SunDevil

      Here's a screenshot showing the output of both cloudron-support --troubleshoot and node --version. Apologies for the attitude in the original post. Just frustrated.

      Screenshot

      girishG Offline
      girishG Offline
      girish
      Staff
      wrote on last edited by
      #4

      @SunDevil the node version seems correct . But there is some other node coming from the system . Can you try sudo -u yellowtent /usr/bin/env node ?

      S 1 Reply Last reply
      0
      • girishG girish

        @SunDevil the node version seems correct . But there is some other node coming from the system . Can you try sudo -u yellowtent /usr/bin/env node ?

        S Offline
        S Offline
        SunDevil
        wrote on last edited by
        #5

        @girish Well that's interesting. I get Welcome to Node.js v12.22.9
        Type ".help" for more information.

        How in the world is that possible? How can I fix it?

        girishG 1 Reply Last reply
        0
        • S SunDevil

          @girish Well that's interesting. I get Welcome to Node.js v12.22.9
          Type ".help" for more information.

          How in the world is that possible? How can I fix it?

          girishG Offline
          girishG Offline
          girish
          Staff
          wrote on last edited by
          #6

          @SunDevil that is interesting indeed. I wonder how that is possible given that yellowtent is actually a disabled yser (you cannot do su - yellowtent). Cloudron has also never used that specific version of node, so I am not sure where it's coming from.

          Can you debug further with sudo -u yellowtent which node etc and remove that node? Maybe apt remove nodejs ? The system node /usr/bin/node should be a symlink to /usr/local/node-20.18.0/bin/node . sudo -u yellowtent bash will give you a bash with yellowtent user and then you can check where that node is coming from as well.

          S 2 Replies Last reply
          0
          • S SunDevil

            I've been having odd issues with my Cloudron for the past week or so. Apps were running fine, but backup tasks were failing. It'd refer me to the logs, which when checked, stated the file had been moved or did not exist.

            I'm set up to backup to S3 via rsync. It was working fine initially, so I'm not sure what happened. In any case, I created a snapshot (which supposedly saves state, and yet...) and made the boneheaded decision to reboot my VPS. It came back up, but I got the dreaded red "Cloudron is offline. Reconnecting..." banner. Something I've seen way too many times.

            I attempted to restore via snapshot, still getting the banner. I'm honestly wondering if the Cloudron distribution that Hostinger uses is fully stable. This has to be my 3rd or 4th attempt. It'll work fine at first, but inevitably the ticking time bomb goes off, and all I get is a red banner for no good reason.

            Cloudron-troubleshoot instructed me to run cloudron --fix-docker, as somehow Docker was a newer version. I've learned my lesson about running apt upgrade long ago, so I have no idea how that's possible. Would simply adding the PPA upgrade it as well?

            Regardless, it appeared it was going to succeed, but when it tries to start box, it just keeps restarting. This leads to an output of [FAIL] box service keeps restarting, please investigate the error by inspecting /home/yellowtent/platformdata/logs/box.log. The box.log (and 1, 2, and 3) are massive, and I have no idea what I'm looking for.

            Running journalctl -xeu box gave me the following:

            ░░ Subject: Unit process exited
            ░░ Defined-By: systemd
            ░░ Support: http://www.ubuntu.com/support
            ░░ 
            ░░ An ExecStart= process belonging to unit box.service has exited.
            ░░ 
            ░░ The process' exit code is 'exited' and its exit status is 1.
            Jan 10 06:37:24 c.example.com systemd[1]: box.service: Failed with result 'exit-code'.
            ░░ Subject: Unit failed
            ░░ Defined-By: systemd
            ░░ Support: http://www.ubuntu.com/support
            ░░ 
            ░░ The unit box.service has entered the 'failed' state with result 'exit-code'.
            Jan 10 06:37:24 c.example.com systemd[1]: box.service: Scheduled restart job, restart counter is at 2815.
            ░░ Subject: Automatic restarting of a unit has been scheduled
            ░░ Defined-By: systemd
            ░░ Support: http://www.ubuntu.com/support
            ░░ 
            ░░ Automatic restarting of the unit box.service has been scheduled, as the result for
            ░░ the configured Restart= setting for the unit.
            Jan 10 06:37:24 c.example.com systemd[1]: Stopped Cloudron Admin.
            ░░ Subject: A stop job for unit box.service has finished
            ░░ Defined-By: systemd
            ░░ Support: http://www.ubuntu.com/support
            ░░ 
            ░░ A stop job for unit box.service has finished.
            ░░ 
            ░░ The job identifier is 868014 and the job result is done.
            Jan 10 06:37:24 c.example.com systemd[1]: Started Cloudron Admin.
            ░░ Subject: A start job for unit box.service has finished successfully
            ░░ Defined-By: systemd
            ░░ Support: http://www.ubuntu.com/support
            ░░ 
            ░░ A start job for unit box.service has finished successfully.
            ░░ 
            ░░ The job identifier is 868014.
            Jan 10 06:37:24 c.example.com box.js[514142]: /home/yellowtent/box/src/ldapserver.js:206
            Jan 10 06:37:24 c.example.com box.js[514142]:         if (req.app.accessRestriction?.groups?.indexOf(group.id) === -1) continue;
            Jan 10 06:37:24 c.example.com box.js[514142]:                                       ^
            Jan 10 06:37:24 c.example.com box.js[514142]: SyntaxError: Unexpected token '.'
            Jan 10 06:37:24 c.example.com box.js[514142]:     at wrapSafe (internal/modules/cjs/loader.js:915:16)
            Jan 10 06:37:24 c.example.com box.js[514142]:     at Module._compile (internal/modules/cjs/loader.js:963:27)
            Jan 10 06:37:24 c.example.com box.js[514142]:     at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
            Jan 10 06:37:24 c.example.com box.js[514142]:     at Module.load (internal/modules/cjs/loader.js:863:32)
            Jan 10 06:37:24 c.example.com box.js[514142]:     at Function.Module._load (internal/modules/cjs/loader.js:708:14)
            Jan 10 06:37:24 c.example.com box.js[514142]:     at Module.require (internal/modules/cjs/loader.js:887:19)
            Jan 10 06:37:24 c.example.com box.js[514142]:     at require (internal/modules/cjs/helpers.js:85:18)
            Jan 10 06:37:24 c.example.com box.js[514142]:     at Object.<anonymous> (/home/yellowtent/box/box.js:7:18)
            Jan 10 06:37:24 c.example.com box.js[514142]:     at Module._compile (internal/modules/cjs/loader.js:999:30)
            Jan 10 06:37:24 c.example.com box.js[514142]:     at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
            Jan 10 06:37:24 c.example.com systemd[1]: box.service: Main process exited, code=exited, status=1/FAILURE
            ░░ Subject: Unit process exited
            ░░ Defined-By: systemd
            ░░ Support: http://www.ubuntu.com/support
            ░░ 
            ░░ An ExecStart= process belonging to unit box.service has exited.
            ░░ 
            ░░ The process' exit code is 'exited' and its exit status is 1.
            Jan 10 06:37:24 c.example.com systemd[1]: box.service: Failed with result 'exit-code'.
            ░░ Subject: Unit failed
            ░░ Defined-By: systemd
            ░░ Support: http://www.ubuntu.com/support
            ░░ 
            ░░ The unit box.service has entered the 'failed' state with result 'exit-code'.
            Jan 10 06:37:24 c.example.com systemd[1]: box.service: Scheduled restart job, restart counter is at 2816.
            

            SyntaxError: Unexpected token '.' appears to be the issue, but from what I've read the error only occurs in very old (<14) Node versions. Would really appreciate some assistance getting this up and running.

            If I have to nuke this box again, I think I'll forego Cloudron and just use the dedicated Nextcloud image. Far more limiting than I'd like, but better than endless failures.

            ~ SunDevil ~

            Screenshot

            scookeS Offline
            scookeS Offline
            scooke
            wrote on last edited by
            #7

            @SunDevil said in box service keeps restarting, SyntaxError: Unexpected token '.':

            learned my lesson about running apt upgrade long ago, so I have no idea how that's possible.

            Sounds like your snapshots are all using whatever borked-up state the system was at when it was made. So, of course any restores to these snapshots are going to continue to not work. If you can indeed reinstall fresh, do that. I'm not familiar with how Hostinger offers its VPSes, but those extra node versions, Docker, etc., all got installed "somehow". If it isn't Hostinger...

            A life lived in fear is a life half-lived

            S 1 Reply Last reply
            0
            • scookeS scooke

              @SunDevil said in box service keeps restarting, SyntaxError: Unexpected token '.':

              learned my lesson about running apt upgrade long ago, so I have no idea how that's possible.

              Sounds like your snapshots are all using whatever borked-up state the system was at when it was made. So, of course any restores to these snapshots are going to continue to not work. If you can indeed reinstall fresh, do that. I'm not familiar with how Hostinger offers its VPSes, but those extra node versions, Docker, etc., all got installed "somehow". If it isn't Hostinger...

              S Offline
              S Offline
              SunDevil
              wrote on last edited by
              #8

              @scooke Of course you're right. The only conclusion I can come up with is that simply adding the Docker PPA results in an apt update AND apt upgrade. The update is visible, but there's no indication it's running apt upgrade.

              Node is more complicated. I'll double check, but I don't recall installing fnm or anything. I may have to reach out to Hostinger about these issues.

              1 Reply Last reply
              0
              • girishG girish

                @SunDevil that is interesting indeed. I wonder how that is possible given that yellowtent is actually a disabled yser (you cannot do su - yellowtent). Cloudron has also never used that specific version of node, so I am not sure where it's coming from.

                Can you debug further with sudo -u yellowtent which node etc and remove that node? Maybe apt remove nodejs ? The system node /usr/bin/node should be a symlink to /usr/local/node-20.18.0/bin/node . sudo -u yellowtent bash will give you a bash with yellowtent user and then you can check where that node is coming from as well.

                S Offline
                S Offline
                SunDevil
                wrote on last edited by SunDevil
                #9

                @girish I'm even more confused. To the best of my knowledge, I haven't messed with the Node version.

                It's using /usr/bin/node, which oddly enough seems to be the only package not symlinked. The first command you gave me shows Node v20.18.0. The second command shows Node v12.22.9. The latter appears to be a default package included with Ubuntu 24.04.1 LTS.

                Full Data:

                Console Ouput

                Listing of /usr/bin, scoped to grep node

                Listing of installed packages, scoped to grep node

                scookeS girishG 2 Replies Last reply
                0
                • S SunDevil

                  @girish I'm even more confused. To the best of my knowledge, I haven't messed with the Node version.

                  It's using /usr/bin/node, which oddly enough seems to be the only package not symlinked. The first command you gave me shows Node v20.18.0. The second command shows Node v12.22.9. The latter appears to be a default package included with Ubuntu 24.04.1 LTS.

                  Full Data:

                  Console Ouput

                  Listing of /usr/bin, scoped to grep node

                  Listing of installed packages, scoped to grep node

                  scookeS Offline
                  scookeS Offline
                  scooke
                  wrote on last edited by
                  #10

                  @SunDevil Perhaps Hostinger provides "non-fresh" servers to its customers with a variety of programs already installed to save you time. Normally a fresh server would not come with Docker, node, etc., at all. Cloudron needs the fresh server because it needs to follow it's own install script. Sounds like Hostinger has maybe gotten the two "fresh" settings overlapped.

                  A life lived in fear is a life half-lived

                  1 Reply Last reply
                  0
                  • S SunDevil

                    @girish I'm even more confused. To the best of my knowledge, I haven't messed with the Node version.

                    It's using /usr/bin/node, which oddly enough seems to be the only package not symlinked. The first command you gave me shows Node v20.18.0. The second command shows Node v12.22.9. The latter appears to be a default package included with Ubuntu 24.04.1 LTS.

                    Full Data:

                    Console Ouput

                    Listing of /usr/bin, scoped to grep node

                    Listing of installed packages, scoped to grep node

                    girishG Offline
                    girishG Offline
                    girish
                    Staff
                    wrote on last edited by girish
                    #11

                    @SunDevil it seems there is a whole bunch of node modules installed via apt on the system. Cloudron doesn't install these. Cloudron installs the node version it wants under /usr/local/node-20.18.0/ and then creates a symlink. Something like this:

                    apt remove nodejs
                    ln -sf /usr/local/node-20.18.0/bin/node /usr/bin/node
                    

                    After this, node should be 20.18.0 . Then, you can systemctl restart box and it will start with the correct node.

                    1 Reply Last reply
                    0
                    • girishG girish

                      @SunDevil that is interesting indeed. I wonder how that is possible given that yellowtent is actually a disabled yser (you cannot do su - yellowtent). Cloudron has also never used that specific version of node, so I am not sure where it's coming from.

                      Can you debug further with sudo -u yellowtent which node etc and remove that node? Maybe apt remove nodejs ? The system node /usr/bin/node should be a symlink to /usr/local/node-20.18.0/bin/node . sudo -u yellowtent bash will give you a bash with yellowtent user and then you can check where that node is coming from as well.

                      S Offline
                      S Offline
                      SunDevil
                      wrote on last edited by
                      #12

                      @girish Here are the results. Still non-operable.

                      Screenshot

                      girishG 1 Reply Last reply
                      0
                      • S SunDevil

                        @girish Here are the results. Still non-operable.

                        Screenshot

                        girishG Offline
                        girishG Offline
                        girish
                        Staff
                        wrote on last edited by
                        #13

                        @SunDevil but node is still printing the old version. Did you run ln -sf /usr/local/node-20.18.0/bin/node /usr/bin/node already? Why is it still printing 12.x as node version?

                        1 Reply Last reply
                        0
                        • scookeS Offline
                          scookeS Offline
                          scooke
                          wrote on last edited by scooke
                          #14

                          I checked out Hostinger... its Cloudron image can be installed AFTER the initial server is provisioned. One reason for the errors @SunDevil is having is if they installed the Cloudron image after provisioning the server, and the server had been "managed" prior to the Cloudron installation. I don't think asking them to run normal troubleshooting is going to work here with their experience level. I recommend @SunDevil get more direct professional help to try to undo whatever was previously installed, even if that is paid-help from the Cloudron team. I don't think they'll be better off just going the Nextcloud route as, if the same conditions persist/repeat, Nextcloud is also going to start acting wonky and good luck getting THAT solved! Paying for ssh-access-level-help is your best way forward and let a techy person clear out all that extraneous stuff. Good luck.

                          A life lived in fear is a life half-lived

                          S 1 Reply Last reply
                          1
                          • J joseph

                            It seems nodejs is incorrect on the server. Can you run cloudron-support --troubleshoot on the server? It will tell you if the node version is correct or not.

                            S Offline
                            S Offline
                            SunDevil
                            wrote on last edited by SunDevil
                            #15

                            @joseph See my reply to @girish here:

                            • https://forum.cloudron.io/post/99788
                            1 Reply Last reply
                            0
                            • S Offline
                              S Offline
                              SunDevil
                              wrote on last edited by
                              #16

                              I'm starting to think giving Dokploy a spin may be worth it. Sounds more complicated than Cloudron, but then Cloudron is unstable.

                              This is either the third or fourth time I've lost my entire Nextcloud. It's just not worth the hassle with Cloudron.

                              That said, if you have any insights given my reply, please let me know. It seems to me this is unlikely to be rectified. If that's the case I'd prefer to just take the hit now rather than spend days troubleshooting to no avail.

                              1 Reply Last reply
                              0
                              • scookeS scooke

                                I checked out Hostinger... its Cloudron image can be installed AFTER the initial server is provisioned. One reason for the errors @SunDevil is having is if they installed the Cloudron image after provisioning the server, and the server had been "managed" prior to the Cloudron installation. I don't think asking them to run normal troubleshooting is going to work here with their experience level. I recommend @SunDevil get more direct professional help to try to undo whatever was previously installed, even if that is paid-help from the Cloudron team. I don't think they'll be better off just going the Nextcloud route as, if the same conditions persist/repeat, Nextcloud is also going to start acting wonky and good luck getting THAT solved! Paying for ssh-access-level-help is your best way forward and let a techy person clear out all that extraneous stuff. Good luck.

                                S Offline
                                S Offline
                                SunDevil
                                wrote on last edited by
                                #17

                                @scooke I appreciate the honesty. I probably should reach out to Hostinger. Unfortunately, I think paid help is outside the question.

                                My problem. Well, I suppose if Dokploy or the regular Nextcloud image fails as well, then I'll just let my sub lapse.

                                It's either something I'm doing or it's Hostinger. Maybe I just don't belong anywhere near a VPS...

                                scookeS 1 Reply Last reply
                                0
                                • nebulonN Offline
                                  nebulonN Offline
                                  nebulon
                                  Staff
                                  wrote on last edited by
                                  #18

                                  Not sure how this is related to Nextcloud, as all apps run within their own sandbox and are not related do nodejs versions on the host. Maybe to come back to the nodejs problem, did you run those node commands within an app container or the host system?

                                  1 Reply Last reply
                                  1
                                  • J Offline
                                    J Offline
                                    joseph
                                    Staff
                                    wrote on last edited by
                                    #19

                                    @SunDevil you can contact us at support@cloudron.io and we can try to identify what exactly the problem is

                                    1 Reply Last reply
                                    1
                                    • S SunDevil

                                      @scooke I appreciate the honesty. I probably should reach out to Hostinger. Unfortunately, I think paid help is outside the question.

                                      My problem. Well, I suppose if Dokploy or the regular Nextcloud image fails as well, then I'll just let my sub lapse.

                                      It's either something I'm doing or it's Hostinger. Maybe I just don't belong anywhere near a VPS...

                                      scookeS Offline
                                      scookeS Offline
                                      scooke
                                      wrote on last edited by scooke
                                      #20

                                      @SunDevil I'll keep sharing... I've tried Nextcloud on several different platforms, including JUST Nextcloud. It ALWAYS conks out on me. Always. So, my 2 cents, you'll have the same issue on Dokploy.

                                      EDIT: Have you even checked out Dokploy??? I just watched their intro video. They install their software on your VPS from their servers! What?? Sorry, I'm not letting some third party have that access to my data. You create your ssh key on their system!!! You have to create a db separate from your app!!! Good luck keeping track of all those deets. Holy smokes, the number of steps needed to get this thing running is exactly why most of us have come to Cloudron. This Dokploy is so at the opposite spectrum of Cloudron. I can't imagine anyone thinking it will be "better".

                                      A life lived in fear is a life half-lived

                                      1 Reply Last reply
                                      1
                                      • J joseph has marked this topic as solved on
                                      Reply
                                      • Reply as topic
                                      Log in to reply
                                      • Oldest to Newest
                                      • Newest to Oldest
                                      • Most Votes


                                      • Login

                                      • Don't have an account? Register

                                      • Login or register to search.
                                      • First post
                                        Last post
                                      0
                                      • Categories
                                      • Recent
                                      • Tags
                                      • Popular
                                      • Bookmarks
                                      • Search