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

    Mirror backup broken since XO 6.3.0 release, "Error: Cannot read properties of undefined (reading 'id')"

    Scheduled Pinned Locked Moved Backup
    13 Posts 6 Posters 155 Views 5 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.
    • florentF Offline
      florent Vates 🪐 XO Team @Pilow
      last edited by

      @Pilow said:

      (file:///usr/local/lib/node_modules/@x

      fix is here https://github.com/vatesfr/xen-orchestra/pull/9667

      fbeauchamp opened this pull request in vatesfr/xen-orchestra

      open fix(backups): schedule reference is missing #9667

      P 1 Reply Last reply Reply Quote 0
      • P Online
        Pilow @florent
        last edited by Pilow

        @florent made the modification and restarted the xo-server

        but still have the problem

        [22:13 01] xoa:_vmRunners$ cat _AbstractRemote.mjs|grep -B5 -A 5 schedule
          constructor({
            config,
            job,
            healthCheckSr,
            remoteAdapters,
            schedule,
            settings,
            sourceRemoteAdapter,
            throttleGenerator,
            throttleStream,
            vmUuid,
        --
            super()
            this.config = config
            this.job = job
            this.remoteAdapters = remoteAdapters
            this._settings = settings
            this.scheduleId = schedule.id
            this.timestamp = undefined
        
            this._healthCheckSr = healthCheckSr
            this._sourceRemoteAdapter = sourceRemoteAdapter
            this._throttleGenerator = throttleGenerator
        --
                  adapters: remoteAdapters,
                  BackupWriter,
                  config,
                  healthCheckSr,
                  job,
                  schedule,
                  vmUuid,
                  settings,
                })
              )
            } else {
        --
                  new BackupWriter({
                    adapter,
                    config,
                    healthCheckSr,
                    job,
                    schedule,
                    vmUuid,
                    remoteId,
                    settings: targetSettings,
                  })
                )
        [22:13 01] xoa:_vmRunners$
        
        

        need to modify anything else ? I noticed only 2 line modifications in #9667

        P P 2 Replies Last reply Reply Quote 0
        • P Online
          Pilow @Pilow
          last edited by Pilow

          tried either by manual run, or relaunched the schedule to see if context of schedule was needed to get id of the schedule, but to no avail 😕

          schedule or schedule.id seems to be undefined

          1 Reply Last reply Reply Quote 0
          • A Offline
            acebmxer
            last edited by

            @florent @danp

            At work I am seeing this error as well... I have opened a support ticket Ticket#7755762

            1 Reply Last reply Reply Quote 0
            • P Offline
              pierrebrunet Vates 🪐 XO Team @Pilow
              last edited by

              @Pilow Hi,
              As you already tried a patch on your server, can you try to also update the line 110 of @xen-orchestra/backups/_runners/_writers/_AbstractAggregatedRemoteWriter.mjs

              - const scheduleId = this.#props.scheduleId
              + const scheduleId = this.#props.schedule?.id ?? this.#props.scheduleId
              

              Thank you

              P 1 Reply Last reply Reply Quote 0
              • P Online
                Pilow @pierrebrunet
                last edited by Pilow

                @pierrebrunet said:

                • const scheduleId = this.#props.schedule?.id ?? this.#props.scheduleId

                done,
                a430761c-84dc-4931-9567-3e26297b6c0d-image.jpeg but still same error

                          "result": {
                            "message": "Cannot read properties of undefined (reading 'id')",
                            "name": "TypeError",
                            "stack": "TypeError: Cannot read properties of undefined (reading 'id')\n    at IncrementalRemoteWriter._prepare (file:///usr/local/lib/node_modules/@xen-orchestra/proxy/node_modules/@xen-orchestra/backups/_runners/_writers/IncrementalRemoteWriter.mjs:93:39)\n    at file:///usr/local/lib/node_modules/@xen-orchestra/proxy/node_modules/@xen-orchestra/backups/_runners/_writers/IncrementalRemoteWriter.mjs:87:32\n    at file:///usr/local/lib/node_modules/@xen-orchestra/proxy/node_modules/@xen-orchestra/backups/Task.mjs:108:24\n    at Zone.run (/usr/local/lib/node_modules/@xen-orchestra/proxy/node_modules/node-zone/index.js:80:23)\n    at Task.run (file:///usr/local/lib/node_modules/@xen-orchestra/proxy/node_modules/@xen-orchestra/backups/Task.mjs:106:23)\n    at IncrementalRemoteWriter.prepare (file:///usr/local/lib/node_modules/@xen-orchestra/proxy/node_modules/@xen-orchestra/backups/_runners/_writers/IncrementalRemoteWriter.mjs:87:17)\n    at file:///usr/local/lib/node_modules/@xen-orchestra/proxy/node_modules/@xen-orchestra/backups/_runners/_vmRunners/IncrementalRemote.mjs:92:48\n    at callWriter (file:///usr/local/lib/node_modules/@xen-orchestra/proxy/node_modules/@xen-orchestra/backups/_runners/_vmRunners/_Abstract.mjs:33:15)\n    at IncrementalRemoteVmBackupRunner._callWriters (file:///usr/local/lib/node_modules/@xen-orchestra/proxy/node_modules/@xen-orchestra/backups/_runners/_vmRunners/_Abstract.mjs:52:14)\n    at IncrementalRemoteVmBackupRunner._run (file:///usr/local/lib/node_modules/@xen-orchestra/proxy/node_modules/@xen-orchestra/backups/_runners/_vmRunners/IncrementalRemote.mjs:92:18)"
                          }
                        }
                      ],
                      "end": 1775118782797,
                      "result": {
                        "message": "Cannot read properties of undefined (reading 'id')",
                        "name": "TypeError",
                        "stack": "TypeError: Cannot read properties of undefined (reading 'id')\n    at IncrementalRemoteWriter._prepare (file:///usr/local/lib/node_modules/@xen-orchestra/proxy/node_modules/@xen-orchestra/backups/_runners/_writers/IncrementalRemoteWriter.mjs:93:39)\n    at file:///usr/local/lib/node_modules/@xen-orchestra/proxy/node_modules/@xen-orchestra/backups/_runners/_writers/IncrementalRemoteWriter.mjs:87:32\n    at file:///usr/local/lib/node_modules/@xen-orchestra/proxy/node_modules/@xen-orchestra/backups/Task.mjs:108:24\n    at Zone.run (/usr/local/lib/node_modules/@xen-orchestra/proxy/node_modules/node-zone/index.js:80:23)\n    at Task.run (file:///usr/local/lib/node_modules/@xen-orchestra/proxy/node_modules/@xen-orchestra/backups/Task.mjs:106:23)\n    at IncrementalRemoteWriter.prepare (file:///usr/local/lib/node_modules/@xen-orchestra/proxy/node_modules/@xen-orchestra/backups/_runners/_writers/IncrementalRemoteWriter.mjs:87:17)\n    at file:///usr/local/lib/node_modules/@xen-orchestra/proxy/node_modules/@xen-orchestra/backups/_runners/_vmRunners/IncrementalRemote.mjs:92:48\n    at callWriter (file:///usr/local/lib/node_modules/@xen-orchestra/proxy/node_modules/@xen-orchestra/backups/_runners/_vmRunners/_Abstract.mjs:33:15)\n    at IncrementalRemoteVmBackupRunner._callWriters (file:///usr/local/lib/node_modules/@xen-orchestra/proxy/node_modules/@xen-orchestra/backups/_runners/_vmRunners/_Abstract.mjs:52:14)\n    at IncrementalRemoteVmBackupRunner._run (file:///usr/local/lib/node_modules/@xen-orchestra/proxy/node_modules/@xen-orchestra/backups/_runners/_vmRunners/IncrementalRemote.mjs:92:18)"
                      }
                    },
                
                
                P 1 Reply Last reply Reply Quote 0
                • P Offline
                  pierrebrunet Vates 🪐 XO Team @Pilow
                  last edited by pierrebrunet

                  @Pilow ooh sorry, I did not see that you have a proxy. You need to fix it in the proxy too.

                  Edit: in fact, you just have to put the changes of IncrementalRemoteWriter.mjs in proxy node_modules, the rest is optional

                  P 1 Reply Last reply Reply Quote 1
                  • P Online
                    Pilow @pierrebrunet
                    last edited by

                    @pierrebrunet with your modification on XO PROXies, it seems to be working now !

                    20f0ecca-d770-4941-b16e-f14fb7b13781-image.jpeg

                    I should have thought about the proxy doing the actual job...

                    P 1 Reply Last reply Reply Quote 1
                    • P Online
                      Pilow @Pilow
                      last edited by

                      I only modified @florent code, not the second one you gave me

                      P 1 Reply Last reply Reply Quote 0
                      • P Offline
                        pierrebrunet Vates 🪐 XO Team @Pilow
                        last edited by

                        @Pilow perfect!

                        1 Reply Last reply Reply Quote 0

                        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                        With your input, this post could be even better 💗

                        Register Login
                        • First post
                          Last post