Not able to restore / migrate - Addons Error - Unexpected response code or HTTP error when piping
-
So today I migrated from my Ubuntu 20.04 Netcup RS4000 to a Unesty RYZEN GEN2 VPS 16 GB Ubuntu 22.04. Everything went smooth besides the restore of two Vaultwarden instances.
Cloudron version for both servers is v7.6.2 and Vaultwarden version 1.30.1.
Restore errors out with:
Addons Error - Unexpected response code or HTTP error when piping /home/yellowtent/appsdata/2466709f-f01a-445a-aaed-5ab0e7768690/mysqldump to http://172.18.30.1:3000/databases/1f5cda718fda970f/restore?access_token=d9c32cd84c2fbf74996273bd9f156280707ccad132502a817a1e03fc65b99e4214c89b9d5aeb9ab28c0dd58e805ead61144928a570e1347d75c21774d389e6a21d5dec3d2dff7c7b2cc3d039ce700ab6320d483d2105ec5fb0665089c6b9f1098afeecc80c9cada0bc67e36f13971b67bd74ba170d0eaad3e821cbac693276db: status 500 complete false
Full log output:
Dec 28 06:25:23box:services restoreMySql Dec 28 06:25:23box:services pipeFileToRequest: piping /home/yellowtent/appsdata/2466709f-f01a-445a-aaed-5ab0e7768690/mysqldump to http://172.18.30.1:3000/databases/1f5cda718fda970f/restore?access_token=d9c32cd84c2fbf74996273bd9f156280707ccad132502a817a1e03fc65b99e4214c89b9d5aeb9ab28c0dd58e805ead61144928a570e1347d75c21774d389e6a21d5dec3d2dff7c7b2cc3d039ce700ab6320d483d2105ec5fb0665089c6b9f1098afeecc80c9cada0bc67e36f13971b67bd74ba170d0eaad3e821cbac693276db Dec 28 06:25:23box:services pipeFileToRequest: piped /home/yellowtent/appsdata/2466709f-f01a-445a-aaed-5ab0e7768690/mysqldump to http://172.18.30.1:3000/databases/1f5cda718fda970f/restore?access_token=d9c32cd84c2fbf74996273bd9f156280707ccad132502a817a1e03fc65b99e4214c89b9d5aeb9ab28c0dd58e805ead61144928a570e1347d75c21774d389e6a21d5dec3d2dff7c7b2cc3d039ce700ab6320d483d2105ec5fb0665089c6b9f1098afeecc80c9cada0bc67e36f13971b67bd74ba170d0eaad3e821cbac693276db Dec 28 06:25:26box:services pipeFileToRequest: request completed with status code 500 Dec 28 06:25:26box:apptask run: app error for state pending_restore: BoxError: Unexpected response code or HTTP error when piping /home/yellowtent/appsdata/2466709f-f01a-445a-aaed-5ab0e7768690/mysqldump to http://172.18.30.1:3000/databases/1f5cda718fda970f/restore?access_token=d9c32cd84c2fbf74996273bd9f156280707ccad132502a817a1e03fc65b99e4214c89b9d5aeb9ab28c0dd58e805ead61144928a570e1347d75c21774d389e6a21d5dec3d2dff7c7b2cc3d039ce700ab6320d483d2105ec5fb0665089c6b9f1098afeecc80c9cada0bc67e36f13971b67bd74ba170d0eaad3e821cbac693276db: status 500 complete false at ClientRequest.<anonymous> (/home/yellowtent/box/src/services.js:1292:60) at ClientRequest.emit (node:events:513:28) at HTTPParser.parserOnIncomingClient (node:_http_client:701:27) at HTTPParser.parserOnHeadersComplete (node:_http_common:119:17) at Socket.socketOnData (node:_http_client:542:22) at Socket.emit (node:events:513:28) at addChunk (node:internal/streams/readable:324:12) at readableAddChunk (node:internal/streams/readable:297:9) at Readable.push (node:internal/streams/readable:234:10) at TCP.onStreamRead (node:internal/stream_base_commons:190:23) { reason: 'Addons Error', details: {} } Dec 28 06:25:26box:taskworker Task took 68.559 seconds Dec 28 06:25:26box:tasks setCompleted - 14860: {"result":null,"error":{"stack":"BoxError: Unexpected response code or HTTP error when piping /home/yellowtent/appsdata/2466709f-f01a-445a-aaed-5ab0e7768690/mysqldump to http://172.18.30.1:3000/databases/1f5cda718fda970f/restore?access_token=d9c32cd84c2fbf74996273bd9f156280707ccad132502a817a1e03fc65b99e4214c89b9d5aeb9ab28c0dd58e805ead61144928a570e1347d75c21774d389e6a21d5dec3d2dff7c7b2cc3d039ce700ab6320d483d2105ec5fb0665089c6b9f1098afeecc80c9cada0bc67e36f13971b67bd74ba170d0eaad3e821cbac693276db: status 500 complete false\n at ClientRequest.<anonymous> (/home/yellowtent/box/src/services.js:1292:60)\n at ClientRequest.emit (node:events:513:28)\n at HTTPParser.parserOnIncomingClient (node:_http_client:701:27)\n at HTTPParser.parserOnHeadersComplete (node:_http_common:119:17)\n at Socket.socketOnData (node:_http_client:542:22)\n at Socket.emit (node:events:513:28)\n at addChunk (node:internal/streams/readable:324:12)\n at readableAddChunk (node:internal/streams/readable:297:9)\n at Readable.push (node:internal/streams/readable:234:10)\n at TCP.onStreamRead (node:internal/stream_base_commons:190:23)","name":"BoxError","reason":"Addons Error","details":{},"message":"Unexpected response code or HTTP error when piping /home/yellowtent/appsdata/2466709f-f01a-445a-aaed-5ab0e7768690/mysqldump to http://172.18.30.1:3000/databases/1f5cda718fda970f/restore?access_token=d9c32cd84c2fbf74996273bd9f156280707ccad132502a817a1e03fc65b99e4214c89b9d5aeb9ab28c0dd58e805ead61144928a570e1347d75c21774d389e6a21d5dec3d2dff7c7b2cc3d039ce700ab6320d483d2105ec5fb0665089c6b9f1098afeecc80c9cada0bc67e36f13971b67bd74ba170d0eaad3e821cbac693276db: status 500 complete false"}} Dec 28 06:25:26box:tasks update 14860: {"percent":100,"result":null,"error":{"stack":"BoxError: Unexpected response code or HTTP error when piping /home/yellowtent/appsdata/2466709f-f01a-445a-aaed-5ab0e7768690/mysqldump to http://172.18.30.1:3000/databases/1f5cda718fda970f/restore?access_token=d9c32cd84c2fbf74996273bd9f156280707ccad132502a817a1e03fc65b99e4214c89b9d5aeb9ab28c0dd58e805ead61144928a570e1347d75c21774d389e6a21d5dec3d2dff7c7b2cc3d039ce700ab6320d483d2105ec5fb0665089c6b9f1098afeecc80c9cada0bc67e36f13971b67bd74ba170d0eaad3e821cbac693276db: status 500 complete false\n at ClientRequest.<anonymous> (/home/yellowtent/box/src/services.js:1292:60)\n at ClientRequest.emit (node:events:513:28)\n at HTTPParser.parserOnIncomingClient (node:_http_client:701:27)\n at HTTPParser.parserOnHeadersComplete (node:_http_common:119:17)\n at Socket.socketOnData (node:_http_client:542:22)\n at Socket.emit (node:events:513:28)\n at addChunk (node:internal/streams/readable:324:12)\n at readableAddChunk (node:internal/streams/readable:297:9)\n at Readable.push (node:internal/streams/readable:234:10)\n at TCP.onStreamRead (node:internal/stream_base_commons:190:23)","name":"BoxError","reason":"Addons Error","details":{},"message":"Unexpected response code or HTTP error when piping /home/yellowtent/appsdata/2466709f-f01a-445a-aaed-5ab0e7768690/mysqldump to http://172.18.30.1:3000/databases/1f5cda718fda970f/restore?access_token=d9c32cd84c2fbf74996273bd9f156280707ccad132502a817a1e03fc65b99e4214c89b9d5aeb9ab28c0dd58e805ead61144928a570e1347d75c21774d389e6a21d5dec3d2dff7c7b2cc3d039ce700ab6320d483d2105ec5fb0665089c6b9f1098afeecc80c9cada0bc67e36f13971b67bd74ba170d0eaad3e821cbac693276db: status 500 complete false"}} Unexpected response code or HTTP error when piping /home/yellowtent/appsdata/2466709f-f01a-445a-aaed-5ab0e7768690/mysqldump to http://172.18.30.1:3000/databases/1f5cda718fda970f/restore?access_token=d9c32cd84c2fbf74996273bd9f156280707ccad132502a817a1e03fc65b99e4214c89b9d5aeb9ab28c0dd58e805ead61144928a570e1347d75c21774d389e6a21d5dec3d2dff7c7b2cc3d039ce700ab6320d483d2105ec5fb0665089c6b9f1098afeecc80c9cada0bc67e36f13971b67bd74ba170d0eaad3e821cbac693276db: status 500 complete false at ClientRequest.<anonymous> (/home/yellowtent/box/src/services.js:1292:60) at ClientRequest.emit (node:events:513:28) at HTTPParser.parserOnIncomingClient (node:_http_client:701:27) at HTTPParser.parserOnHeadersComplete (node:_http_common:119:17) at Socket.socketOnData (node:_http_client:542:22) at Socket.emit (node:events:513:28) at addChunk (node:internal/streams/readable:324:12) at readableAddChunk (node:internal/streams/readable:297:9) at Readable.push (node:internal/streams/readable:234:10) at TCP.onStreamRead (node:internal/stream_base_commons:190:23)
Any clues? AFAIK it is MySQL related.
-
@subven If this was an oldish Vaultwarden, there is an issue in Vaultwarden related to MySQL encoding. They made some releases with incorrect encoding . After you attempt the restore, if you go to Services -> MySQL and check the logs, can you paste the error from there, so I can confirm that the bug is related to that ?
-
subvenreplied to girish on Dec 28, 2023, 8:41 AM last edited by subven Dec 28, 2023, 8:43 AM
@girish said in Not able to restore / migrate - Addons Error - Unexpected response code or HTTP error when piping:
if you go to Services -> MySQL and check the logs, can you paste the error from there,
Yes I can Dunno when I installed the Vaultwarden service but it was mostly around 2 years ago.
Dec 28 09:38:53[POST] /databases Dec 28 09:38:53add: adding database 1f5cda718fda970f Dec 28 09:38:53[POST] /databases/1f5cda718fda970f/clear Dec 28 09:38:53clear: database 1f5cda718fda970f Dec 28 09:38:56[POST] /databases/1f5cda718fda970f/restore Dec 28 09:38:56restore: restoring database 1f5cda718fda970f Dec 28 09:39:00restore: stderr from db import: ERROR 3780 (HY000) at line 528: Referencing column 'organization_uuid' and referenced column 'uuid' in foreign key constraint 'auth_requests_ibfk_2' are incompatible. Dec 28 09:39:00restore: failed to restore database. code=1
Okay I remember reading something in the forums regarding organization_uuid!
EDIT: Found it - trying to fix it myself now ^^
-
@subven Yup, the collation is the issue. roughly, this is what you have to do:
- In the failed state, the backup is already downloaded on your server. You just have to fix the mysqldump .
- You can edit the mysqldump file in
/home/yellowtent/appsdata/<appid>/mysqldump
- After editing, you have to use the CLI tool to import like this
cloudron import --in-place <appid>
. This imports the backup from whatever is there on the server without re-downloading the backup all over again.
Keep repeating above process till it works.
-
@girish thank you for explaining. In my case it is easier to:
- spin up my old server
- modify my (local) host file to point the dashboard domain to the old IP
- use the Cloudron web terminal to access MySQL and apply the fixes
- press the apps backup button and download to backup config afterwards
- revert host entries and import the apps backup config on my new Cloudron
This way I am only using tools that are already shipped with Cloudron without the need of other software.
Post 2 of 5