Client applications getting connection timeout, but web interface still works

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 20.0.5): 27.1.2.1
Operating system and version (eg, Ubuntu 20.04): Ubuntu Server 22.04.2 LTS
Apache or nginx version (eg, Apache 2.4.25): ?
PHP version (eg, 7.4): ?

The issue you are facing:

The official Nextcloud clients on Windows, Linux and Android can no longer connect to the instance and get a connection timeout error.

Connecting to the web interface works from multiple browsers and multiple devices, all using different IP addresses.
Connecting to WebDAV with a WebDAV client sill works as well.

Is this the first time you’ve seen this error? (Y/N): Y

Steps to replicate it:

  1. Enter url of Nextcloud instance in Windows, Linux or Android client and connect
  2. Wait for connection timeout

The output of your Nextcloud log in Admin > Logging:

OC\Authentication\Exceptions\InvalidTokenException: Token is too short for a generated token, should be the password during basic auth
OC\Authentication\Exceptions\InvalidTokenException: Token does not exist: token does not exist

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'datadirectory' => '/data',
  'instanceid' => 'REDACTED',
  'passwordsalt' => 'REDACTED',
  'secret' => 'REDACTED',
  'trusted_domains' => 
  array (
    0 => 'REDACTED',
  ),
  'dbtype' => 'mysql',
  'version' => '27.1.2.1',
  'overwrite.cli.url' => 'https://REDACTED',
  'overwriteprotocol' => 'https',
  'dbname' => 'REDACTED',
  'dbhost' => 'REDACTED',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'REDACTED',
  'dbpassword' => 'REDACTED',
  'installed' => true,
  'maintenance' => false,
  'enable_previews' => true,
  'enabledPreviewProviders' => 
  array (
    0 => 'OC\\Preview\\TXT',
    1 => 'OC\\Preview\\MarkDown',
    2 => 'OC\\Preview\\OpenDocument',
    3 => 'OC\\Preview\\PDF',
    4 => 'OC\\Preview\\MSOffice2003',
    5 => 'OC\\Preview\\MSOfficeDoc',
    6 => 'OC\\Preview\\PDF',
    7 => 'OC\\Preview\\Image',
    8 => 'OC\\Preview\\Photoshop',
    9 => 'OC\\Preview\\TIFF',
    10 => 'OC\\Preview\\SVG',
    11 => 'OC\\Preview\\Font',
    12 => 'OC\\Preview\\MP3',
    13 => 'OC\\Preview\\Movie',
    14 => 'OC\\Preview\\MKV',
    15 => 'OC\\Preview\\MP4',
    16 => 'OC\\Preview\\AVI',
  ),
  'preview_max_x' => '2048',
  'preview_max_y' => '2048',
  'jpeg_quality' => '60',
  'loglevel' => 0,
  'theme' => '',
  'defaultapp' => 'files',
  'mail_smtpmode' => 'smtp',
  'mail_smtpsecure' => 'ssl',
  'mail_sendmailmode' => 'smtp',
  'mail_from_address' => 'REDACTED',
  'mail_domain' => 'REDACTED',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpauth' => 1,
  'mail_smtphost' => 'REDACTED',
  'mail_smtpport' => 'REDACTED',
  'mail_smtpname' => 'REDACTED',
  'mail_smtppassword' => 'REDACTED',
  'filelocking.enabled' => 'true',
  'memcache.locking' => '\\OC\\Memcache\\APCu',
  'trusted_proxies' => ['REDACTED'],
  'overwrite.cli.url' => 'REDACTED',
  'overwritehost' => 'REDACTED',
  'overwriteprotocol' => 'https',

);

The output of your Apache/nginx/system log in /var/log/____:

<redacted IP> - <redacted user> [26/Oct/2023:11:58:57 +0200] "GET /index.php/204 HTTP/1.1" 204 0 "-" "Mozilla/5.0 (Windows) mirall/3.10.1stable-Win64 (build 20231025) (Nextcloud, windows-10.0.22621 ClientArchitecture: x86_64 OsArchitecture: x86_64)"
<redacted IP> - <redacted user> [26/Oct/2023:11:58:57 +0200] "GET /index.php/204 HTTP/1.1" 204 0 "-" "Mozilla/5.0 (Windows) mirall/3.10.1stable-Win64 (build 20231025) (Nextcloud, windows-10.0.22621 ClientArchitecture: x86_64 OsArchitecture: x86_64)"
<redacted IP> - <redacted user> [26/Oct/2023:11:58:57 +0200] "GET /status.php HTTP/1.1" 200 151 "-" "Mozilla/5.0 (Windows) mirall/3.10.1stable-Win64 (build 20231025) (Nextcloud, windows-10.0.22621 ClientArchitecture: x86_64 OsArchitecture: x86_64)"
<redacted IP> - <redacted user> [26/Oct/2023:11:59:59 +0200] "GET /index.php/204 HTTP/1.1" 204 0 "-" "Mozilla/5.0 (Windows) mirall/3.10.1stable-Win64 (build 20231025) (Nextcloud, windows-10.0.22621 ClientArchitecture: x86_64 OsArchitecture: x86_64)"
<redacted IP> - <redacted user> [26/Oct/2023:11:59:59 +0200] "GET /index.php/204 HTTP/1.1" 204 0 "-" "Mozilla/5.0 (Windows) mirall/3.10.1stable-Win64 (build 20231025) (Nextcloud, windows-10.0.22621 ClientArchitecture: x86_64 OsArchitecture: x86_64)"
<redacted IP> - <redacted user> [26/Oct/2023:11:59:59 +0200] "GET /status.php HTTP/1.1" 200 151 "-" "Mozilla/5.0 (Windows) mirall/3.10.1stable-Win64 (build 20231025) (Nextcloud, windows-10.0.22621 ClientArchitecture: x86_64 OsArchitecture: x86_64)"
<redacted IP> - <redacted user> [26/Oct/2023:12:01:01 +0200] "GET /index.php/204 HTTP/1.1" 204 0 "-" "Mozilla/5.0 (Windows) mirall/3.10.1stable-Win64 (build 20231025) (Nextcloud, windows-10.0.22621 ClientArchitecture: x86_64 OsArchitecture: x86_64)"
<redacted IP> - <redacted user> [26/Oct/2023:12:01:01 +0200] "GET /index.php/204 HTTP/1.1" 204 0 "-" "Mozilla/5.0 (Windows) mirall/3.10.1stable-Win64 (build 20231025) (Nextcloud, windows-10.0.22621 ClientArchitecture: x86_64 OsArchitecture: x86_64)"
<redacted IP> - <redacted user> [26/Oct/2023:12:01:01 +0200] "GET /status.php HTTP/1.1" 200 151 "-" "Mozilla/5.0 (Windows) mirall/3.10.1stable-Win64 (build 20231025) (Nextcloud, windows-10.0.22621 ClientArchitecture: x86_64 OsArchitecture: x86_64)"

Screenshots:


When you connected your NC Desktop Client you may have been asked to log into your nextcloud via webui and proceed a “grant access” procedure, right?

For some reasons this specific “App Token” - that has been generated during this grant access process - seems no longer be valid and this one seems to be different of the token you are using to get your WebDAV Client connected as well.

So my qustion, have you tried to log out from your NC Desktop Client and re-Login via a new (!) App Token?
If not, can you try this?

Unfortunately, I am not even reaching the “grant access” procedure. The clients are getting timeouts before getting there.

On my Windows desktop, I had already been logged in before, hence the account was already present.I logged myself out now, and tried to log in again, but am getting
timeout while trying to connect to nextcloud.example.com/status.php.

The status.php site works perfectly fine in Chrome and Firefoxt though:
{"installed":true,"maintenance":false,"needsDbUpgrade":false,"version":"27.1.2.1","versionstring":"27.1.2","edition":"","productname":"Nextcloud","extendedSupport":false}

image

Other users of my instance can also no longer connect their clients and are getting the same error.

Is your server listening on IPv4 and IPv6 as well?
Have you tried to disable IPv6 (only for test purposes!!) and restart the NC Server with just IPv4 Support - does the timeouts occur as well?

Disabled listening to IPv6 in my nginx reverse proxy, issue sadly persists.

ok, found this old thread on github but i am not sure if it fits to your problem …

Decrease the $maxDelay variable in /lib/private/Security/Bruteforce/Throttler.php · Issue #9864 · nextcloud/server · GitHub

Thank you, I did find this thread before but it seems to be sadly unrelated. Completely fresh clients cannot connect as well.

Hi. Setting → disabled proxy.

@lizardperson I’m having the same issue with client apps. Did you ever find a reliable answer?