-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FIX #38801: Missing metadata for chunked upload #41149
FIX #38801: Missing metadata for chunked upload #41149
Conversation
This commit fixes the problem with missing metadata for chunked uploads. Signed-off-by: Christoph Fiehe <[email protected]>
@@ -144,7 +144,7 @@ public function afterMkcol(RequestInterface $request, ResponseInterface $respons | |||
|
|||
public function beforePut(RequestInterface $request, ResponseInterface $response): bool { | |||
try { | |||
$this->prepareUpload(dirname($request->getPath())); | |||
$this->prepareUpload(basename(dirname($request->getPath()))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this would break getting the actual upload folder in prepareUpload. I also cannot see this bug happening on my s3 test setup.
The directory name is already being used within the prepareUpload method https://github.com/cfiehe/server/blob/fix_missing_metadata_for_chunked_upload/apps/dav/lib/Upload/ChunkingV2Plugin.php#L314C51-L314C51
Just a question for checking an idea: Do you have either redis or apcu setup for caching? Can you maybe share your occ config:list
output?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My guess is that you don't have a proper cache and therefore getting the metadata fails. With your patch getting the upload folder fails but the NotFound exception is catched and returning early which leads to the regular chunking plugin to be taken as the fallback.
server/apps/dav/lib/Upload/ChunkingV2Plugin.php
Lines 149 to 150 in 2124fb9
} catch (StorageInvalidException|BadRequest|NotFound $e) { | |
return true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The strange is, that the problem arises when you have multiple Nextcloud servers. We have an active-active loadbalanced cluster which consists of three Nextcloud servers. When you have only one server, the upload succeeds, but in a multi-node setup it fails.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is our configuration. We use a small NFS share, where the Nextcloud sources are stored, so the three servers share the same configuration. Is there any issue here?
{
"system": {
"instanceid": "***REMOVED SENSITIVE VALUE***",
"passwordsalt": "***REMOVED SENSITIVE VALUE***",
"secret": "***REMOVED SENSITIVE VALUE***",
"trusted_domains": [
"nextcloud.example.com",
"nextcloud.lx.example.com"
],
"trusted_proxies": "***REMOVED SENSITIVE VALUE***",
"proxy": "proxy.example.com:8080",
"proxyexclude": [
"127.0.0.0\/8",
"localhost",
".example.com"
],
"objectstore": {
"class": "\\OC\\Files\\ObjectStore\\S3",
"arguments": {
"bucket": "nextcloud",
"uploadPartSize": 67108864,
"autocreate": false,
"key": "***REMOVED SENSITIVE VALUE***",
"secret": "***REMOVED SENSITIVE VALUE***",
"hostname": "s3.example.com",
"port": 443,
"use_ssl": true,
"use_path_style": true,
"proxy": false
}
},
"datadirectory": "***REMOVED SENSITIVE VALUE***",
"dbtype": "pgsql",
"version": "27.1.2.1",
"overwrite.cli.url": "https:\/\/nextcloud.example.com",
"dbname": "***REMOVED SENSITIVE VALUE***",
"dbhost": "***REMOVED SENSITIVE VALUE***",
"dbport": "",
"dbtableprefix": "oc_",
"dbuser": "***REMOVED SENSITIVE VALUE***",
"dbpassword": "***REMOVED SENSITIVE VALUE***",
"installed": true,
"mail_smtpmode": "sendmail",
"mail_sendmailmode": "smtp",
"mail_from_address": "***REMOVED SENSITIVE VALUE***",
"mail_domain": "***REMOVED SENSITIVE VALUE***",
"default_locale": "de_DE",
"default_phone_region": "DE",
"filelocking.enabled": true,
"htaccess.RewriteBase": "\/",
"memcache.disributed": "\\OC\\Memcache\\Redis",
"memcache.locking": "\\OC\\Memcache\\Redis",
"memcache.local": "\\OC\\Memcache\\APCu",
"redis": {
"host": "***REMOVED SENSITIVE VALUE***",
"port": 6379,
"user": "nextcloud",
"password": "***REMOVED SENSITIVE VALUE***"
},
"theme": "",
"loglevel": 0,
"maintenance": false,
"ldapProviderFactory": "\\OCA\\User_LDAP\\LDAPProviderFactory",
"updater.release.channel": "stable"
},
"apps": {
"activity": {
"types": "filesystem",
"enabled": "yes",
"installed_version": "2.19.0"
},
"backgroundjob": {
"lastjob": "346717"
},
"bruteForce": {
"whitelist_2": "10.1.1.202\/32",
"whitelist_1": "10.1.1.200\/32"
},
"bruteforcesettings": {
"types": "",
"enabled": "yes",
"installed_version": "2.7.0"
},
"circles": {
"types": "filesystem,dav",
"enabled": "yes",
"installed_version": "27.0.1",
"loopback_tmp_scheme": "https",
"migration_22": "1",
"migration_22_1": "1",
"migration_run": "0",
"maintenance_run": "0",
"maintenance_update": "{\"maximum\":3,\"3\":1698396302,\"2\":1698398402,\"1\":1698398701,\"4\":1666838103,\"5\":1666408925}"
},
"cloud_federation_api": {
"types": "filesystem",
"enabled": "yes",
"installed_version": "1.10.0"
},
"comments": {
"types": "logging",
"enabled": "yes",
"installed_version": "1.17.0"
},
"contactsinteraction": {
"types": "dav",
"enabled": "yes",
"installed_version": "1.8.0"
},
"core": {
"backgroundjobs_mode": "cron",
"installedat": "1629186973.22",
"vendor": "nextcloud",
"public_webdav": "dav\/appinfo\/v1\/publicwebdav.php",
"public_files": "files_sharing\/public.php",
"shareapi_only_share_with_group_members": "no",
"updater.secret.created": "1666875910",
"shareapi_enforce_links_password": "no",
"theming.variables": "833a39647669006958b2f544cc19f57b",
"moveavatarsdone": "yes",
"previewsCleanedUp": "1",
"lastupdatedat": "1698347544",
"oc.integritycheck.checker": "[]",
"lastupdateResult": "{\"version\":\"27.1.3.2\",\"versionstring\":\"Nextcloud 27.1.3\",\"url\":\"https:\\\/\\\/download.nextcloud.com\\\/server\\\/releases\\\/nextcloud-27.1.3.zip\",\"web\":\"https:\\\/\\\/docs.nextcloud.com\\\/server\\\/27\\\/admin_manual\\\/maintenance\\\/upgrade.html\",\"changes\":\"https:\\\/\\\/updates.nextcloud.com\\\/changelog_server\\\/?version=27.1.3\",\"autoupdater\":\"1\",\"eol\":\"0\"}",
"lastcron": "1698398701"
},
"dashboard": {
"types": "",
"enabled": "yes",
"installed_version": "7.7.0"
},
"dav": {
"types": "filesystem",
"enabled": "yes",
"installed_version": "1.27.0",
"regeneratedBirthdayCalendarsForYearFix": "yes",
"buildCalendarSearchIndex": "yes",
"buildCalendarReminderIndex": "yes",
"sendEventReminders": "no",
"generateBirthdayCalendar": "no",
"chunks_migrated": "1",
"needs_system_address_book_sync": "no"
},
"duplicatefinder": {
"types": "",
"enabled": "no",
"installed_version": "0.0.15"
},
"federatedfilesharing": {
"types": "",
"enabled": "yes",
"installed_version": "1.17.0"
},
"federation": {
"types": "authentication",
"enabled": "yes",
"installed_version": "1.17.0"
},
"files": {
"types": "filesystem",
"enabled": "yes",
"installed_version": "1.22.0",
"default_quota": "0 B"
},
"files_antivirus": {
"av_mode": "daemon",
"av_socket": "\/var\/run\/clamav\/clamd.ctl",
"av_cmd_options": "",
"av_stream_max_length": "26214400",
"av_max_file_size": "-1",
"av_scan_first_bytes": "-1",
"av_icap_mode": "reqmod",
"av_icap_request_service": "avscan",
"av_icap_response_header": "X-Infection-Found",
"av_port": "3310",
"av_infected_action": "delete",
"av_host": "clamav.example.com",
"av_path": "\/usr\/bin\/clamscan",
"enabled": "yes",
"installed_version": "5.2.2",
"types": "filesystem,dav"
},
"files_pdfviewer": {
"types": "",
"enabled": "yes",
"installed_version": "2.8.0"
},
"files_reminders": {
"installed_version": "1.0.0",
"types": "",
"enabled": "yes"
},
"files_retention": {
"installed_version": "1.16.0",
"types": "",
"enabled": "yes",
"notify_before": "yes"
},
"files_rightclick": {
"types": "",
"enabled": "yes",
"installed_version": "1.6.0"
},
"files_sharing": {
"types": "filesystem",
"enabled": "yes",
"installed_version": "1.19.0",
"incoming_server2server_share_enabled": "no",
"lookupServerUploadEnabled": "no",
"outgoing_server2server_share_enabled": "no",
"lookupServerEnabled": "no"
},
"files_trashbin": {
"types": "filesystem,dav",
"enabled": "yes",
"installed_version": "1.17.0"
},
"files_versions": {
"types": "filesystem,dav",
"enabled": "yes",
"installed_version": "1.20.0"
},
"firstrunwizard": {
"types": "logging",
"enabled": "yes",
"installed_version": "2.16.0"
},
"impersonate": {
"types": "",
"enabled": "yes",
"installed_version": "1.14.0"
},
"logreader": {
"enabled": "yes",
"types": "logging",
"installed_version": "2.12.0"
},
"lookup_server_connector": {
"types": "authentication",
"enabled": "yes",
"installed_version": "1.15.0"
},
"nextcloud_announcements": {
"types": "logging",
"enabled": "yes",
"pub_date": "Thu, 24 Oct 2019 00:00:00 +0200",
"installed_version": "1.16.0"
},
"notifications": {
"types": "logging",
"enabled": "yes",
"installed_version": "2.15.0"
},
"oauth2": {
"types": "authentication",
"enabled": "yes",
"installed_version": "1.15.1"
},
"password_policy": {
"types": "authentication",
"enabled": "yes",
"minLength": "5",
"installed_version": "1.17.0"
},
"photos": {
"enabled": "yes",
"types": "dav,authentication",
"installed_version": "2.3.0",
"lastPlaceMappedUser": "uoberdorf-local",
"lastPlaceMappingDone": "true"
},
"privacy": {
"types": "",
"enabled": "yes",
"installed_version": "1.11.0",
"readableLocation": "de"
},
"provisioning_api": {
"types": "prevent_group_restriction",
"enabled": "yes",
"installed_version": "1.17.0"
},
"recommendations": {
"types": "",
"enabled": "yes",
"installed_version": "1.6.0"
},
"related_resources": {
"types": "",
"enabled": "yes",
"installed_version": "1.2.0"
},
"richdocuments": {
"types": "prevent_group_restriction",
"disable_certificate_verification": "yes",
"installed_version": "7.0.1",
"wopi_url": "https:\/\/nextcloud.example.com\/apps\/richdocumentscode\/proxy.php?req=",
"enabled": "no"
},
"richdocumentscode": {
"enabled": "no",
"types": "",
"installed_version": "22.5.702"
},
"serverinfo": {
"types": "",
"enabled": "yes",
"installed_version": "1.17.0",
"cached_count_filecache": "42577",
"cached_count_storages": "679"
},
"settings": {
"types": "",
"enabled": "yes",
"installed_version": "1.9.0"
},
"sharebymail": {
"types": "filesystem",
"enabled": "yes",
"installed_version": "1.17.0"
},
"spreed": {
"project_access_invalidated": "1",
"types": "dav,prevent_group_restriction",
"enabled": "no",
"installed_version": "13.0.8"
},
"support": {
"types": "session",
"enabled": "yes",
"installed_version": "1.10.0",
"SwitchUpdaterServerHasRun": "yes"
},
"survey_client": {
"types": "",
"enabled": "yes",
"installed_version": "1.15.0",
"last_sent": "1650447006",
"last_report": "{\"id\":\"oc0txjcyl1de\",\"items\":[[\"server\",\"version\",\"22.2.3.0\"],[\"server\",\"code\",\"other\"],[\"server\",\"enable_avatars\",\"yes\"],[\"server\",\"enable_previews\",\"yes\"],[\"server\",\"memcache.local\",\"\\\\OC\\\\Memcache\\\\APCu\"],[\"server\",\"memcache.distributed\",\"none\"],[\"server\",\"asset-pipeline.enabled\",\"no\"],[\"server\",\"filelocking.enabled\",\"yes\"],[\"server\",\"memcache.locking\",\"none\"],[\"server\",\"debug\",\"no\"],[\"server\",\"cron\",\"webcron\"],[\"php\",\"version\",\"8.0.13\"],[\"php\",\"memory_limit\",536870912],[\"php\",\"max_execution_time\",3600],[\"php\",\"upload_max_filesize\",2097152],[\"database\",\"type\",\"pgsql\"],[\"database\",\"version\",\"PostgreSQL 13.5 (Ubuntu 13.5-2.pgdg20.04+1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0, 64-bit\"],[\"database\",\"size\",269292079],[\"apps\",\"notifications\",\"2.10.1\"],[\"apps\",\"text\",\"3.3.0\"],[\"apps\",\"logreader\",\"2.7.0\"],[\"apps\",\"survey_client\",\"1.10.0\"],[\"apps\",\"weather_status\",\"disabled\"],[\"apps\",\"password_policy\",\"1.12.0\"],[\"apps\",\"files_rightclick\",\"1.1.0\"],[\"apps\",\"support\",\"1.5.0\"],[\"apps\",\"serverinfo\",\"1.12.0\"],[\"apps\",\"privacy\",\"1.6.0\"],[\"apps\",\"nextcloud_announcements\",\"1.11.0\"],[\"apps\",\"viewer\",\"1.6.0\"],[\"apps\",\"photos\",\"1.4.0\"],[\"apps\",\"firstrunwizard\",\"2.11.0\"],[\"apps\",\"activity\",\"2.15.0\"],[\"apps\",\"recommendations\",\"1.1.0\"],[\"apps\",\"files_videoplayer\",\"1.11.0\"],[\"apps\",\"oauth2\",\"1.10.0\"],[\"apps\",\"files\",\"1.17.0\"],[\"apps\",\"circles\",\"22.1.1\"],[\"apps\",\"cloud_federation_api\",\"1.5.0\"],[\"apps\",\"dav\",\"1.19.0\"],[\"apps\",\"files_sharing\",\"1.14.0\"],[\"apps\",\"files_trashbin\",\"1.12.0\"],[\"apps\",\"files_versions\",\"1.15.0\"],[\"apps\",\"sharebymail\",\"1.12.0\"],[\"apps\",\"workflowengine\",\"2.4.0\"],[\"apps\",\"comments\",\"1.12.0\"],[\"apps\",\"systemtags\",\"1.12.0\"],[\"apps\",\"theming\",\"1.13.0\"],[\"apps\",\"accessibility\",\"1.8.0\"],[\"apps\",\"contactsinteraction\",\"1.3.0\"],[\"apps\",\"dashboard\",\"7.2.0\"],[\"apps\",\"federatedfilesharing\",\"1.12.0\"],[\"apps\",\"files_pdfviewer\",\"2.3.1\"],[\"apps\",\"provisioning_api\",\"1.12.0\"],[\"apps\",\"settings\",\"1.4.0\"],[\"apps\",\"updatenotification\",\"1.12.0\"],[\"apps\",\"user_status\",\"1.2.0\"],[\"apps\",\"federation\",\"1.12.0\"],[\"apps\",\"lookup_server_connector\",\"1.10.0\"],[\"apps\",\"user_ldap\",\"1.12.1\"],[\"apps\",\"twofactor_backupcodes\",\"1.11.0\"],[\"apps\",\"duplicatefinder\",\"0.0.13\"],[\"apps\",\"impersonate\",\"1.9.0\"],[\"apps\",\"spreed\",\"disabled\"],[\"apps\",\"richdocuments\",\"4.2.3\"],[\"apps\",\"richdocumentscode\",\"21.11.4\"],[\"stats\",\"num_files\",35022],[\"stats\",\"num_users\",19],[\"stats\",\"num_storages\",528],[\"stats\",\"num_storages_local\",2],[\"stats\",\"num_storages_home\",526],[\"stats\",\"num_storages_other\",0],[\"stats\",\"num_comments\",32],[\"stats\",\"num_comment_markers\",2],[\"stats\",\"num_systemtags\",73],[\"stats\",\"num_systemtags_mappings\",452],[\"files_sharing\",\"num_shares\",257],[\"files_sharing\",\"num_shares_user\",19],[\"files_sharing\",\"num_shares_groups\",4],[\"files_sharing\",\"num_shares_link\",216],[\"files_sharing\",\"num_shares_link_no_password\",216],[\"files_sharing\",\"num_fed_shares_sent\",0],[\"files_sharing\",\"num_fed_shares_received\",0],[\"files_sharing\",\"permissions_3_4\",2],[\"files_sharing\",\"permissions_0_19\",2],[\"files_sharing\",\"permissions_1_31\",4],[\"files_sharing\",\"permissions_3_1\",210],[\"files_sharing\",\"permissions_3_15\",4],[\"files_sharing\",\"permissions_0_31\",14],[\"files_sharing\",\"permissions_2_31\",18],[\"files_sharing\",\"permissions_0_23\",3],[\"encryption\",\"enabled\",\"no\"],[\"encryption\",\"default_module\",\"no\"]]}"
},
"systemtags": {
"types": "logging",
"enabled": "yes",
"installed_version": "1.17.0"
},
"text": {
"types": "dav",
"enabled": "yes",
"installed_version": "3.8.0"
},
"theming": {
"faviconMime": "image\/vnd.microsoft.icon",
"disable-user-theming": "yes",
"types": "logging",
"enabled": "yes",
"installed_version": "2.2.0",
"name": "eurodata AG",
"url": "***REMOVED SENSITIVE VALUE***",
"slogan": "***REMOVED SENSITIVE VALUE***",
"logoheaderMime": "image\/svg+xml",
"color": "#00637A",
"cachebuster": "43",
"imprintUrl": "***REMOVED SENSITIVE VALUE***",
"privacyUrl": "***REMOVED SENSITIVE VALUE***",
"logoMime": "image\/svg+xml",
"backgroundMime": "backgroundColor"
},
"twofactor_backupcodes": {
"types": "",
"enabled": "yes",
"installed_version": "1.16.0"
},
"updatenotification": {
"related_resources": "1.0.4",
"types": "",
"enabled": "yes",
"richdocumentscode": "22.5.802",
"core": "27.1.3.2",
"update_check_errors": "0",
"richdocuments": "7.0.2",
"duplicatefinder": "0.0.15",
"installed_version": "1.17.0"
},
"user_ldap": {
"s02ldap_backup_host": "",
"s02ldap_port": "636",
"s02ldap_dn": "CN=svc-loc,OU=LOC,OU=Infrastruktur,DC=edsbrv,DC=eurodata,DC=de",
"s02ldap_groupfilter_objectclass": "group",
"s02ldap_base": "DC=edsbrv,DC=eurodata,DC=de",
"types": "authentication",
"enabled": "yes",
"s02ldap_backup_port": "",
"s02ldap_background_host": "",
"s02ldap_background_port": "",
"s01ldap_userlist_filter": "(&(|(objectclass=organizationalPerson)(objectclass=person)(objectclass=user))(|(|(memberof=CN=edsb-Nextcloud-Users,OU=Nextcloud,OU=Gruppen,DC=edsb,DC=eurodata,DC=de)(primaryGroupID=10510))))",
"s02ldap_override_main_server": "",
"s01ldap_login_filter": "(&(&(|(objectclass=organizationalPerson)(objectclass=person)(objectclass=user))(|(|(memberof=CN=edsb-Nextcloud-Users,OU=Nextcloud,OU=Gruppen,DC=edsb,DC=eurodata,DC=de)(primaryGroupID=10510))))(|(samaccountname=%uid)(|(mailPrimaryAddress=%uid)(mail=%uid))(|(sAMAccountName=%uid)(userPrincipalName=%uid))))",
"cleanUpJobOffset": "800",
"background_sync_offset": "0",
"s02ldap_user_filter_mode": "0",
"installed_version": "1.17.0",
"s02ldap_login_filter_mode": "0",
"s02ldap_loginfilter_username": "1",
"s02ldap_group_filter_mode": "0",
"s02ldap_groupfilter_groups": "",
"s02ldap_gid_number": "gidNumber",
"s02ldap_user_display_name_2": "",
"s02ldap_display_name": "displayname",
"s02ldap_userfilter_groups": "edsbrv-Nextcloud-Users",
"s02ldap_loginfilter_email": "1",
"s02ldap_loginfilter_attributes": "sAMAccountName\nuserPrincipalName",
"s02ldap_base_users": "DC=edsbrv,DC=eurodata,DC=de",
"background_sync_interval": "22641",
"s02ldap_group_filter": "(&(|(objectclass=group)))",
"s01ldap_host": "ldaps:\/\/wdc.edsb.example.com",
"s01ldap_dn": "CN=svc-loc,OU=Dienstkonten,OU=AABenutzer,OU=eurodatasb,DC=edsb,DC=eurodata,DC=de",
"s01ldap_port": "636",
"s01ldap_agent_password": "***REMOVED SENSITIVE VALUE***",
"s01ldap_base_users": "DC=edsb,DC=eurodata,DC=de",
"s01ldap_base": "DC=edsb,DC=eurodata,DC=de",
"s01ldap_email_attr": "mail",
"s01has_memberof_filter_support": "1",
"s01ldap_loginfilter_email": "1",
"s01ldap_userfilter_groups": "edsb-Nextcloud-Users",
"s01ldap_groupfilter_objectclass": "group",
"s01ldap_loginfilter_attributes": "sAMAccountName\nuserPrincipalName",
"s01ldap_configuration_active": "1",
"s01ldap_userfilter_objectclass": "organizationalPerson\nperson\nuser",
"s01ldap_display_name": "displayname",
"s01ldap_group_filter": "(&(|(objectclass=group)))",
"s01ldap_base_groups": "OU=Nextcloud,OU=Gruppen,DC=edsb,DC=eurodata,DC=de",
"s01ldap_group_member_assoc_attribute": "member",
"s01_lastChange": "1697815561",
"s01ldap_backup_host": "",
"s01ldap_backup_port": "",
"s01ldap_background_host": "",
"s01ldap_background_port": "",
"s01ldap_override_main_server": "",
"s01ldap_user_filter_mode": "0",
"s01ldap_login_filter_mode": "0",
"s01ldap_loginfilter_username": "1",
"s01ldap_group_filter_mode": "0",
"s01ldap_groupfilter_groups": "",
"s01ldap_gid_number": "gidNumber",
"s01ldap_user_display_name_2": "",
"s01ldap_group_display_name": "cn",
"s01ldap_tls": "0",
"s01ldap_quota_def": "",
"s01ldap_quota_attr": "",
"s01ldap_cache_ttl": "600",
"s01home_folder_naming_rule": "",
"s01ldap_turn_off_cert_check": "0",
"s01ldap_attributes_for_user_search": "",
"s01ldap_attributes_for_group_search": "",
"s01ldap_expert_username_attr": "",
"s01ldap_expert_uuid_user_attr": "",
"s01ldap_expert_uuid_group_attr": "",
"s01use_memberof_to_detect_membership": "1",
"s01last_jpegPhoto_lookup": "0",
"s01ldap_nested_groups": "0",
"s01ldap_paging_size": "500",
"s01ldap_turn_on_pwd_change": "0",
"s01ldap_experienced_admin": "0",
"s01ldap_dynamic_group_member_url": "",
"s01ldap_default_ppolicy_dn": "",
"s01ldap_user_avatar_rule": "default",
"s01ldap_ext_storage_home_attribute": "",
"s01ldap_matching_rule_in_chain_state": "unknown",
"s01ldap_connection_timeout": "15",
"s01ldap_attr_phone": "",
"s01ldap_attr_website": "",
"s01ldap_attr_address": "",
"s01ldap_attr_twitter": "",
"s01ldap_attr_fediverse": "",
"s01ldap_attr_organisation": "",
"s01ldap_attr_role": "",
"s01ldap_attr_headline": "",
"s01ldap_attr_biography": "",
"s02ldap_host": "ldaps:\/\/desbdc.edsbrv.example.com",
"s02ldap_agent_password": "***REMOVED SENSITIVE VALUE***",
"s02has_memberof_filter_support": "1",
"s02ldap_configuration_active": "1",
"s02ldap_userfilter_objectclass": "organizationalPerson\nperson\nuser",
"background_sync_prefix": "s01",
"s02ldap_userlist_filter": "(&(|(objectclass=organizationalPerson)(objectclass=person)(objectclass=user))(|(|(memberof=CN=edsbrv-Nextcloud-Users,OU=eurodata,OU=Nextcloud,OU=LOC,OU=Infrastruktur,DC=edsbrv,DC=eurodata,DC=de)(primaryGroupID=1389))))",
"s02ldap_email_attr": "mail",
"s02ldap_login_filter": "(&(&(|(objectclass=organizationalPerson)(objectclass=person)(objectclass=user))(|(|(memberof=CN=edsbrv-Nextcloud-Users,OU=eurodata,OU=Nextcloud,OU=LOC,OU=Infrastruktur,DC=edsbrv,DC=eurodata,DC=de)(primaryGroupID=1389))))(|(samaccountname=%uid)(|(mailPrimaryAddress=%uid)(mail=%uid))(|(sAMAccountName=%uid)(userPrincipalName=%uid))))",
"s02ldap_base_groups": "OU=eurodata,OU=Nextcloud,OU=LOC,OU=Infrastruktur,DC=edsbrv,DC=eurodata,DC=de",
"s02ldap_group_member_assoc_attribute": "member",
"s02_lastChange": "1697990469",
"s02ldap_group_display_name": "cn",
"s02ldap_tls": "0",
"s02ldap_quota_def": "",
"s02ldap_quota_attr": "",
"s02ldap_cache_ttl": "600",
"s02home_folder_naming_rule": "",
"s02ldap_turn_off_cert_check": "0",
"s02ldap_attributes_for_user_search": "",
"s02ldap_attributes_for_group_search": "",
"s02ldap_expert_username_attr": "",
"s02ldap_expert_uuid_user_attr": "",
"s02ldap_expert_uuid_group_attr": "",
"s02use_memberof_to_detect_membership": "1",
"s02last_jpegPhoto_lookup": "0",
"s02ldap_nested_groups": "0",
"s02ldap_paging_size": "500",
"s02ldap_turn_on_pwd_change": "0",
"s02ldap_experienced_admin": "0",
"s02ldap_dynamic_group_member_url": "",
"s02ldap_default_ppolicy_dn": "",
"s02ldap_user_avatar_rule": "default",
"s02ldap_ext_storage_home_attribute": "",
"s02ldap_matching_rule_in_chain_state": "unknown",
"s02ldap_connection_timeout": "15",
"s02ldap_attr_phone": "",
"s02ldap_attr_website": "",
"s02ldap_attr_address": "",
"s02ldap_attr_twitter": "",
"s02ldap_attr_fediverse": "",
"s02ldap_attr_organisation": "",
"s02ldap_attr_role": "",
"s02ldap_attr_headline": "",
"s02ldap_attr_biography": ""
},
"user_status": {
"types": "",
"enabled": "yes",
"installed_version": "1.7.0"
},
"viewer": {
"types": "",
"enabled": "yes",
"installed_version": "2.1.0"
},
"weather_status": {
"installed_version": "1.1.0",
"types": "",
"enabled": "no"
},
"workflowengine": {
"types": "filesystem",
"enabled": "yes",
"installed_version": "2.9.0"
}
}
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the redis server shared between both instances?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we are using a virtual IP in order to access the Redis Sentinel Cluster. This IP always points to the primary node. The Redis cluster runs on three dedicated virtual machines.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have found the problem. It was a typo in the configuration file 🙈. I wrote memcache.disributed
instead of memcache.distributed
. Everything is working now and large files are being uploaded without any issue.
@juliushaertl Thanks a lot for the caching hint and my sincerest apology for generating efforts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No worries I think this still needs a proper fix to not fail if no distributed cache is available, I can check that next week.
The issue was solved and caused by a typo in the Nextcloud configuration file. |
Summary
This commit fixes the problem with missing metadata for chunked uploads, reported in #38801.
The problem is caused because the directory name e.g.
web-file-upload-2802b0e2a4ef8eeea70f258257d03b7-1698172388825
is used as key for the cache entry that contains the upload id, the upload target path and the upload target id. Refer to:server/apps/dav/lib/Upload/ChunkingV2Plugin.php
Lines 135 to 139 in ee1480c
In later calls, when the cache entry should be retrieved a relative path like
uploads/c.fiehe-local/web-file-upload-82802b0e2a4ef8eeea70f258257d03b7-1698172388825
gets used as key. Refer to:server/apps/dav/lib/Upload/ChunkingV2Plugin.php
Line 147 in ee1480c
This retrieval results in a cache miss, that causes the upload to fail with files larger than the configured upload chunk size (defaults to 10 MB). When the log level was set to debug, the log contains the error message
Missing metadata for chunked upload
.Checklist