vatesfr / xen-orchestra

The global orchestration solution to manage and backup XCP-ng and XenServer.
https://xen-orchestra.com
Other
767 stars 262 forks source link

Delta Backup error: AssertionError [ERR_ASSERTION] #4748

Closed fixt-it-development closed 4 years ago

fixt-it-development commented 4 years ago

Context

Current behavior

i make a backup, it fails on transfering to the Remote. It looks like it copys complet but when it's done or almost done it fails.

Logs:

{
  "data": {
    "mode": "delta",
    "reportWhen": "failure"
  },
  "id": "1579423241951",
  "jobId": "b6b5887c-f4c8-4008-aeed-7a4116488944",
  "jobName": "Test backup",
  "message": "backup",
  "scheduleId": "abb4a43f-a3ef-4984-a624-bcb754f5c08c",
  "start": 1579423241951,
  "status": "failure",
  "tasks": [
    {
      "data": {
        "type": "VM",
        "id": "69c5b580-aea7-9600-4ed5-8aad02eddb6b"
      },
      "id": "1579423243414",
      "message": "Starting backup of NVR. (b6b5887c-f4c8-4008-aeed-7a4116488944)",
      "start": 1579423243414,
      "status": "failure",
      "tasks": [
        {
          "id": "1579423243429",
          "message": "snapshot",
          "start": 1579423243429,
          "status": "success",
          "end": 1579423266898,
          "result": "3feb2966-7dca-6f5b-1413-60878c9a34b2"
        },
        {
          "id": "1579423266916",
          "message": "add metadata to snapshot",
          "start": 1579423266916,
          "status": "success",
          "end": 1579423267000
        },
        {
          "id": "1579423267117",
          "message": "waiting for uptodate snapshot record",
          "start": 1579423267117,
          "status": "success",
          "end": 1579423267280
        },
        {
          "id": "1579423267289",
          "message": "start snapshot export",
          "start": 1579423267289,
          "status": "success",
          "end": 1579423267290
        },
        {
          "data": {
            "id": "83ddf976-d224-408f-a884-cf899d9454d3",
            "isFull": true,
            "type": "remote"
          },
          "id": "1579423267293",
          "message": "export",
          "start": 1579423267293,
          "status": "failure",
          "tasks": [
            {
              "id": "1579423267369",
              "message": "transfer",
              "start": 1579423267369,
              "status": "failure",
              "end": 1579463031609,
              "result": {
                "generatedMessage": true,
                "name": "AssertionError [ERR_ASSERTION]",
                "code": "ERR_ASSERTION",
                "actual": false,
                "expected": true,
                "operator": "==",
                "message": "false == true",
                "stack": "AssertionError [ERR_ASSERTION]: false == true\n    at module.exports.write (/etc/xo/xo-builds/xen-orchestra-202019010910/node_modules/@marsaud/smb2/lib/api/write.js:13:5)\n    at module.exports.write (/etc/xo/xo-builds/xen-orchestra-202019010910/node_modules/@marsaud/smb2/lib/tools/auto-promise.js:30:8)\n    at SmbHandler._writeFd (/etc/xo/xo-builds/xen-orchestra-202019010910/@xen-orchestra/fs/src/smb.js:169:25)\n    at SmbHandler._write (/etc/xo/xo-builds/xen-orchestra-202019010910/@xen-orchestra/fs/src/abstract.js:592:25)\n    at <anonymous>"
              }
            }
          ],
          "end": 1579463031609,
          "result": {
            "generatedMessage": true,
            "name": "AssertionError [ERR_ASSERTION]",
            "code": "ERR_ASSERTION",
            "actual": false,
            "expected": true,
            "operator": "==",
            "message": "false == true",
            "stack": "AssertionError [ERR_ASSERTION]: false == true\n    at module.exports.write (/etc/xo/xo-builds/xen-orchestra-202019010910/node_modules/@marsaud/smb2/lib/api/write.js:13:5)\n    at module.exports.write (/etc/xo/xo-builds/xen-orchestra-202019010910/node_modules/@marsaud/smb2/lib/tools/auto-promise.js:30:8)\n    at SmbHandler._writeFd (/etc/xo/xo-builds/xen-orchestra-202019010910/@xen-orchestra/fs/src/smb.js:169:25)\n    at SmbHandler._write (/etc/xo/xo-builds/xen-orchestra-202019010910/@xen-orchestra/fs/src/abstract.js:592:25)\n    at <anonymous>"
          }
        },
        {
          "id": "1579463031612",
          "message": "set snapshot.other_config[xo:backup:exported]",
          "start": 1579463031612,
          "status": "success",
          "end": 1579463031623
        }
      ],
      "end": 1579463031623
    },
    {
      "data": {
        "type": "VM",
        "id": "57478ff3-523d-e630-7fb9-521fcca66dd2"
      },
      "id": "1579423243429:0",
      "message": "Starting backup of XO-self. (b6b5887c-f4c8-4008-aeed-7a4116488944)",
      "start": 1579423243429,
      "status": "failure",
      "tasks": [
        {
          "id": "1579423243433",
          "message": "snapshot",
          "start": 1579423243433,
          "status": "success",
          "end": 1579423271250,
          "result": "1551895e-2149-d80b-3fa3-9b30ad4a56fa"
        },
        {
          "id": "1579423271261",
          "message": "add metadata to snapshot",
          "start": 1579423271261,
          "status": "success",
          "end": 1579423271325
        },
        {
          "id": "1579423271427",
          "message": "waiting for uptodate snapshot record",
          "start": 1579423271427,
          "status": "success",
          "end": 1579423271656
        },
        {
          "id": "1579423271659",
          "message": "start snapshot export",
          "start": 1579423271659,
          "status": "success",
          "end": 1579423271660
        },
        {
          "data": {
            "id": "83ddf976-d224-408f-a884-cf899d9454d3",
            "isFull": true,
            "type": "remote"
          },
          "id": "1579423271661",
          "message": "export",
          "start": 1579423271661,
          "status": "failure",
          "tasks": [
            {
              "id": "1579423271710",
              "message": "transfer",
              "start": 1579423271710,
              "status": "failure",
              "end": 1579430884866,
              "result": {
                "generatedMessage": true,
                "name": "AssertionError [ERR_ASSERTION]",
                "code": "ERR_ASSERTION",
                "actual": false,
                "expected": true,
                "operator": "==",
                "message": "false == true",
                "stack": "AssertionError [ERR_ASSERTION]: false == true\n    at module.exports.write (/etc/xo/xo-builds/xen-orchestra-202019010910/node_modules/@marsaud/smb2/lib/api/write.js:13:5)\n    at module.exports.write (/etc/xo/xo-builds/xen-orchestra-202019010910/node_modules/@marsaud/smb2/lib/tools/auto-promise.js:30:8)\n    at SmbHandler._writeFd (/etc/xo/xo-builds/xen-orchestra-202019010910/@xen-orchestra/fs/src/smb.js:169:25)\n    at SmbHandler._write (/etc/xo/xo-builds/xen-orchestra-202019010910/@xen-orchestra/fs/src/abstract.js:592:25)\n    at <anonymous>"
              }
            }
          ],
          "end": 1579430884867,
          "result": {
            "generatedMessage": true,
            "name": "AssertionError [ERR_ASSERTION]",
            "code": "ERR_ASSERTION",
            "actual": false,
            "expected": true,
            "operator": "==",
            "message": "false == true",
            "stack": "AssertionError [ERR_ASSERTION]: false == true\n    at module.exports.write (/etc/xo/xo-builds/xen-orchestra-202019010910/node_modules/@marsaud/smb2/lib/api/write.js:13:5)\n    at module.exports.write (/etc/xo/xo-builds/xen-orchestra-202019010910/node_modules/@marsaud/smb2/lib/tools/auto-promise.js:30:8)\n    at SmbHandler._writeFd (/etc/xo/xo-builds/xen-orchestra-202019010910/@xen-orchestra/fs/src/smb.js:169:25)\n    at SmbHandler._write (/etc/xo/xo-builds/xen-orchestra-202019010910/@xen-orchestra/fs/src/abstract.js:592:25)\n    at <anonymous>"
          }
        },
        {
          "id": "1579430884876",
          "message": "set snapshot.other_config[xo:backup:exported]",
          "start": 1579430884876,
          "status": "success",
          "end": 1579430884907
        }
      ],
      "end": 1579430884908
    }
  ],
  "end": 1579463031624
}
julien-f commented 4 years ago

That may be an issue with the SMB library used, install mount.cifs on your system as workaround.

Note that it will also decrease XO memory usage and improve performance.

fixt-it-development commented 4 years ago

Thanks for the response, 2 follow up questions:

Thank you already.

julien-f commented 4 years ago

On the Xen Orchestra server, you need to find how to install the tool mount.cifs for your distro, you can ask help on the community forum: https://xcp-ng.org/forum/category/12/xen-orchestra

fixt-it-development commented 4 years ago

Thanks, i did look furder and found the soloution. It appers that my CIFS host can't handle the newest SMB type. So after connecting the remote with options 'vers=1.0' it worked.

Thank you again.