Adding B2 storage causes container crash

Hello,

I’m attempting to add B2 using an application key. It appears to connect but shortly afterwards the entire container freezes up. When this happens, the WebUI also becomes unreachable until I reboot. Here’s my logs:

024/05/17 22:54:57 192.168.1.231:38242 POST /list_b2_bucket
2024/05/17 22:55:00 192.168.1.231:38242 POST /info_storage
2024/05/17 22:55:00 Running /root/.duplicacy-web/bin/duplicacy_linux_x64_3.2.3 [-log -d info -repository /cache/localhost/all b2://[redacted_bucket_name]]
2024/05/17 22:55:00 Set current working directory to /cache/localhost/all
2024/05/17 22:55:00 DEBUG PASSWORD_ENV_VAR Reading the environment variable DUPLICACY_B2_ID
2024/05/17 22:55:00 DEBUG PASSWORD_ENV_VAR Reading the environment variable DUPLICACY_B2_KEY
2024/05/17 22:55:00 INFO BACKBLAZE_URL Download URL is: https://f002.backblazeb2.com
2024/05/17 22:55:00 TRACE BACKBLAZE_CALL [0] URL request 'HEAD https://f002.backblazeb2.com/file/[redacted_bucket_name]/config' returned status code 404
2024/05/17 22:55:00 DEBUG BACKBLAZE_LIST https://f002.backblazeb2.com/file/[redacted_bucket_name]/config did not return headers
2024/05/17 22:55:00 INFO STORAGE_NOT_INITIALIZED The storage has not been initialized
2024/05/17 22:55:03 192.168.1.231:38242 POST /lookup_storage
2024/05/17 22:55:04 192.168.1.231:38242 POST /lookup_storage
2024/05/17 22:55:05 192.168.1.231:38242 POST /lookup_storage
2024/05/17 22:55:06 192.168.1.231:38242 POST /lookup_storage
[...]
2024/05/17 22:55:19 192.168.1.231:38242 POST /lookup_storage
2024/05/17 22:55:20 192.168.1.231:38242 POST /lookup_storage
2024/05/17 22:55:20 192.168.1.231:38242 POST /lookup_storage
2024/05/17 22:55:32 192.168.1.231:38242 POST /add_storage
2024/05/17 22:55:32 Running /root/.duplicacy-web/bin/duplicacy_linux_x64_3.2.3 [-log -d init -e -storage-name backblaze duplicacyweb b2://[redacted_bucket_name]]
2024/05/17 22:55:32 Set current working directory to /cache/localhost/all
2024/05/17 22:55:33 DEBUG PASSWORD_ENV_VAR Reading the environment variable DUPLICACY_BACKBLAZE_B2_ID
2024/05/17 22:55:33 DEBUG PASSWORD_ENV_VAR Reading the environment variable DUPLICACY_BACKBLAZE_B2_KEY
2024/05/17 22:55:33 INFO BACKBLAZE_URL Download URL is: https://f002.backblazeb2.com
2024/05/17 22:55:33 DEBUG PASSWORD_ENV_VAR Reading the environment variable DUPLICACY_BACKBLAZE_B2_ID
2024/05/17 22:55:33 DEBUG PASSWORD_ENV_VAR Reading the environment variable DUPLICACY_BACKBLAZE_B2_KEY
2024/05/17 22:55:33 DEBUG PASSWORD_ENV_VAR Reading the environment variable DUPLICACY_BACKBLAZE_PASSWORD
2024/05/17 22:55:33 TRACE BACKBLAZE_CALL [0] URL request 'HEAD https://f002.backblazeb2.com/file/[redacted_bucket_name]/config' returned status code 404
2024/05/17 22:55:33 DEBUG BACKBLAZE_LIST https://f002.backblazeb2.com/file/[redacted_bucket_name]/config did not return headers
2024/05/17 22:55:33 DEBUG PASSWORD_ENV_VAR Reading the environment variable DUPLICACY_BACKBLAZE_PASSWORD
2024/05/17 22:55:33 TRACE BACKBLAZE_CALL [0] URL request 'HEAD https://f002.backblazeb2.com/file/[redacted_bucket_name]/config' returned status code 404
2024/05/17 22:55:33 DEBUG BACKBLAZE_LIST https://f002.backblazeb2.com/file/[redacted_bucket_name]/config did not return headers
2024/05/17 22:55:33 TRACE BACKBLAZE_CALL [0] URL request 'POST https://api002.backblazeb2.com/b2api/v1/b2_get_upload_url' returned 401 
2024/05/17 22:55:34 TRACE BACKBLAZE_CALL [0] URL request 'POST https://api002.backblazeb2.com/b2api/v1/b2_get_upload_url' returned 401 
2024/05/17 22:55:36 TRACE BACKBLAZE_CALL [0] URL request 'POST https://api002.backblazeb2.com/b2api/v1/b2_get_upload_url' returned 401 
2024/05/17 22:55:41 TRACE BACKBLAZE_CALL [0] URL request 'POST https://api002.backblazeb2.com/b2api/v1/b2_get_upload_url' returned 401 
2024/05/17 22:55:54 TRACE BACKBLAZE_CALL [0] URL request 'POST https://api002.backblazeb2.com/b2api/v1/b2_get_upload_url' returned 401 
2024/05/17 22:56:11 TRACE BACKBLAZE_CALL [0] URL request 'POST https://api002.backblazeb2.com/b2api/v1/b2_get_upload_url' returned 401 
2024/05/17 22:56:11 INFO BACKBLAZE_URL Download URL is: https://f002.backblazeb2.com
2024/05/17 22:56:12 TRACE BACKBLAZE_CALL [0] URL request 'POST https://api002.backblazeb2.com/b2api/v1/b2_get_upload_url' returned 401  

Any ideas on what’s happening with this? Thanks!

It looks like you’re experiencing issues when trying to add B2 storage with an application key in Duplicacy. The logs show multiple 401 Unauthorized errors, which indicate an authentication issue.

401 == unauthorized.
Does your api key have correct entitlements?

Check Application Key Permissions

Log in to your Backblaze B2 account.Go to the “App Keys” section.

Verify that the application key you are using has the correct permissions:
The key should have listBuckets, readFiles, writeFiles, and deleteFiles permissions for the bucket.

If they do , double check you saved the key information correct or delete it and make a new one.

Ah, I was missing writeFiles somehow. Thanks!

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.