Nextcloud Client and Http2 support

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:

[/details]

Nextcloud version (eg, 20.0.5): 28.0.1
Operating system and version (eg, Ubuntu 20.04): Gentoo- Live
Apache or nginx version (eg, Apache 2.4.25): apache-2.4.57
PHP version (eg, 7.4): php-8.1.20

The issue you are facing:

Recently updated the apache server to support http2. Confirmation via web clients and curl that http2 is supported and in used. However, in reviewing the Apache logs, the client sync app seems to be sticking to 1.1. Is this expected behavior? There’s only a few references to http2 breaking in QT. Apache logs shows browser clients taking advantage of the http2 but desktop client is not.

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

The output of your Nextcloud log in Admin > Logging:


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


“system”: {
“instanceid”: “REMOVED SENSITIVE VALUE”,
“passwordsalt”: “REMOVED SENSITIVE VALUE”,
“secret”: “REMOVED SENSITIVE VALUE”,
“trusted_domains”: [
“cloud.dsotm.net”,
“www.dsotm.net”,
“repo.vcentcom.net”
],
“datadirectory”: “REMOVED SENSITIVE VALUE”,
“overwrite.cli.url”: “https://www.dsotm.net/cloud”,
“dbtype”: “mysql”,
“version”: “28.0.1.1”,
“dbname”: “REMOVED SENSITIVE VALUE”,
“dbhost”: “REMOVED SENSITIVE VALUE”,
“dbport”: “”,
“dbtableprefix”: “oc_”,
“dbuser”: “REMOVED SENSITIVE VALUE”,
“dbpassword”: “REMOVED SENSITIVE VALUE”,
“default_phone_region”: “US”,
“filelocking.enabled”: true,
“filesystem_check_changes”: 1,
“installed”: true,
“mail_from_address”: “REMOVED SENSITIVE VALUE”,
“mail_smtpmode”: “sendmail”,
“mail_smtpauthtype”: “LOGIN”,
“mail_domain”: “REMOVED SENSITIVE VALUE”,
“maintenance”: false,
“theme”: “”,
“log_type”: “file”,
“loglevel”: 0,
“logfile”: “/var/log/nextcloud/nextcloud.log”,
“mail_sendmailmode”: “pipe”,
“memcache.local”: “\OC\Memcache\APCu”,
“memcache.locking”: “\OC\Memcache\Redis”,
“appstore.experimental.enabled”: true,
“memcache.distributed”: “\OC\Memcache\Redis”,
“redis”: {
“host”: “REMOVED SENSITIVE VALUE”,
“port”: 0
},
“mysql.utf8mb4”: true,
“updater.release.channel”: “stable”,
“updater.secret”: “REMOVED SENSITIVE VALUE”,
“app_install_overwrite”: [
“richdocuments”
]
}
}

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

192.168.2.200 - - [28/Dec/2023:15:20:21 -0600] "PUT /cloud/ocs/v2.php/apps/user_status/api/v1/heartbeat?format=json HTTP/2.0" 200 150 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
98.240.144.223 - - [28/Dec/2023:15:20:22 -0600] "GET /ipset/abuseipdb.txt HTTP/1.1" 200 143963 "-" "-"
192.168.2.200 - rosander [28/Dec/2023:15:20:22 -0600] "PROPFIND /cloud/remote.php/dav/files/rosander/DCS/SavedGames HTTP/1.1" 207 252 "-" "Mozilla/5.0 (Windows) mirall/3.11.0stable-Win64 (build 20231211) (Nextcloud, windows-10.0.22631 ClientArchitecture: x86_64 OsArchitecture: x86_64)"
192.168.2.200 - rosander [28/Dec/2023:15:20:22 -0600] "PROPFIND /cloud/remote.php/dav/files/rosander/sync/Key HTTP/1.1" 207 248 "-" "Mozilla/5.0 (Windows) mirall/3.11.0stable-Win64 (build 20231211) (Nextcloud, windows-10.0.22631 ClientArchitecture: x86_64 OsArchitecture: x86_64)"
192.168.2.200 - rosander [28/Dec/2023:15:20:22 -0600] "PROPFIND /cloud/remote.php/dav/files/rosander/sync/Config HTTP/1.1" 207 248 "-" "Mozilla/5.0 (Windows) mirall/3.11.0stable-Win64 (build 20231211) (Nextcloud, windows-10.0.22631 ClientArchitecture: x86_64 OsArchitecture: x86_64)"
192.168.2.200 - rosander [28/Dec/2023:15:20:23 -0600] "PROPFIND /cloud/remote.php/dav/files/rosander/vcentcom HTTP/1.1" 207 245 "-" "Mozilla/5.0 (Windows) mirall/3.11.0stable-Win64 (build 20231211) (Nextcloud, windows-10.0.22631 ClientArchitecture: x86_64 OsArchitecture: x86_64)"
192.168.2.200 - rosander [28/Dec/2023:15:20:23 -0600] "PROPFIND /cloud/remote.php/dav/files/rosander/DCS/Doc_Sync HTTP/1.1" 207 250 "-" "Mozilla/5.0 (Windows) mirall/3.11.0stable-Win64 (build 20231211) (Nextcloud, windows-10.0.22631 ClientArchitecture: x86_64 OsArchitecture: x86_64)"
192.168.2.200 - - [28/Dec/2023:15:20:16 -0600] "GET /cloud/ocs/v2.php/apps/notifications/api/v2/notifications HTTP/2.0" 304 - "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
192.168.2.200 - - [28/Dec/2023:15:20:21 -0600] "GET /cloud/ocs/v2.php/apps/notifications/api/v2/notifications HTTP/2.0" 304 - "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
51.81.166.173 - vcentcom [28/Dec/2023:15:20:36 -0600] "PROPFIND /cloud/remote.php/dav/files/vcentcom/ HTTP/1.1" 207 249 "-" "Mozilla/5.0 (Windows) mirall/3.11.0stable-Win64 (build 20231211) (Nextcloud, windows-10.0.17763 ClientArchitecture: x86_64 OsArchitecture: x86_64)"
172.58.8.7 - - [28/Dec/2023:15:20:39 -0600] "GET / HTTP/1.1" 200 5047 "-" "Uptime-Kuma/1.23.10"


Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.

no errors to log 

PASTE HERE
1 Like

Yes, that is my current understanding. There’s an Issue somewhere tracking it.

Based on this ticket, the client supports it but it needs to be enabled by setting an environment variable:

Here you find details how to set individual variables:

https://docs.nextcloud.com/desktop/latest/installing.html#customizing-the-windows-installation

I just gave it a try on my Windows PC and it seems to work.

Tried adding the http2 to windows version 3.11.0 x64 for windows

msiexec /i Nextcloud-3.11.0-x64.msi OWNCLOUD_HTTP2_ENABLED=“1”

192.168.2.200 - rosander [29/Dec/2023:14:14:30 -0600] “GET /cloud/ocs/v2.php/apps/notifications/api/v2/notifications?format=json HTTP/1.1” 304 - “-” “Mozilla/5.0 (Windows) mirall/3.11.0stable-Win64 (build 20231211) (Nextcloud, windows-10.0.22631 ClientArchitecture: x86_64 OsArchitecture: x86_64)”
192.168.2.200 - rosander [29/Dec/2023:14:14:30 -0600] “PROPFIND /cloud/remote.php/dav/files/rosander/DCS/SavedGames HTTP/1.1” 207 252 “-” “Mozilla/5.0 (Windows) mirall/3.11.0stable-Win64 (build 20231211) (Nextcloud, windows-10.0.22631 ClientArchitecture: x86_64 OsArchitecture: x86_64)”
192.168.2.200 - rosander [29/Dec/2023:14:14:31 -0600] “PROPFIND /cloud/remote.php/dav/files/rosander/sync/Key HTTP/1.1” 207 248 “-” “Mozilla/5.0 (Windows) mirall/3.11.0stable-Win64 (build 20231211) (Nextcloud, windows-10.0.22631 ClientArchitecture: x86_64 OsArchitecture: x86_64)”
192.168.2.200 - rosander [29/Dec/2023:14:14:31 -0600] “PROPFIND /cloud/remote.php/dav/files/rosander/sync/Config HTTP/1.1” 207 247 “-” “Mozilla/5.0 (Windows) mirall/3.11.0stable-Win64 (build 20231211) (Nextcloud, windows-10.0.22631 ClientArchitecture: x86_64 OsArchitecture: x86_64)”
192.168.2.200 - rosander [29/Dec/2023:14:14:31 -0600] “PROPFIND /cloud/remote.php/dav/files/rosander/vcentcom HTTP/1.1” 207 245 “-” “Mozilla/5.0 (Windows) mirall/3.11.0stable-Win64 (build 20231211) (Nextcloud, windows-10.0.22631 ClientArchitecture: x86_64 OsArchitecture: x86_64)”
192.168.2.200 - rosander [29/Dec/2023:14:14:31 -0600] “PROPFIND /cloud/remote.php/dav/files/rosander/DCS/Doc_Sync HTTP/1.1” 207 250 “-” “Mozilla/5.0 (Windows) mirall/3.11.0stable-Win64 (build 20231211) (Nextcloud, windows-10.0.22631 ClientArchitecture: x86_64 OsArchitecture: x86_64)”
51.81.166.173 - vcentcom [29/Dec/2023:14:14:35 -0600] “PROPFIND /cloud/remote.php/dav/files/vcentcom/ HTTP/1.1” 207 239 “-” “Mozilla/5.0 (Windows) mirall/3.11.0stable-Win64 (build 20231211) (Nextcloud, windows-10.0.17763 ClientArchitecture: x86_64 OsArchitecture: x86_64)”
8.47.103.140 - vcentcom [29/Dec/2023:14:14:38 -0600] “PROPFIND /cloud/remote.php/dav/files/vcentcom/ HTTP/1.1” 207 239 “-” "Mozilla/5.0 (Windows) mirall/3.11.0stable-Win64 (build 20231211) (Nextcloud, windows-10.0.22621 ClientArchite

Still no http2 support from the client. All web browsers are connecting via http2

I believe the environment variable has to be provided to the client executable at runtime, not to the installer.

No, not that way.

Enabling HTTP/2 for Nextcloud Client on Windows 10 and 11

  1. Press Windows Start-Button

  2. Enter “env” into the search bar and hit Enter.

  3. In the System Properties window, click “Environment Variables…”:
    image

  4. Now create a new System Variable with

    • Variable name: OWNCLOUD_HTTP2_ENABLED
    • Variable value: 1
  5. Restart your Desktop Client

Much luck,
ernolf

2 Likes

Why is it disabled by default on windows?
http2 is recommended by NextCloud and should be activated in my opinion.
Is there a reason for it? :slight_smile:

Thanks!

Many people still use libapache2-mod-php → as described in the manual ← , which relies on the Apache2 Multi-Processing Module "mpm-prefork". For h2 Support "mpm-event" is needed, which is used by php-fpm.
As long as lots of servers still do not support h2 because the official installation example in the latest manual still uses "mpm-prefork", the client should not default to h2 as well.

This is the way how to set it:

… once the environment variable is set, it will allways be h2 (as long as the server supports it).


A much more important construction site would be to finally let the Android client speak h2, as I denounced in → this issue ← more than 5 years ago!

Much luck,
ernolf

2 Likes

ah okay, thanks you very much! :slight_smile:

Appreciate it thank you. I misunderstood the link that took us to the installer guide for passing variable to the .msi installer. Thanks for the clarity.

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