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

Nextcloud log: ...bookmarks/cache/CACHEDIR.TAG: Failed to open stream #2256

Open
kF13Ld opened this issue Jan 5, 2025 · 4 comments
Open
Labels

Comments

@kF13Ld
Copy link

kF13Ld commented Jan 5, 2025

Describe the bug
Nextcloud AiO shows error messages in log about every 30-35 min:
file_put_contents(/mnt/ncdata/appdata_octzohmn52wo/bookmarks/cache/CACHEDIR.TAG): Failed to open stream: No such file or directory at /var/www/html/lib/private/Files/Storage/Local.php#304
To Reproduce
Steps to reproduce the behavior:

  1. Nextcloud AiO v10.1.1 running
  2. view protocoll: https:///settings/admin/logging
  3. See error

Expected behavior
No error message

Desktop (please complete the following information):

  • OS: Linux (Aurora)
  • Browser: Firefox
  • Version: 133.0.3

Server (please complete the following information):

  • OS: Debian 12 Bookworm
  • Nextcloud AiO v10.1.1
  • Bookmarks app version: 15.0.4
  • Activated Nextcloud Apps:
 root@alpine:~# sudo docker exec --user www-data -it nextcloud-aio-nextcloud php occ app:list
Enabled:
  - activity: 3.0.0
  - admin_audit: 1.20.0
  - app_api: 4.0.3
  - bookmarks: 15.0.4
  - bruteforcesettings: 3.0.0
  - calendar: 5.0.8
  - circles: 30.0.0
  - cloud_federation_api: 1.13.0
  - comments: 1.20.1
  - contacts: 6.1.2
  - contactsinteraction: 1.11.0
  - dav: 1.31.1
  - facerecognition: 0.9.60
  - federatedfilesharing: 1.20.0
  - federation: 1.20.0
  - files: 2.2.0
  - files_downloadlimit: 3.0.0
  - files_fulltextsearch: 30.0.0
  - files_pdfviewer: 3.0.0
  - files_reminders: 1.3.0
  - files_sharing: 1.22.0
  - files_trashbin: 1.20.1
  - files_versions: 1.23.0
  - firstrunwizard: 3.0.0
  - fulltextsearch: 30.0.0
  - fulltextsearch_elasticsearch: 30.0.0
  - logreader: 3.0.0
  - lookup_server_connector: 1.18.0
  - memories: 7.4.1
  - nextcloud-aio: 0.7.0
  - nextcloud_announcements: 2.0.0
  - notes: 4.11.0
  - notifications: 3.0.0
  - notify_push: 0.7.0
  - oauth2: 1.18.1
  - password_policy: 2.0.0
  - photos: 3.0.2
  - previewgenerator: 5.7.0
  - privacy: 2.0.0
  - provisioning_api: 1.20.0
  - recognize: 8.2.0
  - recommendations: 3.0.0
  - related_resources: 1.5.0
  - serverinfo: 2.0.0
  - settings: 1.13.0
  - sharebymail: 1.20.0
  - support: 2.0.0
  - survey_client: 2.0.0
  - systemtags: 1.20.0
  - tasks: 0.16.1
  - text: 4.1.0
  - theming: 2.5.0
  - twofactor_backupcodes: 1.19.0
  - twofactor_totp: 12.0.0-dev
  - user_status: 1.10.0
  - viewer: 3.0.0
  - weather_status: 1.10.0
  - webhook_listeners: 1.1.0-dev
  - workflowengine: 2.12.0
Disabled:
  - dashboard: 7.10.0 (installed 7.8.0)
  - deck: 1.14.2 (installed 1.14.2)
  - encryption: 2.18.0
  - files_external: 1.22.0
  - suspicious_login: 8.0.0
  - twofactor_nextcloud_notification: 4.0.0
  - user_ldap: 1.21.0

  • Nextcloud configuration:
root@alpine:~# sudo docker exec --user www-data -it nextcloud-aio-nextcloud php occ config:list system                                                                                       {
    "system": {
        "one-click-instance": true,
        "one-click-instance.user-limit": 100,
        "memcache.local": "\\OC\\Memcache\\APCu",
        "apps_paths": [
            {  
                "path": "\/var\/www\/html\/apps",
                "url": "\/apps",
                "writable": false
            }, 
            {  
                "path": "\/var\/www\/html\/custom_apps",
                "url": "\/custom_apps",
                "writable": true
            }  
        ],
        "appsallowlist": false,
        "check_data_directory_permissions": false,
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "password": "***REMOVED SENSITIVE VALUE***",
            "port": 6379
        },
        "overwritehost": "***REMOVED SENSITIVE VALUE**",
        "overwriteprotocol": "https",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "localhost",
            "***REMOVED SENSITIVE VALUE**"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "pgsql",
        "version": "30.0.4.1",
        "overwrite.cli.url": "https:\/\/***REMOVED SENSITIVE VALUE**\/",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "maintenance": false,
        "loglevel": "2",
        "log_type": "file",
        "logfile": "\/var\/www\/html\/data\/nextcloud.log",
        "log_rotate_size": "10485760",
        "log.condition": {
            "apps": [
                "admin_audit"
            ]  
        },
        "preview_max_x": 2048,
        "preview_max_y": 2048,
        "jpeg_quality": 60,
        "enabledPreviewProviders": {
            "1": "OC\\Preview\\Image",
            "2": "OC\\Preview\\MarkDown",
            "3": "OC\\Preview\\MP3",
            "4": "OC\\Preview\\TXT",
            "5": "OC\\Preview\\OpenDocument",
            "6": "OC\\Preview\\Movie",
            "7": "OC\\Preview\\Krita",
            "0": "OC\\Preview\\Imaginary",
            "23": "OC\\Preview\\ImaginaryPDF"
        },
        "enable_previews": true,
        "upgrade.disable-web": true,
        "mail_smtpmode": "smtp",
        "trashbin_retention_obligation": "auto, 30",
        "versions_retention_obligation": "auto, 30",
        "activity_expire_days": "30",
        "simpleSignUpLink.shown": false,
        "share_folder": "\/Shared",
        "one-click-instance.link": "https:\/\/nextcloud.com\/all-in-one\/",
        "upgrade.cli-upgrade-link": "https:\/\/github.com\/nextcloud\/all-in-one\/discussions\/2726",
        "updatedirectory": "\/nc-updater",
        "maintenance_window_start": 100,
        "allow_local_remote_servers": true,
        "davstorage.request_timeout": 3600,
        "htaccess.RewriteBase": "\/",
        "dbpersistent": false,
        "files_external_allow_create_new_local": false,
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "preview_imaginary_url": "***REMOVED SENSITIVE VALUE***",
        "preview_imaginary_key": "***REMOVED SENSITIVE VALUE***",
        "default_phone_region": "DE",
        "mail_smtpsecure": "ssl",
        "mail_sendmailmode": "smtp",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "465",
        "mail_smtpauth": 1,
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "auth.bruteforce.protection.enabled": true,
        "ratelimit.protection.enabled": true,
        "data-fingerprint": "8e63ee77960fdff805345fa2e5eb7c42",
        "facerecognition.external_model_url": "nextcloud-aio-facerecognition:5000",
        "facerecognition.external_model_api_key": "some-super-secret-api-key",
        "enabledFaceRecognitionMimetype": [
            "image\/jpeg",
            "image\/png",
            "image\/heic",
            "image\/tiff",
            "image\/webp"
        ],
        "memories.db.triggers.fcu": true,
        "memories.exiftool": "\/var\/www\/html\/custom_apps\/memories\/bin-ext\/exiftool-amd64-musl",
        "memories.vod.path": "\/var\/www\/html\/custom_apps\/memories\/bin-ext\/go-vod-amd64",
        "memories.vod.ffmpeg": "\/usr\/bin\/ffmpeg",
        "memories.vod.ffprobe": "\/usr\/bin\/ffprobe",
        "documentation_url.server_logs": "https:\/\/github.com\/nextcloud\/all-in-one\/discussions\/5425",
        "DOMAIN": "***REMOVED SENSITIVE VALUE**"
    }
}

Nextcloud log (nextcloud/data/nextcloud.log)

file_put_contents(/mnt/ncdata/appdata_octzohmn52wo/bookmarks/cache/CACHEDIR.TAG): Failed to open stream: No such file or directory at /var/www/html/lib/private/Files/Storage/Local.php#304 
@kF13Ld kF13Ld added the bug label Jan 5, 2025
Copy link

github-actions bot commented Jan 5, 2025

Hello 👋

Thank you for taking the time to open this issue with the bookmarks app. I know it's frustrating when software
causes problems. You have made the right choice to come here and open an issue to make sure your problem gets looked at
and if possible solved.
I'm Marcel and have been maintaining this software the last few years. I currently work for Nextcloud but maintain this app
in my free time, because it is not an official Nextcloud product. My day job at Nextcloud is pretty awesome but sadly leaves me with
less time for side projects like this one than I used to have.
I still try to answer all issues and if possible fix all bugs here, but it sometimes takes a while until I get to it.
Until then, please be patient.
Note also that GitHub is a place where people meet to make software better together. Nobody here is under any obligation
to help you, solve your problems or deliver on any expectations or demands you may have, but if enough people come together we can
collaborate to make this software better. For everyone.
Thus, if you can, you could also look at other issues to see whether you can help other people with your knowledge
and experience. If you have coding experience it would also be awesome if you could step up to dive into the code and
try to fix the odd bug yourself. Everyone will be thankful for extra helping hands!
One last word: If you feel, at any point, like you need to vent, this is not the place for it; you can go to the forum,
to twitter or somewhere else. But this is a technical issue tracker, so please make sure to
focus on the tech and keep your opinions to yourself. (Also see our Code of Conduct. Really.)

I look forward to working with you on this issue
Cheers 💙

@ger35678
Copy link

I had exactly the same problem very recently.
I found out that the folders "bookmarks" and "cache" were not present, neither in the container "nextcloud-aio-nextcloud" nor on the appertaining volume "nextcloud_aio_nextcloud_data".

I had a similar problem with a similar error log entry one or two months before with the bookmarks app. I did not exactly remember the solution, but after deactivating and deleting the bookmarks app and also recreating all of the containers I still had a "bookmarks" folder in that place. So I deleted that folder recursively and installed bookmarks app again. Then it worked until recently when I received your error message.

So now the steps I did now:
Go into the nextcloud-aio-nextcloud container:
docker exec -it nextcloud-aio-nextcloud bash
cd to:
/mnt/ncdata/appdata_octzohmn52wo

Check if the bookmarks folder is there, otherwise create it and also the cache folde r,and change ownership :

mkdir bookmarks
cd bookmarks
mkdir cache
cd..
cd..
sudo chown www-data:www-data -R bookmarks

Now exit the container and cd to the nextcloud.log
/var/lib/docker/volumes/nextcloud_aio_nextcloud/_data/data/
Open nextcloud.log with an editor and delete all the content and save the file.

Stop all containers and restart them. The newly created folders are also present now in the volume nextcloud_aio_nextcloud_data
I have a green checkmark since two days now.
Hope this helps! Please check all paths to make sure they apply to your settings.

@kF13Ld
Copy link
Author

kF13Ld commented Jan 12, 2025

Thank you very much! Even after one day those messages did not reoccur!

In short: the bookmarks app would just have to create the subfolder:
/mnt/ncdata/appdata_octzohmn52wo/bookmarks/cache
for everything to work.

@marcelklehr
Copy link
Member

The thing is that the app does create the folder if it doesn't exist 🤔

@marcelklehr marcelklehr moved this from Backlog to Triaging in Bookmarks Jan 14, 2025
@github-project-automation github-project-automation bot moved this to Backlog in Bookmarks Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Triaging
Development

No branches or pull requests

3 participants