Repository navigation
Description
Describe the bug
When moving or deleting files on my Opencloud server, I have come across some errors in the container logs. The files appear to move and delete successfully, but I wanted to raise this report in-case something is going wrong under the hood.
Steps to reproduce
- Create a folder
- Move a file to that folder
- Delete a file
Expected behaviour
Actions are performed with no errors in the container logs
Actual behaviour
Three types of errors occur at various stages (logs provided)
- ERR failed to handle moved away item error=error: not found: path not found in cache
- ERR could not delete parent id cache error="key not found"
- ERR could not remove lock file
Setup
- I only wish to use the Opencloud fileserver, I am not interested in things like Collabra etc.
- I am running Opencloud-rolling:latest using Docker, on a Ubuntu 24.04 Virtual Machine. This VM is managed by Proxmox.
- I use Caddy for my reverse proxy
- I use Zitadel for OAuth
- I am pointing the POSIX root to a virtoFS mount on my VM (/mnt/cloud/opencloud). This virtioFS mount points to a ZFS pool on my Proxmox host where I plan on keeping my files for Opencloud. I do not want to store the files on the VM itself.
- Extended attributes are enabled on the virtioFS configuration for this VM
- The directories on both the VM and HOST are set to 1000:1000 permissions, as specified in OC docs
- I have defined a CSP.yaml, using the example given in the opencloud_full deployments
- I have defined a proxy.yaml, this simply looks for my Client ID from Zitadel and makes me an admin when I login, for testing purposes.
- Container log is attached
Here is my compose.yaml
services:
opencloud:
image: opencloudeu/opencloud-rolling:latest
container_name: opencloud
restart: unless-stopped
volumes:
- config:/etc/opencloud
- data:/var/lib/opencloud
- /mnt/cloud/opencloud:/var/lib/opencloud-posix
# Local CSP with my auth domain added
- ./config/csp.yaml:/etc/opencloud/csp.yaml
# Local proxy.yaml contains role assignment instructions to make myself an admin
- ./config/proxy.yaml:/etc/opencloud/proxy.yaml
ports:
- "{MY PORT}:9200"
logging:
driver: local
entrypoint:
- /bin/sh
command: ["-c", "opencloud init || true; opencloud server"]
environment:
OC_URL: https://{MY DOMAIN}
OC_LOG_LEVEL: error
OC_LOG_PRETTY: true
# Reverse proxy handles certificates, so these two are set to False
PROXY_TLS: false
OC_INSECURE: true
# These four are from the deployment example on the OC github, no idea what they do
GATEWAY_GRPC_ADDR: 0.0.0.0:9142
MICRO_REGISTRY_ADDRESS: 127.0.0.1:9233
NATS_NATS_HOST: 0.0.0.0
NATS_NATS_PORT: 9233
# custom CSP file
PROXY_CSP_CONFIG_FILE_LOCATION: /etc/opencloud/csp.yaml
# use posixFS for more human readable file structure
STORAGE_USERS_DRIVER: posix
# Recommended cache storage driver from the OC docs when using posix
STORAGE_USERS_ID_CACHE_STORE: nats-js-kv
# Not sure if I need this line as well
# STORAGE_USERS_FILEMETADATA_CACHE_STORE: nats-js-kv
STORAGE_USERS_POSIX_ROOT: /var/lib/opencloud-posix
# I am using virtioFS, to link to a ZFS pool on the host, do I need this??
STORAGE_USERS_POSIX_WATCH_FS: true
####### INTERNAL AUTH #######
# PROXY_ENABLE_BASIC_AUTH: true
#############################
########### EXTERNAL AUTH ###########
OC_OIDC_ISSUER: https://{MY ZITADEL DOMAIN}
EXTERNAL_OIDC_DOMAIN: {MY ZITADEL DOMAIN}
# Needed to access all the relevant sub-URLs for Auth
PROXY_OIDC_REWRITE_WELLKNOWN: true
# App ID from Zitadel
WEB_OIDC_CLIENT_ID: {MY ZITADEL CLIENT ID}
# Doesn't work without this, no idea why
PROXY_OIDC_ACCESS_TOKEN_VERIFY_METHOD: none
# Make accounts for OC if they don't already exist, based on claims from Zitadel
PROXY_AUTOPROVISION_ACCOUNTS: true
# sub is used due to the ClientID never changing, where as users sometimes change their preferred_name
PROXY_USER_OIDC_CLAIM: sub
PROXY_USER_CS3_CLAIM: username
PROXY_AUTOPROVISION_CLAIM_EMAIL: email
PROXY_AUTOPROVISION_CLAIM_DISPLAYNAME: name
PROXY_AUTOPROVISION_CLAIM_GROUPS: groups
PROXY_AUTOPROVISION_CLAIM_USERNAME: sub
OC_EXCLUDE_RUN_SERVICES: idp
OC_ADMIN_USER_ID: ""
GRAPH_ASSIGN_DEFAULT_USER_ROLE: false
GRAPH_USERNAME_MATCH: none
GRAPH_LDAP_SERVER_WRITE_ENABLED: true
######################################
volumes:
config:
data:Here is my csp.yaml
directives:
child-src:
- '''self'''
connect-src:
- '''self'''
- 'blob:'
# - 'https://${COMPANION_DOMAIN|companion.opencloud.test}/'
# - 'wss://${COMPANION_DOMAIN|companion.opencloud.test}/'
- 'https://raw.githubusercontent.com/opencloud-eu/awesome-apps/'
# - 'https://${KEYCLOAK_DOMAIN|keycloak.opencloud.test}/'
- 'https://{MY-ZITADEL-DOMAIN}'
default-src:
- '''none'''
font-src:
- '''self'''
frame-ancestors:
- '''self'''
frame-src:
- '''self'''
- 'blob:'
- 'https://embed.diagrams.net/'
# In contrary to bash and docker the default is given after the | character
# - 'https://${ONLYOFFICE_DOMAIN|onlyoffice.opencloud.test}/'
# - 'https://${COLLABORA_DOMAIN|collabora.opencloud.test}/'
# This is needed for the external-sites web extension when embedding sites
- 'https://docs.opencloud.eu'
img-src:
- '''self'''
- 'data:'
- 'blob:'
- 'https://raw.githubusercontent.com/opencloud-eu/awesome-apps/'
# In contrary to bash and docker the default is given after the | character
# - 'https://${ONLYOFFICE_DOMAIN|onlyoffice.opencloud.test}/'
# - 'https://${COLLABORA_DOMAIN|collabora.opencloud.test}/'
manifest-src:
- '''self'''
media-src:
- '''self'''
object-src:
- '''self'''
- 'blob:'
script-src:
- '''self'''
- '''unsafe-inline'''
style-src:
- '''self'''
- '''unsafe-inline'''Here is my proxy.yaml
role_assignment:
driver: oidc
oidc_role_mapper:
role_claim: sub
role_mapping:
- role_name: admin
claim_value: {MY ZITADEL USER ID}Metadata
Metadata
Assignees
Type
Projects
- StatusShow more project fieldsDone
Activity
butonic commentedon Jun 11, 2025
yes, but I can't tell if it is sufficient, yet. You only need this if you are moving / editing files and folders outside of opencloud. An a local filesystem we will use inotify to monitor for changes and then assimilate the changes by adding missin file ids to the extended attributes and invalidating our caches.
STORAGE_USERS_FILEMETADATA_CACHE_STOREdefaults to memory, which is sufficient when running a singe node deploymentReading your description and since you enabled
STORAGE_USERS_POSIX_WATCH_FSI assume you are interacting with the files in this manner. Correct me if I am wrong!Now there are several things that can go wrong: It is not clear where you change the filees. The inotity mechanism might need to be propagated from the host that provides the ZFS into your VM that uses virtoFS ... I am not sure that is a supported feature.
Please let us know what works or if you can clarify your setup.
mosslocker commentedon Jun 11, 2025
To clarify my setup for you:
STORAGE_USERS_POSIX_WATCH_FSbecause I saw it on your documentation under "docs/admin/configuration/storage/storage-posix", and thought I potentially needed it. But by your description, I don't think I do.Thanks
butonic commentedon Jun 12, 2025
Ok, that clarifies the setup. I am trying to understand why you run a docker compose deployment inside a VM. To set resource limits? For routing? Why the additional VM? You could run docker compose directly with proxmox, right?
Lets go through your env vars:
nothing critical.
now on to the ERR log entries:
2025-06-11T12:11:15Z ERR failed to handle moved away item error="error: not found: path not found in cache...can be ignored ... AFAICT this case is actually expected if a file is moved away. We need to decrease the log level.2025-06-11T12:11:15Z ERR could not delete parent id cache error="key not found"...can be ignored ... AFAICT the activitylog service tries to cleanup its cache. We need to decrease the log level.2025-06-11T12:11:30Z ERR could not remove lock file error=" ... no such file or directory"can be ignored. we need to decrease the log level to debug.2025-06-11T12:11:30Z ERR failed to handle moved away item error="error: not found: path not found in cachesame as the first err entrymeh. sorry for the noise. nothing to see here ... Thx for the really nice report and logs!
This is a great junior job.
mosslocker commentedon Jun 12, 2025
Thank you for your reply
All the best!
robin-thoene commentedon Jul 28, 2026
Hey, I would like to complete this issue. For that I would like to confirm two of my assumptions first:
revadependency. I assume it needs to be fixed inopencloud-eu/revafirst and then updated heredebugin all casesfix(activitylog): log missing parent id cache entry at debug level