QNAP to BackBlaze B2: Network Error, Cannot upload to the cloud service

@SteveKo Looking at the HBS logs, I see that every failed job creation entry (which indicates a 504 gateway timeout error) occurred a few milliseconds after what appears to be some python errors (possibly related to an SSL error). Below is an example of some back to back entries:

[2026-01-15 15:40:05,869][Dummy-2006][E][qnap.cloudconnector3.rest.app][app.py:handle_flask_error:480] : Traceback (most recent call last):
  File "/share/CACHEDEV1_DATA/.qpkg/HybridBackup/CloudConnector3/python/lib/python3.11/site-packages/urllib3/connectionpool.py", line 597, in urlopen
    httplib_response = self._make_request(conn, method, url,
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/share/CACHEDEV1_DATA/.qpkg/HybridBackup/CloudConnector3/python/lib/python3.11/site-packages/urllib3/connectionpool.py", line 345, in _make_request
    self._validate_conn(conn)
  File "/share/CACHEDEV1_DATA/.qpkg/HybridBackup/CloudConnector3/python/lib/python3.11/site-packages/urllib3/connectionpool.py", line 844, in _validate_conn
    conn.connect()
  File "/share/CACHEDEV1_DATA/.qpkg/HybridBackup/CloudConnector3/python/lib/python3.11/site-packages/urllib3/connection.py", line 319, in connect
    self.sock = ssl_wrap_socket(
                ^^^^^^^^^^^^^^^^
  File "/share/CACHEDEV1_DATA/.qpkg/HybridBackup/CloudConnector3/python/lib/python3.11/site-packages/urllib3/util/ssl_.py", line 325, in ssl_wrap_socket
    return context.wrap_socket(sock, server_hostname=server_hostname)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/share/CACHEDEV1_DATA/.qpkg/HybridBackup/CloudConnector3/python/lib/python3.11/ssl.py", line 517, in wrap_socket
    return self.sslsocket_class._create(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/share/CACHEDEV1_DATA/.qpkg/HybridBackup/CloudConnector3/python/lib/python3.11/ssl.py", line 1075, in _create
    self.do_handshake()
  File "/share/CACHEDEV1_DATA/.qpkg/HybridBackup/CloudConnector3/python/lib/python3.11/ssl.py", line 1346, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLError: [SSL] unknown error (_ssl.c:992)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/share/CACHEDEV1_DATA/.qpkg/HybridBackup/CloudConnector3/python/lib/python3.11/site-packages/requests/adapters.py", line 430, in send
    resp = conn.urlopen(
           ^^^^^^^^^^^^^
  File "/share/CACHEDEV1_DATA/.qpkg/HybridBackup/CloudConnector3/python/lib/python3.11/site-packages/urllib3/connectionpool.py", line 630, in urlopen
    raise SSLError(e)
urllib3.exceptions.SSLError: [SSL] unknown error (_ssl.c:992)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/builds/diad/sw3/hybrid-backup/hbs3-backend/qpkg/output/shared/python/lib/python3.11/site-packages/ucc/httpclient.py", line 300, in __process_request
  File "/share/CACHEDEV1_DATA/.qpkg/HybridBackup/CloudConnector3/python/lib/python3.11/site-packages/requests/sessions.py", line 612, in send
    r = adapter.send(request, **kwargs)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/share/CACHEDEV1_DATA/.qpkg/HybridBackup/CloudConnector3/python/lib/python3.11/site-packages/requests/adapters.py", line 514, in send
    raise SSLError(e, request=request)
requests.exceptions.SSLError: [SSL] unknown error (_ssl.c:992)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/builds/diad/sw3/hybrid-backup/hbs3-backend/qpkg/output/shared/python/lib/python3.11/site-packages/qnap/cloudconnector3/rest/plugin.py", line 237, in outter_func
  File "/builds/diad/sw3/hybrid-backup/hbs3-backend/qpkg/output/shared/python/lib/python3.11/site-packages/qnap/cloudconnector3/rest/cloud/job.py", line 202, in create_job
  File "/builds/diad/sw3/hybrid-backup/hbs3-backend/qpkg/output/shared/python/lib/python3.11/site-packages/qnap/cloudconnector3/rest/cloud/cloud.py", line 1813, in download_job_info
  File "/builds/diad/sw3/hybrid-backup/hbs3-backend/qpkg/output/shared/python/lib/python3.11/site-packages/qnap/cloudconnector3/rest/cloud/cloud.py", line 1780, in download_job_info_data
  File "/builds/diad/sw3/hybrid-backup/hbs3-backend/qpkg/output/shared/python/lib/python3.11/site-packages/ucc/obj2path.py", line 221, in download
  File "/builds/diad/sw3/hybrid-backup/hbs3-backend/qpkg/output/shared/python/lib/python3.11/site-packages/ucc/common.py", line 96, in outter_func
  File "/builds/diad/sw3/hybrid-backup/hbs3-backend/qpkg/output/shared/python/lib/python3.11/site-packages/ucc/common.py", line 94, in outter_func
  File "/builds/diad/sw3/hybrid-backup/hbs3-backend/qpkg/output/shared/python/lib/python3.11/site-packages/ucc/backblaze.py", line 973, in download_object
  File "/builds/diad/sw3/hybrid-backup/hbs3-backend/qpkg/output/shared/python/lib/python3.11/site-packages/ucc/backblaze.py", line 456, in _download_file_by_name
  File "/builds/diad/sw3/hybrid-backup/hbs3-backend/qpkg/output/shared/python/lib/python3.11/site-packages/ucc/httpclient.py", line 526, in _do_http_request
  File "/builds/diad/sw3/hybrid-backup/hbs3-backend/qpkg/output/shared/python/lib/python3.11/site-packages/ucc/httpclient.py", line 402, in __process_request
ucc.exception.NetworkError: [SSL] unknown error (_ssl.c:992)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/share/CACHEDEV1_DATA/.qpkg/HybridBackup/CloudConnector3/python/lib/python3.11/site-packages/flask/app.py", line 1813, in full_dispatch_request
    rv = self.dispatch_request()
         ^^^^^^^^^^^^^^^^^^^^^^^
  File "/share/CACHEDEV1_DATA/.qpkg/HybridBackup/CloudConnector3/python/lib/python3.11/site-packages/flask/app.py", line 1799, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/builds/diad/sw3/hybrid-backup/hbs3-backend/qpkg/output/shared/python/lib/python3.11/site-packages/qnap/cloudconnector3/rest/job.py", line 159, in create_job
  File "/builds/diad/sw3/hybrid-backup/hbs3-backend/qpkg/output/shared/python/lib/python3.11/site-packages/qnap/cloudconnector3/rest/plugin.py", line 239, in outter_func
  File "/builds/diad/sw3/hybrid-backup/hbs3-backend/qpkg/output/shared/python/lib/python3.11/site-packages/qnap/cloudconnector3/rest/cloud/job.py", line 110, in _handle_exc
qnap.cloudconnector3.rest.exception.FlaskException: None

[2026-01-15 15:40:05,966][Dummy-2006][I][qnap.cloudconnector3.rest.job][job.py:log_response:95] : https://192.168.205.110/cc3/v1/users/system/jobs b'{"ui_specific":{"remote.enable_object_lock":true,"description":"","after_create_job":true,"schedule":{"type":"scheduler","list":[{"sType":"daily","sValue":{"checkVaild":false,"vaildDate":"","vaildHour":0,"vaildMinute":0,"minute":"15","hour":"6","weeklyDays":"","chooseDays":""}}],"checkStop":false},"quick_check_job":{"schedule":{"type":"noschedule"}},"full_check_job":{"schedule":{"type":"noschedule"}}},"enable":true,"name":"Backup to Backblaze","job_type":"backup","user_id":"system","_type":"cloud","account_id":"2e664354-f267-11f0-bd42-245ebe021868","backup.type":"dedup","backup.relink":false,"remote.root":"/Backup to Backblaze.qdff","backup.source":["Download","homes","IT","Multimedia","Public","Recordings","Web"],"backup.volume_id":{"source":null,"destination":null},"remote.container":"SD-QNAP-695","remote.multipart_size":104857600,"schedule":[{"type":"cron","cron_start":"15 6 * * *"}],"options.auto_eject_external_device":false,"backup.version_rotation_scheme":{"type":"fifo","max_versions":30,"max_days":null,"extra_hourly_versions":0,"extra_daily_versions":0,"extra_weekly_versions":0,"extra_monthly_versions":0,"min_versions":0},"quick_check_job":{"enable":true,"schedule":[{"type":"manually"}]},"full_check_job":{"enable":false,"schedule":[{"type":"manually"}]},"compress.enable":false,"filter.date.from":null,"filter.date.to":null,"filter.size.min":null,"filter.size.max":null,"filter.type.include":[],"filter.type.exclude":[],"filter.name.include":[],"filter.name.exclude":[],"filter.last_modify_time":null,"filter.symlink":false,"filter.hidden":true,"encrypt.enable":false,"ratelimit.upload":null,"ratelimit.download":null,"options.enable_tcp_bbr":true,"options.enable_quwan_integration":false,"backup.preserve_acl_xattr":false,"snapshot.enable":false,"remote.object_lock_retention_days":null,"remote.object_lock_extend_threshold_days":null,"log_file_size_mb":10,"notify.job_fail":false,"notify.job_finish":false,"options.max_error_count":10,"options.max_concurrent_transfer":5,"options.error_duration_threshold":1800,"options.restart_if_abnormal_shutdown":true,"backup.usage_warning_threshold":null,"options.time_warning_threshold":null,"debug_log_file":false,"backup.no_dedup":true,"options.detail_log_max_versions":50}' 504 GATEWAY TIMEOUT {'error': {'error_code': 'cloud_network_error', 'message': 'cloud_network_error'}}

I’m struggling to understand the server logs here…it seems to be SSL-related, but I don’t know how to remedy this. Anyone have a better ability to understand the logs?

I fixed it! It appears that my QNAP system time was off by a few seconds (<5). Updating the time in Control Panel seems to have me going again.

Thanks @SteveKo for your help–looking through the HBS logs led me to understand what would cause SSL errors. I didn’t think that a <5 second difference would cause a failure, but updating the time took care of it!

Great news!

I would highly recommend you have your NAS tied to an NTP server that gets regular updates. Clock drift can be a cause of issues particularly as it relates to security items.

Thanks! It is–and set to sync every 12 hours. I’m honestly not sure if this is what actually fixed the issue–the drift was less than 5 seconds, and it seems that SSL can tolerate a few minutes of asynchronicity.

You would be surprised. I’m surprised it was off by 5 seconds over a 24 hour period!

Dangit–I was wrong. This allowed me to create the backup job and start it, but when it failed (I had my caps on Backblaze incorrectly configured) and I tried to restart it, I got errors. I’ve attempted restarting it several times, tried creating new backup jobs, and I’ve updated my clock plenty (confirming that it matches my local PC time which was synced at the same time)–no luck.

I’m contemplating giving up at this point. Any other ideas on what to do?

Have you talked to BackBlaze support?

I’ll push them again, but their support was rather unhelpful (had to push to get past the AI canned responses, then a human told me to switch NASs or use Cyberduck).