XCP-ng
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    New install does not load logs or perform backups

    Scheduled Pinned Locked Moved Xen Orchestra
    32 Posts 4 Posters 4.5k Views 2 Watching
    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.
    • mauzillaM Offline
      mauzilla
      last edited by

      Also worth noting that the backup job cannot start on the Debian VM, when we click start we're immediately getting an Unknown error has occurred. There is also no logs displayed for the backup logs or settings > logs

      I am doubtful this is platform based as I can reproduce on both Ubuntu 20.04 and Debian 10.9

      DanpD 1 Reply Last reply Reply Quote 0
      • olivierlambertO Offline
        olivierlambert Vates 🪐 Co-Founder CEO
        last edited by

        You need a trial to test backups with XOA 🙂

        If it works there and not on your Debian, then there's a environment issue on your VM. It's hard to find a root cause because there's so many potential way to configure your VM, your network share and so on.

        Let's rule out XOA first, then from your XO on the sources, don't forget to rebuild on latest commit on master

        mauzillaM 1 Reply Last reply Reply Quote 0
        • DanpD Offline
          Danp Pro Support Team @mauzilla
          last edited by

          @mauzilla What version of Node are you using? You can verify with node -v in an SSH session to your XO VM.

          mauzillaM 1 Reply Last reply Reply Quote 0
          • mauzillaM Offline
            mauzilla @olivierlambert
            last edited by

            @olivierlambert thanks Olivier, on the XOA VM, although it says I have premium version until 5 May, when I go to backups, I get an error saying I need to upgrade. I have restarted the XOA VM already. Not sure what could be causing it?

            olivierlambertO 1 Reply Last reply Reply Quote 0
            • mauzillaM Offline
              mauzilla @Danp
              last edited by

              @danp

              root@XO:~# nodejs -v
              v14.16.1
              
              DanpD 1 Reply Last reply Reply Quote 0
              • DanpD Offline
                Danp Pro Support Team @mauzilla
                last edited by

                @mauzilla You should be using node not nodejs.

                mauzillaM 2 Replies Last reply Reply Quote 0
                • mauzillaM Offline
                  mauzilla @Danp
                  last edited by

                  @danp it's the exact same

                  DanpD 1 Reply Last reply Reply Quote 0
                  • mauzillaM Offline
                    mauzilla @Danp
                    last edited by

                    @danp

                    root@XO:/# node -v
                    v14.16.1
                    
                    1 Reply Last reply Reply Quote 0
                    • DanpD Offline
                      Danp Pro Support Team @mauzilla
                      last edited by

                      @mauzilla said in New install does not load logs or perform backups:

                      it's the exact same

                      Not always. For example, this is what I get with my install --

                      danpollak@ubuntuxo:~$ node -v
                      v14.16.0
                      danpollak@ubuntuxo:~$ nodejs -v
                      v10.19.0
                      
                      mauzillaM 1 Reply Last reply Reply Quote 0
                      • mauzillaM Offline
                        mauzilla @Danp
                        last edited by

                        @danp sorry, I did not mean the binaries are the exact same, I meant the 2 versions are the exact same

                        1 Reply Last reply Reply Quote 0
                        • olivierlambertO Offline
                          olivierlambert Vates 🪐 Co-Founder CEO @mauzilla
                          last edited by

                          @mauzilla Have you clicked on "Update" in XOA view?

                          mauzillaM 1 Reply Last reply Reply Quote 0
                          • mauzillaM Offline
                            mauzilla @olivierlambert
                            last edited by

                            @olivierlambert, update sorted it, 2 things I noticed was that logs worked out of the box, and I was able to start the backup. For reference, it's the exact same NFS config as on the sources version

                            1 Reply Last reply Reply Quote 0
                            • olivierlambertO Offline
                              olivierlambert Vates 🪐 Co-Founder CEO
                              last edited by

                              Okay good, so it could be your install/configuration in your VM 🙂

                              mauzillaM 1 Reply Last reply Reply Quote 0
                              • mauzillaM Offline
                                mauzilla @olivierlambert
                                last edited by

                                @olivierlambert said in New install does not load logs or perform backups:

                                your

                                I guess it can only be that. The 2nd VM is a clean Debian 10.9 build, nothing else installed or configured and steps taken exactly from the sources documentation. I can reproduce this on the 1st install as well, doing the exact same result. If something else needs to be configured we would have no insight on that. Are there logs I can look at to try and decipher what could be causing this?

                                1 Reply Last reply Reply Quote 0
                                • olivierlambertO Offline
                                  olivierlambert Vates 🪐 Co-Founder CEO
                                  last edited by

                                  Hmm in theory a fresh install following the doc should work. I would start simple with everything started as root to be sure it's not a permission issue. Also can you create users in the UI? (to rule out a redis issue)

                                  mauzillaM 1 Reply Last reply Reply Quote 0
                                  • mauzillaM Offline
                                    mauzilla @olivierlambert
                                    last edited by

                                    @olivierlambert said in New install does not load logs or perform backups:

                                    is issue)

                                    You are right, this seems to be a permission issue. I have started the application as root and am now able to see the logs and can also start the backup service.

                                    I have both the XOA and this appliance open and looking at network in console to see if I can pick up which service is failing. From what I can gather (on the backups overview page), on the XOA appliance I am getting a 200 result for the service that returns the below data, however, on the sources version this output / AJAX call returns the internal 500. The backup service however is "created", I can see it in the dashboard, but as there is an internal 500 this in return causes a Javascript error in console which then stops any further Javascript from working (so the backup service "might" work but by the time I click backup the error has already occurred and I take it the backup service don't run as the event cannot complete.

                                    {"data":{"mode":"delta","reportWhen":"failure"},"id":"1619027558357","jobId":"0d38484d-8e9b-4cbf-922b-7b616a073b94","jobName":"TestBackup","message":"backup","scheduleId":"ed9330bd-e4d3-466b-9bf5-110e9e7f57bf","start":1619027558357,"status":"success","infos":[{"data":{"vms":["12f93d7b-8d9a-a72b-6217-f8026d2d7128"]},"message":"vms"}],"tasks":[{"data":{"type":"VM","id":"12f93d7b-8d9a-a72b-6217-f8026d2d7128"},"id":"1619027558781","message":"backup VM","start":1619027558781,"status":"success","tasks":[{"id":"1619027558794","message":"snapshot","start":1619027558794,"status":"success","end":1619027568034,"result":"53cd86e5-7e16-0de8-3997-2a1e255a25d6"},{"data":{"id":"0d201925-80e5-4be5-8f3e-9d66b8589957","isFull":true,"type":"remote"},"id":"1619027570228","message":"export","start":1619027570228,"status":"success","tasks":[{"id":"1619027570230","message":"transfer","start":1619027570230,"status":"success","end":1619027860051,"result":{"size":6848896000}},{"id":"1619027860058","message":"merge","start":1619027860058,"status":"success","end":1619027860058,"result":{"size":0}}],"end":1619027860058}],"end":1619027860083}],"end":1619027860084}
                                    

                                    For reference, the Javascript error in console following the internal 500:

                                    index.js:238 SyntaxError: Unexpected token u in JSON at position 0
                                        at JSON.parse (<anonymous>)
                                        at r.default (_parseNdJson.js:14)
                                        at index.js:1998
                                        at Generator.next (<anonymous>)
                                        at le (index.js:2856)
                                        at i (index.js:2856)
                                    
                                    1 Reply Last reply Reply Quote 0
                                    • olivierlambertO Offline
                                      olivierlambert Vates 🪐 Co-Founder CEO
                                      last edited by

                                      I don't know about this error, maybe @badrAZ will.

                                      mauzillaM 1 Reply Last reply Reply Quote 0
                                      • mauzillaM Offline
                                        mauzilla @olivierlambert
                                        last edited by

                                        @olivierlambert said in New install does not load logs or perform backups:

                                        now abo

                                        I assume the error itself refers to the fact that the JSON parser could not decode "Internal error" as valid JSON, which then in return leads to the rest of the following Javascript calls to not be made. As it's permission related (we now know that), I am not sure what would cause some of the AJAX calls to work, and others return an internal 500, but it has to do with user permissions. I'll wait for feedback but glad we're getting somewhere, thank you for the help so far.

                                        badrAZB 1 Reply Last reply Reply Quote 0
                                        • badrAZB Offline
                                          badrAZ @mauzilla
                                          last edited by badrAZ

                                          Hi,

                                          This error can be triggered on parsing a non-JSON data by using JSON.parse() or JSON.parse('u').

                                          Please install xo-cli and give me the resulted file of the bellow command.

                                          xo-cli backupNg.getAllLogs ndjson=json:true @=<outputFilePath>
                                          
                                          mauzillaM 1 Reply Last reply Reply Quote 0
                                          • mauzillaM Offline
                                            mauzilla @badrAZ
                                            last edited by

                                            @badraz I installed the module but got an error about the self-signed certificate. I then opted to undo the ssl (editing the toml config file) but after that the application did not want to run at all anymore, it seems to time-out. I did a restart but no luck, it seems to only start as root now. I'm going to reconfigure the forever service to just run the application as root. Although I would prefer to run it within a user ring, I also understand that we're using the application from sources.

                                            Given the potential of permission issues, Im going to reconfigure the application to just run as root. We're using XO from sources now due to our planned migration to XCP-NG (which we intend on getting pro support for) so in the meantime we need to test XO and ensure all features are working.

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post