Skip to content

Client disconnect after about one hour #239

Closed

Description

@webobardewisch

The client disconnect after about one hour and stop syncing. It try to connect again automatically but no success. The client need to quit and start again to continue syncing. But only for about one hour. Than it disconnect again.

  • Client on Linux Mint 21
  • OpenCloud on VPS (Hetzner)

Activity

  1. nicokaiser commented on Apr 29, 2025

    @nicokaiser

    I also observed this, this might be related with Internet connection loss: the client cannot make a connection (which is fine), and then completely gives up and does not retry anymore (which is not fine).

    So it would be desired that the client tries to reconnect every few minutes when the Internet connection is established (the operating system should know this) to avoid bad surprises when the client stopped syncing many hours ago.

  2. Svanvith commented on Apr 29, 2025

    @Svanvith
    Contributor

    Could you both please try to reproduce your described issue with loggin enabled and post the logfiles?

  3. webobardewisch commented on Apr 30, 2025

    @webobardewisch
    Author

    After the upgrade to the latest rolling version of OpenCloud (2.2.0) the sync of the desktop app seems to be good. No disconnecting anymore, everything is synced. Great. Thanks.

  4. nicokaiser commented on Apr 30, 2025

    @nicokaiser

    Same here, it currently feels quite stable. I will observe this, also while using flaky internet connection in trains etc...

  5. nicokaiser commented on May 8, 2025

    @nicokaiser

    Today, the client suddenly stopped syncing and only displayed "Queued" when changing files on the desktop. "Force sync now" changed this to "Preparing", but nothing was synced. The Log files did not provide any helpful information unfortunately, but when restarting, many of these entries appeared:

    25-05-08 23:23:06:893 [ critical sync.networkjob ]:	Deleting running job OCC::AbstractNetworkJob(OCC::Account("User@opencloud.example.com"), "https://opencloud.example.com/ocs/v2.php/apps/notifications/api/v1/notifications?format=json", "GET")
    

    The client seemed to be stuck somewhere (maybe due to server restart or something) and never recovered. This should never ever happen, since files are not synced anymore without getting noticed about this.
    Restarting the client solved the problem...

  6. nicokaiser commented on May 9, 2025

    @nicokaiser

    Also, now the client is stuck in a "Connecting..." state with "Server replied with an error while reading directory '/' : Connection timed out" message. This might also be related to Wi-fi issues (laptop going to sleep, etc.). Restarting the client helped.
    There seems to be missing some kind of infinite retry...

  7. nicokaiser commented on May 9, 2025

    @nicokaiser

    Please let me know if I can provide anything useful to track this issue. The client is stuck in "Preparing to sync" state again. When quitting, many "Deleting running job" entries appeared in the Log, it really seems like something gets stuck without propert timeouts and retries.

  8. umrath commented on Jun 4, 2025

    @umrath

    Same problem: Client disconnects after a while and stays disconnected until I restart the client.

  9. TheOneRing commented on Jun 4, 2025

    @TheOneRing
    Contributor

    Could you both please try to reproduce your described issue with loggin enabled and post the logfiles?

    Please provide logs.

  10. nicokaiser commented on Jun 4, 2025

    @nicokaiser

    I try to provide logs next time it happens. Since the logfiles contain sensitive information this is not trivial, and also because the problem happens only after a few hours (there is not indication that sync has stopped other than the app being stuck in "Preparing to sync" state).

  11. nicokaiser commented on Jun 5, 2025

    @nicokaiser

    It happened again, this time the client was stuck in "Connecting..." mode.
    The last entries in OpenCloud.log are these (I'll attach more lines):

    25-06-05 10:18:13:132 [ info sync.httplogger ]:	REQUEST f3a9bb10-8f8c-45fb-8c10-261e62162944 {"request":{"body":{"length":0},"header":{"accept":"*/*","accept-language":"de_DE","authorization":"Bearer **redacted**","oc-connection-validator":"desktop","original-request-id":"f3a9bb10-8f8c-45fb-8c10-261e62162944","user-agent":"Mozilla/5.0 (Macintosh) mirall/1.0.0 (OpenCloud, macos-24.5.0 ClientArchitecture: arm64 OsArchitecture: arm64)","x-request-id":"f3a9bb10-8f8c-45fb-8c10-261e62162944"},"info":{"cached":false,"id":"f3a9bb10-8f8c-45fb-8c10-261e62162944","method":"GET","url":"https://**redacted**/status.php"}}}
    25-06-05 10:18:13:146 [ info sync.httplogger ]:	RESPONSE f3a9bb10-8f8c-45fb-8c10-261e62162944 {"response":{"body":{"data":"{\n    \"installed\": true,\n    \"maintenance\": false,\n    \"needsDbUpgrade\": false,\n    \"version\": \"0.1.0.0\",\n    \"versionstring\": \"0.1.0\",\n    \"edition\": \"\",\n    \"productname\": \"OpenCloud\",\n    \"product\": \"OpenCloud\",\n    \"productversion\": \"2.3.0\"\n}","length":246},"header":{"alt-svc":"h3=\":443\"; ma=2592000","content-length":"246","content-security-policy":"child-src 'self'; connect-src 'self' blob: https://raw.githubusercontent.com/opencloud-eu/awesome/; default-src 'none'; font-src 'self'; frame-ancestors 'self'; frame-src 'self' blob: https://embed.diagrams.net/; img-src 'self' data: blob: https://raw.githubusercontent.com/opencloud-eu/awesome/; manifest-src 'self'; media-src 'self'; object-src 'self' blob:; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'","content-type":"application/json","date":"Thu, 05 Jun 2025 08:18:13 GMT","referrer-policy":"strict-origin-when-cross-origin","vary":"Origin","x-content-type-options":"nosniff","x-frame-options":"SAMEORIGIN","x-permitted-cross-domain-policies":"none","x-request-id":"f3a9bb10-8f8c-45fb-8c10-261e62162944","x-robots-tag":"none","x-xss-protection":"1; mode=block"},"info":{"id":"f3a9bb10-8f8c-45fb-8c10-261e62162944","method":"GET","reply":{"cached":false,"duration":14,"durationString":"14142500ns","status":200,"version":"HTTP 2"},"url":"https://**redacted**/status.php"}}}
    25-06-05 10:18:13:146 [ info sync.checkserverjob ]:	status.php returns:  QJsonDocument({"edition":"","installed":true,"maintenance":false,"needsDbUpgrade":false,"product":"OpenCloud","productname":"OpenCloud","productversion":"2.3.0","version":"0.1.0.0","versionstring":"0.1.0"})   QNetworkReply::NoError  Reply:  QNetworkReplyHttpImpl(0x6000014f2340)
    25-06-05 10:18:13:146 [ info sync.connectionvalidator ]:	** Application: OpenCloud found:  QUrl("https://**redacted**")  with version  "0.1.0"
    25-06-05 10:18:13:147 [ info sync.networkjob ]:	Created OCC::JsonApiJob(OCC::Account("**redacted**@**redacted**"), "https://**redacted**/ocs/v2.php/cloud/capabilities?format=json", "GET", Original-Request-ID: "37cdd8ff-87cc-4b69-9f76-99a0b2805a02", X-Request-ID: "37cdd8ff-87cc-4b69-9f76-99a0b2805a02") for OCC::FetchServerSettingsJob(0x6000010afd20)
    25-06-05 10:18:13:197 [ info sync.httplogger ]:	REQUEST 37cdd8ff-87cc-4b69-9f76-99a0b2805a02 {"request":{"body":{"length":0},"header":{"accept":"*/*","accept-language":"de_DE","authorization":"Bearer **redacted**","ocs-apirequest":"true","original-request-id":"37cdd8ff-87cc-4b69-9f76-99a0b2805a02","user-agent":"Mozilla/5.0 (Macintosh) mirall/1.0.0 (OpenCloud, macos-24.5.0 ClientArchitecture: arm64 OsArchitecture: arm64)","x-request-id":"37cdd8ff-87cc-4b69-9f76-99a0b2805a02"},"info":{"cached":false,"id":"37cdd8ff-87cc-4b69-9f76-99a0b2805a02","method":"GET","url":"https://**redacted**/ocs/v2.php/cloud/capabilities?format=json"}}}
    

    The last few lines in .OpenCloudSync.log where these:

    #=#=#=# Syncrun started 2025-06-05T08:14:05Z
    #=#=#=#=# Propagation starts 2025-06-05T08:14:05Z (last step: 42 msec , total: 42 msec) 
    #=#=#=# Syncrun finished 2025-06-05T08:14:05Z (last step: 3 msec , total: 45 msec) 
    #=#=#=# Syncrun started 2025-06-05T08:15:07Z
    #=#=#=#=# Propagation starts 2025-06-05T08:15:07Z (last step: 48 msec , total: 48 msec) 
    #=#=#=# Syncrun finished 2025-06-05T08:15:07Z (last step: 4 msec , total: 52 msec) 
    #=#=#=# Syncrun started 2025-06-05T08:16:09Z
    #=#=#=#=# Propagation starts 2025-06-05T08:16:09Z (last step: 60 msec , total: 60 msec) 
    #=#=#=# Syncrun finished 2025-06-05T08:16:09Z (last step: 3 msec , total: 64 msec) 
    

    So it seems that after the Syncrun at 08:16 (10:16 CEST) the client got stuck. Somewhere after that time, the client tried "Refreshing token", maybe something in the token mechanism is broken sometimes?

    OpenCloud.log-part.json

  12. TheOneRing commented on Jun 5, 2025

    @TheOneRing
    Contributor

    It appears we might get hung up if the wellknown request fails. Thx for the logs.

    25-06-05 10:17:34:072 [ debug sync.credentials.oauth ]	[ OCC::OAuth::fetchWellKnown()::(anonymous class)::operator() ]:	failed to fetch .well-known reply, error: QNetworkReply::OperationCanceledError
    
  13. added theissue type on Jun 5, 2025
  14. added this to the Next milestone on Jun 5, 2025
  15. nicokaiser commented on Jun 5, 2025

    @nicokaiser

    Thanks for taking care of this.
    I will further observe this – in some cases I saw the client being stuck on "Queued" or "Preparing to sync" state. It might be interesting to see if the cause is the same.
    Either way, the client should never ever ever get stuck and give up syncing, no matter what happens. Network problem can – and will – occur, and finding the client having stopped syncing some hours ago after a short network interruption can be very frustrating.

  16. added a commit that references this issue on Jun 5, 2025
    8ac3992
  17. TheOneRing commented on Jun 5, 2025

    @TheOneRing
    Contributor

    It's definitely not supposed to get stuck, but we had some inconsistent error handling.

  18. added a commit that references this issue on Jun 5, 2025
    ad27bb8
  19. added a commit that references this issue on Jun 5, 2025
    ccea6a7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions