Skip to content
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

[Bug]: External SMB share display cache instead of real files, unusable #45238

Open
5 of 8 tasks
huntervcx opened this issue May 8, 2024 · 1 comment
Open
5 of 8 tasks
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap 29-feedback bug feature: external storage

Comments

@huntervcx
Copy link

⚠️ This issue respects the following points: ⚠️

Bug description

Nextcloud Server with multiple windows smb shares.
Some folders use nextcloud cache to display folders and files, even files that have been deleted and new ones not displayed on nextcloud
No update possible, multiple commands used without effect
Share is used with cached credentials saved in database, so notify is not possible and scan can't be done from cli

~600 shares configured, randomly breaking some. But some folders don't, and continue to work properly
Login/logout, disabling redis cache, restarting, cleanup files, trying to upload and delete from NC donesn't retrigger a cache refresh

Not a permissions problem, this is random, and even with full permissions and admins accounts, still displaying cache folders list

Steps to reproduce

  1. Add an external file smb share
  2. Work on some files directly on the smb share
  3. Wait for nextcloud to Randomly stop reading from backend but only from cache

Expected behavior

Displaying correct folders and files, cleaning up the database filecache

Installation method

Community Manual installation with Archive

Nextcloud Server version

29

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.2

Web server

Apache (supported)

Database engine version

MariaDB

Is this bug present after an update or on a fresh install?

Upgraded to a MAJOR version (ex. 22 to 23)

Are you using the Nextcloud Server Encryption module?

None

What user-backends are you using?

  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other

Configuration report

{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "***REMOVED SENSITIVE VALUE***",
        ],
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "29.0.0.19",
        "overwrite.cli.url": "***REMOVED SENSITIVE VALUE***",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "htaccess.RewriteBase": "\/",
        "ldapProviderFactory": "OCA\\User_LDAP\\LDAPProviderFactory",
        "mail_smtpmode": "smtp",
        "mail_smtpauth": 1,
        "mail_sendmailmode": "smtp",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauthtype": "LOGIN",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "465",
        "skeletondirectory": "",
        "templatedirectory": "",
        "mail_smtpsecure": "ssl",
        "default_phone_region": "fr_FR",
        "default_language": "fr",
        "default_locale": "fr_FR",
        "trashbin_retention_obligation": "15,90",
        "knowledgebaseenabled": false,
        "maintenance": false,
        "enable_previews": true,
        "memcache.local": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "filelocking.enabled": "true",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 0,
            "timeout": 0
        },
        "loglevel": 2,
        "maintenance_window_start": 2,
        "activity_use_cached_mountpoints": true,
        "log_type": "file",
        "logfile": "***REMOVED SENSITIVE VALUE***",
        "logdateformat": "F d, Y H:i:s"
    }
}

List of activated Apps

Enabled:
  - activity: 2.21.1
  - admin_audit: 1.19.0
  - bruteforcesettings: 2.9.0
  - cloud_federation_api: 1.12.0
  - contactsinteraction: 1.10.0
  - dav: 1.30.1
  - external: 5.4.0
  - federatedfilesharing: 1.19.0
  - files: 2.1.0
  - files_accesscontrol: 1.19.0
  - files_antivirus: 5.5.0
  - files_downloadlimit: 2.0.0
  - files_external: 1.21.0
  - files_pdfviewer: 2.10.0
  - files_reminders: 1.2.0
  - files_sharing: 1.21.0
  - files_trashbin: 1.19.0
  - files_versions: 1.22.0
  - logreader: 2.14.0
  - lookup_server_connector: 1.17.0
  - notifications: 2.17.0
  - oauth2: 1.17.0
  - password_policy: 1.19.0
  - previewgenerator: 5.5.0
  - privacy: 1.13.0
  - provisioning_api: 1.19.0
  - recommendations: 2.1.0
  - serverinfo: 1.19.0
  - settings: 1.12.0
  - sharebymail: 1.19.0
  - theming: 2.4.0
  - twofactor_backupcodes: 1.18.0
  - twofactor_totp: 11.0.0-dev
  - updatenotification: 1.19.1
  - user_ldap: 1.20.0
  - viewer: 2.3.0
  - workflowengine: 2.11.0
Disabled:
  - circles: 29.0.0-dev (installed 25.0.0)
  - comments: 1.19.0 (installed 1.15.0)
  - dashboard: 7.9.0 (installed 7.5.0)
  - encryption: 2.17.0
  - federation: 1.19.0 (installed 1.15.0)
  - firstrunwizard: 2.18.0 (installed 2.14.0)
  - groupfolders: 16.0.4 (installed 16.0.4)
  - nextcloud_announcements: 1.18.0 (installed 1.14.0)
  - photos: 2.5.0 (installed 2.0.1)
  - related_resources: 1.4.0 (installed 1.3.0)
  - support: 1.12.0 (installed 1.8.0)
  - survey_client: 1.17.0 (installed 1.13.0)
  - suspicious_login: 7.0.0 (installed 6.0.0)
  - systemtags: 1.19.0 (installed 1.15.0)
  - text: 3.10.0 (installed 3.6.0)
  - user_status: 1.9.0 (installed 1.5.0)
  - weather_status: 1.9.0 (installed 1.5.0)

Nextcloud Signing status

No errors have been found.

Nextcloud Logs

{"reqId":"RSkVLYiLK9PdDLAEBcNR","level":3,"time":"May 08, 2024 22:53:04","remoteAddr":"1.2.3.4","user":"myadmin","app":"no app in context","method":"GET","url":"/ocs/v2.php/apps/dashboard/api/v1/widgets","message":"Class \"OCA\\Dashboard\\Controller\\DashboardController\" does not exist","userAgent":"Mozilla/5.0 (iOS) Nextcloud-iOS/5.2.7","version":"29.0.0.19","exception":{"Exception":"ReflectionException","Message":"Class \"OCA\\Dashboard\\Controller\\DashboardController\" does not exist","Code":-1,"Trace":[{"file":"/mnt/data/nextcloud/lib/private/Route/Router.php","line":469,"function":"__construct","class":"ReflectionClass","type":"->"},{"file":"/mnt/data/nextcloud/lib/private/Route/Router.php","line":161,"function":"getAttributeRoutes","class":"OC\\Route\\Router","type":"->"},{"file":"/mnt/data/nextcloud/lib/private/Route/Router.php","line":286,"function":"loadRoutes","class":"OC\\Route\\Router","type":"->"},{"file":"/mnt/data/nextcloud/lib/private/Route/Router.php","line":330,"function":"findMatchingRoute","class":"OC\\Route\\Router","type":"->"},{"file":"/mnt/data/nextcloud/ocs/v1.php","line":66,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/mnt/data/nextcloud/ocs/v2.php","line":23,"args":["/mnt/data/nextcloud/ocs/v1.php"],"function":"require_once"}],"File":"/mnt/data/nextcloud/lib/private/Route/Router.php","Line":469,"message":"Class \"OCA\\Dashboard\\Controller\\DashboardController\" does not exist","exception":{},"CustomMessage":"Class \"OCA\\Dashboard\\Controller\\DashboardController\" does not exist"}}
{"reqId":"KbKqdSTSi7euiSG1IbVQ","level":3,"time":"May 08, 2024 22:53:04","remoteAddr":"1.2.3.4","user":"myadmin","app":"no app in context","method":"GET","url":"/ocs/v2.php/apps/user_status/api/v1/user_status","message":"Class \"OCA\\UserStatus\\Controller\\UserStatusController\" does not exist","userAgent":"Mozilla/5.0 (iOS) Nextcloud-iOS/5.2.7","version":"29.0.0.19","exception":{"Exception":"ReflectionException","Message":"Class \"OCA\\UserStatus\\Controller\\UserStatusController\" does not exist","Code":-1,"Trace":[{"file":"/mnt/data/nextcloud/lib/private/Route/Router.php","line":469,"function":"__construct","class":"ReflectionClass","type":"->"},{"file":"/mnt/data/nextcloud/lib/private/Route/Router.php","line":161,"function":"getAttributeRoutes","class":"OC\\Route\\Router","type":"->"},{"file":"/mnt/data/nextcloud/lib/private/Route/Router.php","line":286,"function":"loadRoutes","class":"OC\\Route\\Router","type":"->"},{"file":"/mnt/data/nextcloud/lib/private/Route/Router.php","line":330,"function":"findMatchingRoute","class":"OC\\Route\\Router","type":"->"},{"file":"/mnt/data/nextcloud/ocs/v1.php","line":66,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/mnt/data/nextcloud/ocs/v2.php","line":23,"args":["/mnt/data/nextcloud/ocs/v1.php"],"function":"require_once"}],"File":"/mnt/data/nextcloud/lib/private/Route/Router.php","Line":469,"message":"Class \"OCA\\UserStatus\\Controller\\UserStatusController\" does not exist","exception":{},"CustomMessage":"Class \"OCA\\UserStatus\\Controller\\UserStatusController\" does not exist"}}
{"reqId":"TNyWJXtsMt9pR5L3OxXE","level":3,"time":"May 08, 2024 22:53:10","remoteAddr":"80.247.145.124","user":"myadmin","app":"webdav","method":"GET","url":"/remote.php/dav/files/myadmin/FOLDERSHARE/SubFolder/file.pdf","message":"Impossible d'ouvrir le fichier","userAgent":"Mozilla/5.0 (iOS) Nextcloud-iOS/5.2.7","version":"29.0.0.19","exception":{"Exception":"Sabre\\DAV\\Exception\\ServiceUnavailable","Message":"Impossible d'ouvrir le fichier","Code":0,"Trace":[{"file":"/mnt/data/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":85,"function":"get","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->"},{"file":"/mnt/data/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpGet","class":"Sabre\\DAV\\CorePlugin","type":"->"},{"file":"/mnt/data/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":472,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/mnt/data/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":253,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/mnt/data/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":321,"function":"start","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/mnt/data/nextcloud/apps/dav/lib/Server.php","line":374,"function":"exec","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/mnt/data/nextcloud/apps/dav/appinfo/v2/remote.php","line":35,"function":"exec","class":"OCA\\DAV\\Server","type":"->"},{"file":"/mnt/data/nextcloud/remote.php","line":172,"args":["/mnt/data/nextcloud/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/mnt/data/nextcloud/apps/dav/lib/Connector/Sabre/File.php","Line":505,"message":"Impossible d'ouvrir le fichier","exception":{},"CustomMessage":"Impossible d'ouvrir le fichier"}}

Additional info

Might be related, but pretty old :
#6395

@huntervcx huntervcx added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug labels May 8, 2024
@huntervcx
Copy link
Author

Ended up by truncate all of oc_filecache table, resolving all issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap 29-feedback bug feature: external storage
Projects
None yet
Development

No branches or pull requests

2 participants