After Cronjob UI will error "File not found" / All shares are reset
aronmgv opened this issue · 3 comments
Behaviour
After cronjob is executed UI will reset all sahres links and when still on the page it will error file not found
and returns you to the homepage.
Steps to reproduce this issue
- Basic install.
- Share file via link.
- Wait after cron job will be executed.
- UI will pop up error message
File not foud
- All shares via link are lost..
Configuration
- Docker version (type
docker --version
) : Docker version 19.03.12, build 48a66213fe - Docker compose version if applicable (type
docker-compose --version
) : docker-compose version 1.26.2, build eefe0d31 - Platform (Debian 9, Ubuntu 18.04, ...) : Debian 10
- System info (type
uname -a
) : Linux caradhras 4.19.0-9-amd64 #1 SMP Debian 4.19.118-2+deb10u1 (2020-06-07) x86_64 GNU/Linux - Include all necessary configuration files :
docker-compose.yml
,.env
, ...
docker-compose.yml:
version: "3.7"
services:
nextcloud:
container_name: nextcloud.524
image: crazymax/nextcloud:latest
restart: always
ports:
- 52480:8000
depends_on:
- postgres
- redis
volumes:
- "$PWD/nextcloud:/data"
- "/lvm/raid/public/nextcloud/data/:/data/data"
- "/lvm/raid/private/backups/:/mnt/private/backups"
- "/lvm/raid/private/data/:/mnt/private/data"
- "/lvm/raid/private/drive/:/mnt/private/drive"
- "/lvm/raid/private/media/:/mnt/private/media"
- "/lvm/raid/public/backups/:/mnt/public/backups"
- "/lvm/raid/public/drive/:/mnt/public/drive"
- "/lvm/raid/public/ftp/:/mnt/public/ftp"
labels:
- "com.ouroboros.enable=true"
- "traefik.enable=true"
- "traefik.port=8000"
- "traefik.frontend.entryPoints=https"
- "traefik.frontend.rule=Host:cloud.example.com"
- "traefik.frontend.redirect.permanent=true"
- "traefik.frontend.redirect.regex=https://(.*)/.well-known/(card|cal)dav"
- "traefik.frontend.redirect.replacement=https://$$1/remote.php/dav/"
- "traefik.backend=nextcloud.524"
- "traefik.frontend.headers.forceSTSHeader=true"
- "traefik.frontend.headers.STSSeconds=315360000"
- "traefik.frontend.headers.STSIncludeSubdomains=true"
- "traefik.frontend.headers.STSPreload=true"
environment:
- PUID=1000
- PGID=994
env_file:
- "./nextcloud.env"
postgres:
container_name: nextcloud.524.postgres
image: postgres:latest
restart: always
expose:
- 5432
volumes:
- $PWD/postgres:/var/lib/postgresql/data
environment:
- PUID=1000
- PGID=994
- POSTGRES_DB=nextcloud
- POSTGRES_USER=nextcloud
- POSTGRES_PASSWORD=****************************
adminer:
container_name: nextcloud.524.adminer.82
image: adminer
restart: always
ports:
- 52482:8080
redis:
container_name: nextcloud.524.redis
image: redis:4.0-alpine
restart: always
collabora:
container_name: nextcloud.524.collabora
image: collabora/code
restart: always
cap_add:
- MKNOD
expose:
- 9980
labels:
- "com.ouroboros.enable=true"
- "traefik.enable=true"
- "traefik.port=9980"
- "traefik.frontend.entryPoints=https"
- "traefik.frontend.rule=Host:collabora.cloud.example.com"
- "traefik.backend=nextcloud.524.collabora"
- "traefik.frontend.headers.forceSTSHeader=true"
- "traefik.frontend.headers.STSSeconds=315360000"
- "traefik.frontend.headers.STSIncludeSubdomains=true"
- "traefik.frontend.headers.STSPreload=true"
environment:
- "domain=cloud.example.com"
- "DONT_GEN_SSL_CERT=true"
- "extra_params=--disable-ssl"
#- "extra_params=--o:ssl.enable=false"
cron:
container_name: nextcloud.524.cron
image: crazymax/nextcloud:latest
restart: always
depends_on:
- nextcloud
volumes:
- "$PWD/nextcloud:/data"
- "/lvm/raid/public/nextcloud/data/:/data/data"
#command:
# - "/usr/local/bin/cron"
env_file:
- "./nextcloud.env"
environment:
- "SIDECAR_CRON=1"
- "CRON_PERIOD=*/15 * * * *"
news_updater:
container_name: nextcloud.524.news_updater
image: crazymax/nextcloud:latest
depends_on:
- nextcloud
volumes:
- "$PWD/nextcloud:/data"
- "/lvm/raid/public/nextcloud/data/:/data/data"
env_file:
- "./nextcloud.env"
environment:
- "SIDECAR_NEWSUPDATER=1"
- "NC_NEWSUPDATER_THREADS=10"
- "NC_NEWSUPDATER_TIMEOUT=300"
- "NC_NEWSUPDATER_INTERVAL=900"
- "NC_NEWSUPDATER_LOGLEVEL=error"
restart: always
nextcloud.env:
TZ=Europe/Prague
PUID=1000
PGID=994
MEMORY_LIMIT=4096M
UPLOAD_MAX_SIZE=10G
OPCACHE_MEM_SIZE=1024
APC_SHM_SIZE=1024M
REAL_IP_FROM=0.0.0.0/32
REAL_IP_HEADER=X-Forwarded-For
LOG_IP_VAR=http_x_forwarded_for
HSTS_HEADER=max-age=15768000; includeSubDomains
RP_HEADER=strict-origin
SUBDIR=
DB_TYPE=pgsql
DB_HOST=postgres
DB_NAME=nextcloud
DB_USER=nextcloud
DB_PASSWORD=****************************
Thank you, Michal
@MacGyver27
After cronjob is executed UI will reset all sahres links and when still on the page it will error file not found and returns you to the homepage.
I cannot reproduce your issue with the provided examples. I have also updated the Traefik example with Traefik v2 if you want to try it. Also your issue seems more related to Nextcloud itself than to this image. I suggest you open an issue on the official repo.
I have traefik2 as well as a separate service.. Will try to test it later again. Actually what is the purpose of that cronjob ? I see it in Nextcloud as well - complaining if it didnt run for some time.. thx.
@MacGyver27
complaining if it didnt run for some time.. thx.
You should change - "CRON_PERIOD=*/15 * * * *"
to - "CRON_PERIOD=*/5 * * * *"
. I will update the examples.