[Bug]: Unable to restore backup taken on prod docker on test docker #1021

Closed
opened 2026-04-24 23:29:21 +02:00 by adam · 4 comments
Owner

Originally created by @ambarnes2 on GitHub (Mar 14, 2023).

Describe the issue

To ensure that when i am upgrading my Audiobookshelf container to a new version, i first like to test that the upgrade will be successful with the selected backup. To do this, i am taking a backup on my prod container and then exporting that backup and then importing it into my test container, which is on a completely different docker server. When i attempt to upload the backup, i am attempting to restore when i get the following error.

image

Here is a dump of the Logs:

2023-03-14 03:09:54 INFO === Starting Server ===
2023-03-14 03:09:54 INFO [Server] Init v2.2.16
2023-03-14 03:09:54 INFO [DB] 0 Library Items Loaded
2023-03-14 03:09:54 INFO [DB] 0 Users Loaded
2023-03-14 03:09:54 INFO [DB] 0 Libraries Loaded
2023-03-14 03:09:54 INFO [DB] 0 Collections Loaded
2023-03-14 03:09:54 INFO [DB] 0 Playlists Loaded
2023-03-14 03:09:54 INFO [DB] 0 Authors Loaded
2023-03-14 03:09:54 INFO [DB] 0 Series Loaded
2023-03-14 03:09:54 INFO [BackupManager] 0 Backups Found
2023-03-14 03:09:54 INFO [BackupManager] Auto Backups are disabled
2023-03-14 03:09:54 INFO [LogManager] Init current daily log filename: 2023-03-14.txt
2023-03-14 03:09:54 INFO Listening on port :80
2023-03-14 03:09:57 ERROR JWT Verify Token Failed JsonWebTokenError: invalid signature
2023-03-14 03:09:57 ERROR Verify Token User Not Found eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiJyb290IiwidXNlcm5hbWUiOiJyb290IiwiaWF0IjoxNjc3MzQzODY2fQ.ovHm5QVZv4oUgsn10w5SjnzybGRvHt4zWSUtcRxUAdI
2023-03-14 03:10:00 INFO [Server] Initializing new server
2023-03-14 03:10:00 WARN [Server] Creating root user with no password
2023-03-14 03:10:00 ERROR JWT Verify Token Failed JsonWebTokenError: invalid signature
2023-03-14 03:10:00 ERROR Verify Token User Not Found eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiJyb290IiwidXNlcm5hbWUiOiJyb290IiwiaWF0IjoxNjc3MzQzODY2fQ.ovHm5QVZv4oUgsn10w5SjnzybGRvHt4zWSUtcRxUAdI
2023-03-14 03:10:10 INFO [Server] Socket Connected 65tlC0fYHMzAKu9FAAAB
2023-03-14 03:12:42 INFO === Starting Server ===
2023-03-14 03:12:42 INFO [Server] Init v2.2.16
2023-03-14 03:12:42 INFO [DB] 0 Playlists Loaded
2023-03-14 03:12:42 INFO [DB] 3 Libraries Loaded
2023-03-14 03:12:42 INFO [DB] 1 Collections Loaded
2023-03-14 03:12:42 INFO [DB] 185 Authors Loaded 
2023-03-14 03:12:42 INFO [DB] 228 Series Loaded
2023-03-14 03:12:42 INFO [DB] 5 Users Loaded
2023-03-14 03:12:43 INFO [DB] 850 Library Items Loaded
2023-03-14 03:12:43 INFO [Server] Purged 818 unused library item metadata
2023-03-14 03:12:43 INFO [BackupManager] 1 Backups Found
2023-03-14 03:12:43 INFO [LogManager] Init current daily log filename: 2023-03-14.txt
2023-03-14 03:12:44 INFO [Watcher] Initializing watcher for "Audiobooks".
2023-03-14 03:12:44 INFO [Watcher] Initializing watcher for "Ebooks".
2023-03-14 03:12:44 INFO [Watcher] Initializing watcher for "Podcasts".
2023-03-14 03:12:44 INFO Listening on port :80
2023-03-14 03:12:44 INFO [Watcher] "Podcasts" Ready
2023-03-14 03:12:44 INFO [Server] Socket Connected aIfOihu1T6E0JjdBAAAB
2023-03-14 03:12:44 ERROR JWT Verify Token Failed JsonWebTokenError: invalid signature
2023-03-14 03:12:44 ERROR Cannot validate socket - invalid token
2023-03-14 03:12:45 INFO [Watcher] "Ebooks" Ready
2023-03-14 03:12:47 INFO [Watcher] "Audiobooks" Ready
2023-03-14 03:16:55 ERROR JWT Verify Token Failed JsonWebTokenError: invalid signature
2023-03-14 03:16:55 ERROR Verify Token User Not Found eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiJyb290IiwidXNlcm5hbWUiOiJyb290IiwiaWF0IjoxNjc4NzYzNDAwfQ.yzs3uvnzRE7jvzsgL6_DI7MoUjfAoSsaRxA3DE1wlcc
2023-03-14 03:17:20 ERROR JWT Verify Token Failed JsonWebTokenError: invalid signature
2023-03-14 03:17:20 ERROR Verify Token User Not Found eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiJyb290IiwidXNlcm5hbWUiOiJyb290IiwiaWF0IjoxNjc4NzYzNDAwfQ.yzs3uvnzRE7jvzsgL6_DI7MoUjfAoSsaRxA3DE1wlcc
2023-03-14 03:18:35 ERROR JWT Verify Token Failed JsonWebTokenError: invalid signature
2023-03-14 03:18:35 ERROR Verify Token User Not Found eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiJyb290IiwidXNlcm5hbWUiOiJyb290IiwiaWF0IjoxNjc4NzYzNDAw

Steps to reproduce the issue

  1. Generate Backup on Production Container
  2. Download that backup
  3. Attempt to upload that back up to the Test Container
  4. Error occurs

Audiobookshelf version

2.2.16

How are you running audiobookshelf?

Docker

Originally created by @ambarnes2 on GitHub (Mar 14, 2023). ### Describe the issue To ensure that when i am upgrading my Audiobookshelf container to a new version, i first like to test that the upgrade will be successful with the selected backup. To do this, i am taking a backup on my prod container and then exporting that backup and then importing it into my test container, which is on a completely different docker server. When i attempt to upload the backup, i am attempting to restore when i get the following error. ![image](https://user-images.githubusercontent.com/54408675/224884455-576dc198-808f-4578-8927-22cc8c7ddd6c.png) Here is a dump of the Logs: ``` 2023-03-14 03:09:54 INFO === Starting Server === 2023-03-14 03:09:54 INFO [Server] Init v2.2.16 2023-03-14 03:09:54 INFO [DB] 0 Library Items Loaded 2023-03-14 03:09:54 INFO [DB] 0 Users Loaded 2023-03-14 03:09:54 INFO [DB] 0 Libraries Loaded 2023-03-14 03:09:54 INFO [DB] 0 Collections Loaded 2023-03-14 03:09:54 INFO [DB] 0 Playlists Loaded 2023-03-14 03:09:54 INFO [DB] 0 Authors Loaded 2023-03-14 03:09:54 INFO [DB] 0 Series Loaded 2023-03-14 03:09:54 INFO [BackupManager] 0 Backups Found 2023-03-14 03:09:54 INFO [BackupManager] Auto Backups are disabled 2023-03-14 03:09:54 INFO [LogManager] Init current daily log filename: 2023-03-14.txt 2023-03-14 03:09:54 INFO Listening on port :80 2023-03-14 03:09:57 ERROR JWT Verify Token Failed JsonWebTokenError: invalid signature 2023-03-14 03:09:57 ERROR Verify Token User Not Found eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiJyb290IiwidXNlcm5hbWUiOiJyb290IiwiaWF0IjoxNjc3MzQzODY2fQ.ovHm5QVZv4oUgsn10w5SjnzybGRvHt4zWSUtcRxUAdI 2023-03-14 03:10:00 INFO [Server] Initializing new server 2023-03-14 03:10:00 WARN [Server] Creating root user with no password 2023-03-14 03:10:00 ERROR JWT Verify Token Failed JsonWebTokenError: invalid signature 2023-03-14 03:10:00 ERROR Verify Token User Not Found eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiJyb290IiwidXNlcm5hbWUiOiJyb290IiwiaWF0IjoxNjc3MzQzODY2fQ.ovHm5QVZv4oUgsn10w5SjnzybGRvHt4zWSUtcRxUAdI 2023-03-14 03:10:10 INFO [Server] Socket Connected 65tlC0fYHMzAKu9FAAAB 2023-03-14 03:12:42 INFO === Starting Server === 2023-03-14 03:12:42 INFO [Server] Init v2.2.16 2023-03-14 03:12:42 INFO [DB] 0 Playlists Loaded 2023-03-14 03:12:42 INFO [DB] 3 Libraries Loaded 2023-03-14 03:12:42 INFO [DB] 1 Collections Loaded 2023-03-14 03:12:42 INFO [DB] 185 Authors Loaded 2023-03-14 03:12:42 INFO [DB] 228 Series Loaded 2023-03-14 03:12:42 INFO [DB] 5 Users Loaded 2023-03-14 03:12:43 INFO [DB] 850 Library Items Loaded 2023-03-14 03:12:43 INFO [Server] Purged 818 unused library item metadata 2023-03-14 03:12:43 INFO [BackupManager] 1 Backups Found 2023-03-14 03:12:43 INFO [LogManager] Init current daily log filename: 2023-03-14.txt 2023-03-14 03:12:44 INFO [Watcher] Initializing watcher for "Audiobooks". 2023-03-14 03:12:44 INFO [Watcher] Initializing watcher for "Ebooks". 2023-03-14 03:12:44 INFO [Watcher] Initializing watcher for "Podcasts". 2023-03-14 03:12:44 INFO Listening on port :80 2023-03-14 03:12:44 INFO [Watcher] "Podcasts" Ready 2023-03-14 03:12:44 INFO [Server] Socket Connected aIfOihu1T6E0JjdBAAAB 2023-03-14 03:12:44 ERROR JWT Verify Token Failed JsonWebTokenError: invalid signature 2023-03-14 03:12:44 ERROR Cannot validate socket - invalid token 2023-03-14 03:12:45 INFO [Watcher] "Ebooks" Ready 2023-03-14 03:12:47 INFO [Watcher] "Audiobooks" Ready 2023-03-14 03:16:55 ERROR JWT Verify Token Failed JsonWebTokenError: invalid signature 2023-03-14 03:16:55 ERROR Verify Token User Not Found eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiJyb290IiwidXNlcm5hbWUiOiJyb290IiwiaWF0IjoxNjc4NzYzNDAwfQ.yzs3uvnzRE7jvzsgL6_DI7MoUjfAoSsaRxA3DE1wlcc 2023-03-14 03:17:20 ERROR JWT Verify Token Failed JsonWebTokenError: invalid signature 2023-03-14 03:17:20 ERROR Verify Token User Not Found eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiJyb290IiwidXNlcm5hbWUiOiJyb290IiwiaWF0IjoxNjc4NzYzNDAwfQ.yzs3uvnzRE7jvzsgL6_DI7MoUjfAoSsaRxA3DE1wlcc 2023-03-14 03:18:35 ERROR JWT Verify Token Failed JsonWebTokenError: invalid signature 2023-03-14 03:18:35 ERROR Verify Token User Not Found eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiJyb290IiwidXNlcm5hbWUiOiJyb290IiwiaWF0IjoxNjc4NzYzNDAw ``` ### Steps to reproduce the issue 1. Generate Backup on Production Container 2. Download that backup 3. Attempt to upload that back up to the Test Container 4. Error occurs ### Audiobookshelf version 2.2.16 ### How are you running audiobookshelf? Docker
adam added the bug label 2026-04-24 23:29:21 +02:00
adam closed this issue 2026-04-24 23:29:22 +02:00
Author
Owner

@hobesman commented on GitHub (Mar 14, 2023):

Have you tested extracting the backup and manually placing the files in the test server?

The backups are basic zip files so you can rename them to .zip and then extract them as usual.

This doesn't negate the problem but might help to identify if it's a corrupted backup or a problem with the restore process.

I think it's the restore process but it's good to verify.

@hobesman commented on GitHub (Mar 14, 2023): Have you tested extracting the backup and manually placing the files in the test server? The backups are basic zip files so you can rename them to .zip and then extract them as usual. This doesn't negate the problem but might help to identify if it's a corrupted backup or a problem with the restore process. I think it's the restore process but it's good to verify.
Author
Owner

@advplyr commented on GitHub (Mar 16, 2023):

I just tested this and was not able to reproduce it.

I took a look at the code for uploading backups and there is nothing that returns a 404 (Not Found) status code back to the client. This error must be happening on your server before the request reached the Abs server. The server logs also do not indicate any error happening with the backup.

There is one potential issue but I don't think it would return a 404. Uploads of files over 2GB will fail.

@advplyr commented on GitHub (Mar 16, 2023): I just tested this and was not able to reproduce it. I took a look at the code for uploading backups and there is nothing that returns a 404 (Not Found) status code back to the client. This error must be happening on your server before the request reached the Abs server. The server logs also do not indicate any error happening with the backup. There is one potential issue but I don't think it would return a 404. Uploads of files over 2GB will fail.
Author
Owner

@ambarnes2 commented on GitHub (Mar 19, 2023):

I attempted this again using the following steps:

  1. Log into prod audiobookshelf on docker prod server as root
  2. Create Backup
  3. Download Backup
  4. Log into test audiobookshelf on docker test server as root
  5. Upload backup
  6. Failure Occurs.

Below are the logs from portainer

[2023-03-19 02:03:18] ERROR: JWT Verify Token Failed JsonWebTokenError: invalid signature
    at /server/libs/jsonwebtoken/verify.js:133:19
    at getSecret (/server/libs/jsonwebtoken/verify.js:90:14)
    at Object.module.exports [as verify] (/server/libs/jsonwebtoken/verify.js:94:10)
    at /server/Auth.js:107:11
    at new Promise (<anonymous>)
    at Auth.verifyToken (/server/Auth.js:106:12)
    at Auth.authMiddleware (/server/Auth.js:71:27)
    at Server.authMiddleware (/server/Server.js:95:15)
    at Layer.handle [as handle_request] (/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/node_modules/express/lib/router/index.js:328:13) (Auth.js:109)
[2023-03-19 02:03:21] ERROR: Verify Token User Not Found eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiJyb290IiwidXNlcm5hbWUiOiJyb290IiwiaWF0IjoxNjc5MTkwODgzfQ.8BArxnQx6bUqB8HjrDV76JM9STjk3ccMnyMsOgWHVw4 (Auth.js:73)
[2023-03-19 02:03:24] INFO: [Server] Socket Connected Dk0PQtrqvVc_OvinAAAF
[2023-03-19 02:03:25] INFO: [Server] Unauth socket R7gPpAsLp4zT-DKxAAAD disconnected (Reason: transport close)
[2023-03-19 02:03:25] DEBUG: [Server] User Offline Alex (SocketAuthority.js:109)
[2023-03-19 02:03:25] INFO: [Server] Socket M6ygJOQ7aq3MsrhNAAAB disconnected from client "Alex" after 250511ms (Reason: transport close)
[2023-03-19 02:03:26] DEBUG: [Server] User Online Alex (SocketAuthority.js:161)
[2023-03-19 02:03:26] INFO: [Server] Socket Connected Tn_kPYbl3orJCjjfAAAH
[2023-03-19 02:03:26] ERROR: JWT Verify Token Failed JsonWebTokenError: invalid signature
    at /server/libs/jsonwebtoken/verify.js:133:19
    at getSecret (/server/libs/jsonwebtoken/verify.js:90:14)
    at Object.module.exports [as verify] (/server/libs/jsonwebtoken/verify.js:94:10)
    at /server/Auth.js:107:11
    at new Promise (<anonymous>)
    at Auth.verifyToken (/server/Auth.js:106:12)
    at Auth.authenticateUser (/server/Auth.js:102:17)
    at SocketAuthority.authenticateSocket (/server/SocketAuthority.js:143:41)
    at Socket.<anonymous> (/server/SocketAuthority.js:88:41)
    at Socket.emit (node:events:513:28) (Auth.js:109)
[2023-03-19 02:03:26] ERROR: Cannot validate socket - invalid token (SocketAuthority.js:145)
[2023-03-19 02:03:26] DEBUG: [DB] Updated user: 1 (Db.js:382)
[2023-03-19 02:07:34] ERROR: JWT Verify Token Failed JsonWebTokenError: invalid signature
    at /server/libs/jsonwebtoken/verify.js:133:19
    at getSecret (/server/libs/jsonwebtoken/verify.js:90:14)
    at Object.module.exports [as verify] (/server/libs/jsonwebtoken/verify.js:94:10)
    at /server/Auth.js:107:11
    at new Promise (<anonymous>)
    at Auth.verifyToken (/server/Auth.js:106:12)
    at Auth.authMiddleware (/server/Auth.js:71:27)
    at Server.authMiddleware (/server/Server.js:95:15)
    at Layer.handle [as handle_request] (/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/node_modules/express/lib/router/index.js:328:13) (Auth.js:109)
[2023-03-19 02:07:35] ERROR: Verify Token User Not Found eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiJyb290IiwidXNlcm5hbWUiOiJyb290IiwiaWF0IjoxNjc5MTkwODgzfQ.8BArxnQx6bUqB8HjrDV76JM9STjk3ccMnyMsOgWHVw4 (Auth.js:73)

@ambarnes2 commented on GitHub (Mar 19, 2023): I attempted this again using the following steps: 1. Log into prod audiobookshelf on docker prod server as root 2. Create Backup 3. Download Backup 4. Log into test audiobookshelf on docker test server as root 5. Upload backup 6. Failure Occurs. Below are the logs from portainer ``` [2023-03-19 02:03:18] ERROR: JWT Verify Token Failed JsonWebTokenError: invalid signature at /server/libs/jsonwebtoken/verify.js:133:19 at getSecret (/server/libs/jsonwebtoken/verify.js:90:14) at Object.module.exports [as verify] (/server/libs/jsonwebtoken/verify.js:94:10) at /server/Auth.js:107:11 at new Promise (<anonymous>) at Auth.verifyToken (/server/Auth.js:106:12) at Auth.authMiddleware (/server/Auth.js:71:27) at Server.authMiddleware (/server/Server.js:95:15) at Layer.handle [as handle_request] (/node_modules/express/lib/router/layer.js:95:5) at trim_prefix (/node_modules/express/lib/router/index.js:328:13) (Auth.js:109) [2023-03-19 02:03:21] ERROR: Verify Token User Not Found eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiJyb290IiwidXNlcm5hbWUiOiJyb290IiwiaWF0IjoxNjc5MTkwODgzfQ.8BArxnQx6bUqB8HjrDV76JM9STjk3ccMnyMsOgWHVw4 (Auth.js:73) [2023-03-19 02:03:24] INFO: [Server] Socket Connected Dk0PQtrqvVc_OvinAAAF [2023-03-19 02:03:25] INFO: [Server] Unauth socket R7gPpAsLp4zT-DKxAAAD disconnected (Reason: transport close) [2023-03-19 02:03:25] DEBUG: [Server] User Offline Alex (SocketAuthority.js:109) [2023-03-19 02:03:25] INFO: [Server] Socket M6ygJOQ7aq3MsrhNAAAB disconnected from client "Alex" after 250511ms (Reason: transport close) [2023-03-19 02:03:26] DEBUG: [Server] User Online Alex (SocketAuthority.js:161) [2023-03-19 02:03:26] INFO: [Server] Socket Connected Tn_kPYbl3orJCjjfAAAH [2023-03-19 02:03:26] ERROR: JWT Verify Token Failed JsonWebTokenError: invalid signature at /server/libs/jsonwebtoken/verify.js:133:19 at getSecret (/server/libs/jsonwebtoken/verify.js:90:14) at Object.module.exports [as verify] (/server/libs/jsonwebtoken/verify.js:94:10) at /server/Auth.js:107:11 at new Promise (<anonymous>) at Auth.verifyToken (/server/Auth.js:106:12) at Auth.authenticateUser (/server/Auth.js:102:17) at SocketAuthority.authenticateSocket (/server/SocketAuthority.js:143:41) at Socket.<anonymous> (/server/SocketAuthority.js:88:41) at Socket.emit (node:events:513:28) (Auth.js:109) [2023-03-19 02:03:26] ERROR: Cannot validate socket - invalid token (SocketAuthority.js:145) [2023-03-19 02:03:26] DEBUG: [DB] Updated user: 1 (Db.js:382) [2023-03-19 02:07:34] ERROR: JWT Verify Token Failed JsonWebTokenError: invalid signature at /server/libs/jsonwebtoken/verify.js:133:19 at getSecret (/server/libs/jsonwebtoken/verify.js:90:14) at Object.module.exports [as verify] (/server/libs/jsonwebtoken/verify.js:94:10) at /server/Auth.js:107:11 at new Promise (<anonymous>) at Auth.verifyToken (/server/Auth.js:106:12) at Auth.authMiddleware (/server/Auth.js:71:27) at Server.authMiddleware (/server/Server.js:95:15) at Layer.handle [as handle_request] (/node_modules/express/lib/router/layer.js:95:5) at trim_prefix (/node_modules/express/lib/router/index.js:328:13) (Auth.js:109) [2023-03-19 02:07:35] ERROR: Verify Token User Not Found eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiJyb290IiwidXNlcm5hbWUiOiJyb290IiwiaWF0IjoxNjc5MTkwODgzfQ.8BArxnQx6bUqB8HjrDV76JM9STjk3ccMnyMsOgWHVw4 (Auth.js:73) ```
Author
Owner

@advplyr commented on GitHub (Mar 22, 2023):

The server logs don't indicate any issue with the upload. I'm pretty sure that is because the request is never reaching the Abs server. I'm pretty confident of that because the Abs server does not respond with a 404 from that request.

@advplyr commented on GitHub (Mar 22, 2023): The server logs don't indicate any issue with the upload. I'm pretty sure that is because the request is never reaching the Abs server. I'm pretty confident of that because the Abs server does not respond with a 404 from that request.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#1021