server icon indicating copy to clipboard operation
server copied to clipboard

SFTP external storage logs “user not logged in” during cron background jobs

Open SaschaMuehl opened this issue 3 years ago • 21 comments

⚠️ This issue respects the following points: ⚠️

Bug description

Bug relates to #22546, managed from szaimen

After changing the SFTP user from "root" to "sascha" of the external storage due to safety reasons the Nextcloud Server cannot login into the storage. Due to this other apps are not working anymore, e.g.:

  • recognize ("Could not fetch storage root")
  • memories ("Failed to index folder /user/files/...")

### The system seems not be able to login into the SFTP external Server ("Can't get app storage, app files_external, user not logged in")

Steps to reproduce

  1. changing the SFTP user of the external storage from "root" to "xyz" due to safety reasons: external Network Storage (NAS, no changing of the storage name): Owner: root [0]; Group: NASUserGroup [1008]; rights: 0770

       **Login Nextcloud (NAS User for Nextcloud)**
       SFTP-User: xyz (part of NASUserGroup)  
       Nextcloud User: xyz (admin)
    
  2. the Nextcloud Server cannot login into the storage (access to the external storage via dashboard is still possible)

  3. check if apps are able to access the ext. Storage

  4. checking ext. storage setup (SFTP),

  5. checking Protocols

What forums say, but for reasons not done jet:

  • rescan with "files:scan --all"

Tests: The access to the files works well: image

The administration area verifys the login too (NAS access still works): image

The personal area does have verification problems after saving (NAS access still works) image

After saving the setup in the personal area and reverification the access seems to work: image

Expected behavior

Access to ext. storage without login errors

Installation method

Community Web installer on a VPS or web space

Nextcloud Server version

26

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.1

Web server

Nginx

Database engine version

MariaDB 10.6

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?

Encryption is Disabled

What user-backends are you using?

  • [X] 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": {
            "1": "192.168.178.92",
            "2": "subdomain.tld.de"
        },
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "overwrite.cli.url": "https:\/\/nc.smuehl.de",
        "version": "26.0.2.1",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "memcache.local": "\\OC\\Memcache\\APCu",
        "default_phone_region": "DE",
        "overwriteprotocol": "https",
        "logtimezone": "Europe\/Berlin",
        "filelocking.enabled": false,
        "filesystem_check_changes": 1,
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 0,
            "timeout": 0
        },
        "maintenance": false,
        "app_install_overwrite": [
            "occweb",
            "files_clipboard",
            "ocr",
            "bookmarks_fulltextsearch",
            "recognize",
            "extract",
            "duplicatefinder",
            "apporder",
            "facerecognition",
            "files_fulltextsearch_tesseract"
        ],
        "allow_local_remote_servers": true,
        "theme": "",
        "loglevel": 0,
        "maintenance_window_start": 1,
        "mail_smtpmode": "smtp",
        "mail_smtpsecure": "ssl",
        "mail_sendmailmode": "smtp",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauthtype": "LOGIN",
        "mail_smtpauth": 1,
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "465",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "onlyoffice": {
            "verify_peer_off": true,
            "jwt_header": "AuthorizationJwt"
        },
        "has_rebuilt_cache": true,
        "memories.exiftool": "\/var\/www\/nextcloud\/apps\/memories\/exiftool-bi                                                                                                             n\/exiftool-amd64-glibc",
        "enabledPreviewProviders": [
            "OC\\Preview\\Image",
            "OC\\Preview\\Movie",
            "OC\\Preview\\HEIC",
            "OC\\Preview\\TIFF",
            "OC\\Preview\\Movie",
            "OC\\Preview\\MKV",
            "OC\\Preview\\MP4",
            "OC\\Preview\\AVI"
        ],
        "preview_max_memory": 4096,
        "preview_max_filesize_image": 256,
        "updater.release.channel": "stable",
        "memories.vod.path": "\/var\/www\/nextcloud\/apps\/memories\/exiftool-bi                                                                                                             n\/go-vod-amd64"
    }
}

List of activated Apps

Enabled:
  - activity: 2.18.0
  - admin_audit: 1.16.0
  - analytics: 4.9.3
  - bruteforcesettings: 2.6.0
  - calendar: 4.4.2
  - camerarawpreviews: 0.8.1
  - circles: 26.0.0
  - cloud_federation_api: 1.9.0
  - comments: 1.16.0
  - contacts: 5.3.0
  - contactsinteraction: 1.7.0
  - dashboard: 7.6.0
  - dav: 1.25.0
  - electronicsignatures: 2.0.4
  - external: 5.1.0
  - facerecognition: 0.9.12
  - federatedfilesharing: 1.16.0
  - federation: 1.16.0
  - files: 1.21.1
  - files_downloadactivity: 1.16.0
  - files_external: 1.18.0
  - files_fulltextsearch: 26.0.0
  - files_fulltextsearch_tesseract: 27.0.0
  - files_pdfviewer: 2.7.0
  - files_rightclick: 1.5.0
  - files_sharing: 1.18.0
  - files_trashbin: 1.16.0
  - files_versions: 1.19.1
  - firstrunwizard: 2.15.0
  - fulltextsearch: 26.0.0
  - fulltextsearch_elasticsearch: 26.0.0
  - integration_github: 2.0.4
  - logreader: 2.11.0
  - lookup_server_connector: 1.14.0
  - mail: 3.2.0
  - maps: 1.0.2
  - memories: 5.1.0
  - nextcloud_announcements: 1.15.0
  - notes: 4.8.0
  - notifications: 2.14.0
  - oauth2: 1.14.0
  - onlyoffice: 7.8.0
  - password_policy: 1.16.0
  - passwords: 2023.5.30
  - photos: 2.2.0
  - previewgenerator: 5.3.0
  - privacy: 1.10.0
  - provisioning_api: 1.16.0
  - recognize: 4.1.0
  - recommendations: 1.5.0
  - related_resources: 1.1.0-alpha1
  - richdocumentscode: 23.5.5
  - serverinfo: 1.16.0
  - settings: 1.8.0
  - sharebymail: 1.16.0
  - support: 1.9.0
  - survey_client: 1.14.0
  - suspicious_login: 4.4.0
  - systemtags: 1.16.0
  - tasks: 0.15.0
  - text: 3.7.2
  - theming: 2.1.1
  - twofactor_backupcodes: 1.15.0
  - updatenotification: 1.16.0
  - user_status: 1.6.0
  - viewer: 1.10.0
  - weather_status: 1.6.0
  - workflowengine: 2.8.0
Disabled:
  - apporder: 0.15.0 (installed 0.15.0)
  - bookmarks_fulltextsearch: 1.2.0 (installed 1.2.0)
  - carnet: 0.24.7 (installed 0.24.7)
  - cfg_share_links: 4.0.0 (installed 4.0.0)
  - discretepdfsigner: 0.0.4 (installed 0.0.4)
  - duplicatefinder: 0.0.15 (installed 0.0.15)
  - encryption: 2.14.0 (installed 2.12.0)
  - extract: 1.3.5 (installed 1.3.5)
  - files_clipboard: 0.7.1 (installed 0.7.1)
  - integration_homeassistant: 0.0.2 (installed 0.0.2)
  - ransomware_protection: 1.14.0 (installed 1.14.0)
  - richdocuments: 8.0.2 (installed 8.0.2)
  - spreed: 16.0.4 (installed 16.0.4)
  - twofactor_totp: 8.0.0
  - user_ldap: 1.16.0

Nextcloud Signing status

"No errors have been found."

Nextcloud Logs

{"reqId":"gQ4VEx6gcJ7yRtLPt4zy","level":0,"time":"2023-06-22T09:05:02+02:00","remoteAddr":"","user":"--","app":"cron","method":"","url":"--","message":"Run OCA\\Memories\\Cron\\IndexJob job with ID 9170","userAgent":"--","version":"26.0.2.1","data":{"app":"cron"}}
{"reqId":"gQ4VEx6gcJ7yRtLPt4zy","level":3,"time":"2023-06-22T09:05:03+02:00","remoteAddr":"","user":"--","app":"core","method":"","url":"--","message":"Can't get app storage, app files_external, user not logged in","userAgent":"--","version":"26.0.2.1","data":{"app":"core"}}
{"reqId":"gQ4VEx6gcJ7yRtLPt4zy","level":3,"time":"2023-06-22T09:05:03+02:00","remoteAddr":"","user":"--","app":"core","method":"","url":"--","message":"Can't get app storage, app files_external, user not logged in","userAgent":"--","version":"26.0.2.1","data":{"app":"core"}}
{"reqId":"gQ4VEx6gcJ7yRtLPt4zy","level":1,"time":"2023-06-22T09:05:43+02:00","remoteAddr":"","user":"--","app":"lib","method":"","url":"--","message":"Storage with shared::110db3aa1f87bf466bce20f00b1c2cf9 marked as unavailable","userAgent":"--","version":"26.0.2.1","data":{"app":"lib"}}
{"reqId":"gQ4VEx6gcJ7yRtLPt4zy","level":1,"time":"2023-06-22T09:05:43+02:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","message":"External storage not available: stat() failed","userAgent":"--","version":"26.0.2.1","data":[]}
{"reqId":"gQ4VEx6gcJ7yRtLPt4zy","level":1,"time":"2023-06-22T09:05:43+02:00","remoteAddr":"","user":"--","app":"lib","method":"","url":"--","message":"Storage with shared::110db3aa1f87bf466bce20f00b1c2cf9 marked as unavailable","userAgent":"--","version":"26.0.2.1","data":{"app":"lib"}}
{"reqId":"gQ4VEx6gcJ7yRtLPt4zy","level":3,"time":"2023-06-22T09:05:43+02:00","remoteAddr":"","user":"--","app":"memories","method":"","url":"--","message":"Failed to index folder /Sascha/files/Nextcloud Contabo: ","userAgent":"--","version":"26.0.2.1","data":{"app":"memories"}}
{"reqId":"gQ4VEx6gcJ7yRtLPt4zy","level":1,"time":"2023-06-22T09:05:45+02:00","remoteAddr":"","user":"--","app":"memories","method":"","url":"--","message":"Memories: Indexing completed successfully","userAgent":"--","version":"26.0.2.1","data":{"app":"memories"}}
{"reqId":

Additional info

No response

SaschaMuehl avatar Jun 22 '23 09:06 SaschaMuehl

If I'm understanding your report correctly: you tried to change the username/password associated with an existing SFTP External Storage mount and that's when things broke?

Can you provide the output of either:

./occ files_external:list -a --full

Or (preferably):

././occ files_external:list -a --full --output=json

Feel free to anonymize any bits you'd prefer not be disclosed for privacy purposes.

Also, what do the logs on your NAS indicate?

joshtrichards avatar Jul 02 '23 21:07 joshtrichards

@joshtrichards

If I'm understanding your report correctly: you tried to change the username/password associated with an existing SFTP External Storage mount and that's when things broke?

Yes I changed from the user "root" to "sascha". The SFTP access works fine (via WinSCP and also as a network storage in my local network). There are no errors at all.

Can you provide the output of either: > ././occ files_external:list -a --full --output=json

[{"mount_id":3,"mount_point":"\/NAS","storage":"\\OCA\\Files_External\\Lib\\Storage\SFTP","authentication_type":"password::password","configuration":{"host":"192.168.xxx.xx","root":"\/media\/NAS\/","user":"sascha","password":"***"},"options":{"encrypt":true,"previews":true,"enable_sharing":true,"filesystem_check_changes":1,"encoding_compatibility":false,"readonly":false},"applicable_users":["Sascha"],"applicable_groups":["admin"],"type":"admin"}]

Also, what do the logs on your NAS indicate?

I build my own NAS, there are no NAS-logs. I could provide the access and nginx logs. But does this help?

My Nextcloud-Log looks like this: image

SaschaMuehl avatar Jul 11 '23 14:07 SaschaMuehl

Same here on NC 27.0.1, external storage mounted with SFTP, username/password global username/password given, external storage then shared to other users.

Ra72xx avatar Aug 23 '23 15:08 Ra72xx

The update to Nextcloud Hub 5 (27.0.2) seems to solve the problem

SaschaMuehl avatar Sep 10 '23 18:09 SaschaMuehl

Nope, it doesn't. Having it with 27.1.6. Happens on a external sftp Storage with r/w access for all, shares are allowed. (Has external shares with password.) My way of going arround is not scanning it for now. Works in my case, cause I don't expect so much change on that one currently. When all plugins I need are avaliable on 28 I'll check on that version again. If the problem still exists then, I'll try remove the specific external storage completly and set it up again.

AnsPunktF avatar Feb 18 '24 01:02 AnsPunktF

I have the same issue aswell with sftp storage connected. Have no idea how to get rid of it.

jonas740 avatar Feb 28 '24 20:02 jonas740

@jonas740 & @AnsPunktF Any idea what may have triggered it or when the issue started in your environments? The OP had recently made changes to their environment, so there was a suggestion that brought out this behavior (at the time). The error in the subject of this issue should only be able to happen if the user isn't logged in any longer.

Are you able to access the files on this External Storage mount via Nextcloud when this error is occurring? (Not just browse, but try download/open/view something to make sure it pulls it from the SFTP source not just the Nextcloud metadata database).

joshtrichards avatar Feb 28 '24 21:02 joshtrichards

Reports about this in the help forum too: https://help.nextcloud.com/t/still-issue-cant-get-app-storage-app-files-external-user-not-logged-in/170160

joshtrichards avatar Feb 28 '24 22:02 joshtrichards

It started yesterday after I attached sftp storage to nextcloud via the external storage app.

And yes I can reach my sftp folder and files in nextcloud even if this error occurs.

I read a lot of similar threads and some suggest that it might be triggered when not logged in but I really do not get that. The sftp connection has permissions in nextcloud.

On another subject there has been popping up loads of errors the higher the version of nextcloud imo.

jonas740 avatar Feb 28 '24 23:02 jonas740

Since there’s no stack trace, please temporarily (and because it'll generate a lot of logs so I don't suggest this on a busy system) add log.backtrace => true, to your config.php. Then wait for the error to be triggered. Once it’s triggered you can remove the option from your config. The stack trace generated may provide the hints needed to track this down so please post it.

joshtrichards avatar Feb 28 '24 23:02 joshtrichards

Hello, i have the same Problem with SFTP and Nextcloud 28.0.2. Here is the backtrace from my log.

{"reqId":"XXXXXX","level":3,"time":"2024-02-29T05:25:03+00:00","remoteAddr":"","user":"--","app":"core","method":"","url":"--","message":"Can't get app storage, app files_external, user not logged in","userAgent":"--","version":"28.0.2.5","data":{"app":"core","backtrace":[{"file":"/var/www/html/nextcloud/lib/private/Log.php","line":151,"function":"log","class":"OC\\Log","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Log/PsrLoggerAdapter.php","line":130,"function":"error","class":"OC\\Log","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/legacy/OC_App.php","line":872,"function":"error","class":"OC\\Log\\PsrLoggerAdapter","type":"->"},{"file":"/var/www/html/nextcloud/lib/public/Files.php","line":112,"function":"getStorage","class":"OC_App","type":"::"},{"file":"/var/www/html/nextcloud/apps/files_external/lib/Lib/Storage/SFTP.php","line":227,"function":"getStorage","class":"OCP\\Files","type":"::"},{"file":"/var/www/html/nextcloud/apps/files_external/lib/Lib/Storage/SFTP.php","line":244,"function":"hostKeysPath","class":"OCA\\Files_External\\Lib\\Storage\\SFTP","type":"->"},{"file":"/var/www/html/nextcloud/apps/files_external/lib/Lib/Storage/SFTP.php","line":147,"function":"writeHostKeys","class":"OCA\\Files_External\\Lib\\Storage\\SFTP","type":"->"},{"file":"/var/www/html/nextcloud/apps/files_external/lib/Lib/Storage/SFTP.php","line":359,"function":"getConnection","class":"OCA\\Files_External\\Lib\\Storage\\SFTP","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php","line":224,"function":"file_exists","class":"OCA\\Files_External\\Lib\\Storage\\SFTP","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php","line":224,"function":"file_exists","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Files/View.php","line":1330,"function":"file_exists","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Files/View.php","line":1374,"function":"getCacheEntry","class":"OC\\Files\\View","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Files/Node/Root.php","line":203,"function":"getFileInfo","class":"OC\\Files\\View","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Files/Node/Folder.php","line":135,"function":"get","class":"OC\\Files\\Node\\Root","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Files/Node/Folder.php","line":144,"function":"get","class":"OC\\Files\\Node\\Folder","type":"->"},{"file":"/var/www/html/nextcloud/apps/memories/lib/Service/Index.php","line":121,"function":"nodeExists","class":"OC\\Files\\Node\\Folder","type":"->"},{"file":"/var/www/html/nextcloud/apps/memories/lib/Service/Index.php","line":181,"function":"indexFolder","class":"OCA\\Memories\\Service\\Index","type":"->"},{"file":"/var/www/html/nextcloud/apps/memories/lib/Service/Index.php","line":107,"function":"indexFolder","class":"OCA\\Memories\\Service\\Index","type":"->"},{"file":"/var/www/html/nextcloud/apps/memories/lib/Cron/IndexJob.php","line":92,"function":"indexUser","class":"OCA\\Memories\\Service\\Index","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/User/Manager.php","line":656,"function":"OCA\\Memories\\Cron\\{closure}","class":"OCA\\Memories\\Cron\\IndexJob","type":"->"},{"file":"/var/www/html/nextcloud/apps/memories/lib/Cron/IndexJob.php","line":100,"function":"callForSeenUsers","class":"OC\\User\\Manager","type":"->"},{"file":"/var/www/html/nextcloud/apps/memories/lib/Cron/IndexJob.php","line":63,"function":"indexAllUsers","class":"OCA\\Memories\\Cron\\IndexJob","type":"->"},{"file":"/var/www/html/nextcloud/lib/public/BackgroundJob/Job.php","line":81,"function":"run","class":"OCA\\Memories\\Cron\\IndexJob","type":"->"},{"file":"/var/www/html/nextcloud/lib/public/BackgroundJob/TimedJob.php","line":102,"function":"start","class":"OCP\\BackgroundJob\\Job","type":"->"},{"file":"/var/www/html/nextcloud/lib/public/BackgroundJob/TimedJob.php","line":92,"function":"start","class":"OCP\\BackgroundJob\\TimedJob","type":"->"},{"file":"/var/www/html/nextcloud/cron.php","line":152,"function":"execute","class":"OCP\\BackgroundJob\\TimedJob","type":"->"}]},"id":"xxxxxxx"}

vwvierhundertzwoelf avatar Feb 29 '24 05:02 vwvierhundertzwoelf

Is anyone experiencing this not using the Memories app? This is may be specific to the Memories cron job.

joshtrichards avatar Feb 29 '24 15:02 joshtrichards

nextcloud.log

Here is my nextcloud log with log.backtrace => true, set to my config.php for nextcloud

jonas740 avatar Feb 29 '24 15:02 jonas740

~~I was able to fix the "Can't get app storage"- issue with:~~

occ files:cleanup

Several orphaned cache-entries and invalid storage-configs were removed. ~~Since, above log-entries no longer showed up during cron.php execution.~~

OK - too early: After starting a new index-run in memories, the beast returned.

umgfoin avatar Mar 08 '24 22:03 umgfoin

@umgfoin thanks for your advice sudo -u www-data php /var/www/nextcloud/occ files:cleanup Terminal-Output: 0 orphaned file cache entries deleted 0 orphaned mount entries deleted

Nextcloud.log-Output Can't get app storage, app files_external, user not logged in

==>solution does not help

@joshtrichards I also use memories app but can not find the root back to the problem because of less of information in the nextcloud.logs

I might also be a problem with other apps: Nextcloud.log-Output recognize | Could not fetch storage root

Summarized it seems to be a #core issue linked with an Cron-Job of Nextcloud since the failure repeats every 7 minutes and I don't have one with 7 min.

for user in $(cut -f1 -d: /etc/passwd); do echo $user; crontab -u $user -l; done Terminal-Output: */5 * * * * php -f /var/www/nextcloud/cron.php > /dev/null 2>&1 */30 * * * * php -f /var/www/nextcloud/occ face:background_job -t 900 -u NextcloudUser 0 0 * * * php -f /var/www/nextcloud/occ preview:pre-generate */15 * * * * php -f /var/www/nextcloud/occ recognize:classify

image

Edit: The Solution according to https://help.nextcloud.com/t/still-issue-cant-get-app-storage-app-files-external-user-not-logged-in/170160/9?u=saschamuehl (deleting all unnessecary / old entries) didn't help too Steps to reproduce:

mariadb -uroot -p
use nextcloud_db;
select * from oc_storages;
delete from oc_storages where id = '[TheShownAndOldEntry]';

My oc_storages table looks like this now image

==>solution does not help

any other ideas?

SaschaMuehl avatar Mar 09 '24 10:03 SaschaMuehl

Is anyone experiencing this not using the Memories app? This is may be specific to the Memories cron job.

I was using it but had it disabled at the time when this problem appeared. There I had more truble with the duplicate finder (differend ones, maybe also this, but I am not shure). It also would not surprise me, when it was an interference between two plugins. So this, or another plugin I used earlier might have been the reason in my case. After I made some cleanups my problem dissapeared. The Cleanups I did was removing unused plugins and then kicked out but first just renamed their tables with a prefix, to see if this cause other problems and be able to go the step back then. So thx for this hint, because I think it must be a plugin. Sadly I don't know which one of the ones I removed caused this specific problem here, cause I ran out of patience and removed a bunch.

To answer to the earlier comment: It was triggered by a cron because the messages appeared when the cron got triggered. It was possible to access all files, but something must have been wrong in one of the crons, because somewhen i had the warning, that the crons didn't got executed for a long time. After my cleanup everything was working again. I'll try now to reinstall the file duplicate finder and check if it will appear again.

AnsPunktF avatar Mar 10 '24 00:03 AnsPunktF

so here's how I got my logs cleaned up after logs were being spammed by "external_files, user not logged in".

since SFTP connects per SSH credentials to the local server (NAS in my case), I deleted the global credentials which had my Nextcloud user credentials saved. assuming this is some default configuration. after entering correct SSH/SFTP global user credentials there, log spamming stopped for me.

grafik

assuming that if the global user credentials are left empty, then the credentials per SFTP connection would be used.

EDIT!

initially this seemed to resolve the issue, after some time the issue persists and log spamming continues. this is not resolved.

scubamuc avatar Jun 04 '24 11:06 scubamuc

Hello,

I'm also having this problem. I tried all the proposed solutions, database tables oc_storages and oc_storages_credentials have been cleaned, global credentials tested ... etc ... and still facing the issue. Has anyone found a solution. I'm using memories applications and recognize also.

Thanks for your help.

damdam76 avatar Jul 02 '24 12:07 damdam76

Had it again, this time I have some details. Looks like in my case it is the duplicatefinder.



{
	"reqId": "ZoHIfU2BaDbTXkWfHlXoHwAAAjs",
	"level": 3,
	"time": "2024-06-30T21:10:58+00:00",
	"remoteAddr": "xxx.xxx.xxx.xxx",
	"user": "--",
	"app": "core",
	"method": "GET",
	"url": "/cron.php",
	"message": "Can't get app storage, app files_external, user not logged in",
	"userAgent": "cronBROWSE v1.1",
	"version": "29.0.3.4",
	"data": {
		"app": "core",
		"backtrace": [
			{
				"file": "/www/htdocs/.../lib/private/Log.php",
				"line": 127,
				"function": "log",
				"class": "OC\\Log",
				"type": "->"
			},
			{
				"file": "/www/htdocs/.../lib/private/Log/PsrLoggerAdapter.php",
				"line": 130,
				"function": "error",
				"class": "OC\\Log",
				"type": "->"
			},
			{
				"file": "/www/htdocs/.../lib/private/legacy/OC_App.php",
				"line": 874,
				"function": "error",
				"class": "OC\\Log\\PsrLoggerAdapter",
				"type": "->"
			},
			{
				"file": "/www/htdocs/.../lib/public/Files.php",
				"line": 112,
				"function": "getStorage",
				"class": "OC_App",
				"type": "::"
			},
			{
				"file": "/www/htdocs/.../apps/files_external/lib/Lib/Storage/SFTP.php",
				"line": 227,
				"function": "getStorage",
				"class": "OCP\\Files",
				"type": "::"
			},
			{
				"file": "/www/htdocs/.../apps/files_external/lib/Lib/Storage/SFTP.php",
				"line": 244,
				"function": "hostKeysPath",
				"class": "OCA\\Files_External\\Lib\\Storage\\SFTP",
				"type": "->"
			},
			{
				"file": "/www/htdocs/.../apps/files_external/lib/Lib/Storage/SFTP.php",
				"line": 147,
				"function": "writeHostKeys",
				"class": "OCA\\Files_External\\Lib\\Storage\\SFTP",
				"type": "->"
			},
			{
				"file": "/www/htdocs/.../apps/files_external/lib/Lib/Storage/SFTP.php",
				"line": 470,
				"function": "getConnection",
				"class": "OCA\\Files_External\\Lib\\Storage\\SFTP",
				"type": "->"
			},
			{
				"file": "/www/htdocs/.../lib/private/Files/Storage/Common.php",
				"line": 193,
				"function": "stat",
				"class": "OCA\\Files_External\\Lib\\Storage\\SFTP",
				"type": "->"
			},
			{
				"file": "/www/htdocs/.../lib/private/Files/Storage/Common.php",
				"line": 341,
				"function": "filemtime",
				"class": "OC\\Files\\Storage\\Common",
				"type": "->"
			},
			{
				"file": "/www/htdocs/.../lib/private/Files/Storage/Wrapper/Wrapper.php",
				"line": 387,
				"function": "hasUpdated",
				"class": "OC\\Files\\Storage\\Common",
				"type": "->"
			},
			{
				"file": "/www/htdocs/.../lib/private/Files/Storage/Wrapper/Wrapper.php",
				"line": 387,
				"function": "hasUpdated",
				"class": "OC\\Files\\Storage\\Wrapper\\Wrapper",
				"type": "->"
			},
			{
				"file": "/www/htdocs/.../lib/private/Files/Cache/Watcher.php",
				"line": 134,
				"function": "hasUpdated",
				"class": "OC\\Files\\Storage\\Wrapper\\Wrapper",
				"type": "->"
			},
			{
				"file": "/www/htdocs/.../lib/private/Files/View.php",
				"line": 1349,
				"function": "needsUpdate",
				"class": "OC\\Files\\Cache\\Watcher",
				"type": "->"
			},
			{
				"file": "/www/htdocs/.../lib/private/Files/View.php",
				"line": 1386,
				"function": "getCacheEntry",
				"class": "OC\\Files\\View",
				"type": "->"
			},
			{
				"file": "/www/htdocs/.../lib/private/Files/Node/Root.php",
				"line": 208,
				"function": "getFileInfo",
				"class": "OC\\Files\\View",
				"type": "->"
			},
			{
				"file": "/www/htdocs/.../lib/private/Files/Node/LazyFolder.php",
				"line": 161,
				"function": "get",
				"class": "OC\\Files\\Node\\Root",
				"type": "->"
			},
			{
				"file": "/www/htdocs/.../apps/duplicatefinder/lib/Service/FolderService.php",
				"line": 53,
				"function": "get",
				"class": "OC\\Files\\Node\\LazyFolder",
				"type": "->"
			},
			{
				"file": "/www/htdocs/.../apps/duplicatefinder/lib/BackgroundJob/CleanUpDB.php",
				"line": 67,
				"function": "getNodeByFileInfo",
				"class": "OCA\\DuplicateFinder\\Service\\FolderService",
				"type": "->"
			},
			{
				"file": "/www/htdocs/.../lib/public/BackgroundJob/Job.php",
				"line": 80,
				"function": "run",
				"class": "OCA\\DuplicateFinder\\BackgroundJob\\CleanUpDB",
				"type": "->"
			},
			{
				"file": "/www/htdocs/.../lib/public/BackgroundJob/TimedJob.php",
				"line": 102,
				"function": "start",
				"class": "OCP\\BackgroundJob\\Job",
				"type": "->"
			},
			{
				"file": "/www/htdocs/.../lib/public/BackgroundJob/TimedJob.php",
				"line": 92,
				"function": "start",
				"class": "OCP\\BackgroundJob\\TimedJob",
				"type": "->"
			},
			{
				"file": "/www/htdocs/.../cron.php",
				"line": 231,
				"function": "execute",
				"class": "OCP\\BackgroundJob\\TimedJob",
				"type": "->"
			}
		]
	},
	"id": "668461dee2ec6"
}

To prevent this I disable external storage for now.

AnsPunktF avatar Jul 02 '24 20:07 AnsPunktF

:eyes:

riweckr avatar Jul 10 '24 07:07 riweckr