New install, errors in the logs

Hello, i created ubuntu VM in proxmox, then installed new AIO,
started to create new notes and decks to test the Nextcloud, and i have notes and decks not refreching when i create new ones until F5 in the web browser.

In the logs i see this :

What can i do about it ?

Best regards :slight_smile:

NOTE: hope i will not spend more time debugging than using this.

There has been one (and only one that I can find) recent report similar to this and the cause is unclear:

I’ve been unable to reproduce it.

Looks to be session related. Do you have a reverse proxy? If so, which one and are you doing any asset caching on it?

EDIT: Can you provide the full raw stack trace from the NotesDoesNotExistException? (use the 3 dot menu to the left)

1 Like
{"reqId":"rqvCILvGVKZ6DP0VZ3mS","level":3,"time":"2024-04-16T12:34:22+00:00","remoteAddr":"192.168.1.254","user":"admin","app":"notes","method":"GET","url":"/apps/notes/notes/74147","message":"Controller failed with OCA\\Notes\\Service\\NoteDoesNotExistException","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36 Edg/124.0.0.0","version":"28.0.4.1","exception":{"Exception":"OCA\\Notes\\Service\\NoteDoesNotExistException","Message":"","Code":0,"Trace":[{"file":"/var/www/html/custom_apps/notes/lib/Service/NotesService.php","line":73,"function":"getFileById","class":"OCA\\Notes\\Service\\NotesService","type":"::","args":["md",["OC\\Files\\Node\\Folder"],74147]},{"file":"/var/www/html/custom_apps/notes/lib/Controller/NotesController.php","line":138,"function":"get","class":"OCA\\Notes\\Service\\NotesService","type":"->","args":["admin",74147]},{"file":"/var/www/html/custom_apps/notes/lib/Service/Util.php","line":26,"function":"OCA\\Notes\\Controller\\{closure}","class":"OCA\\Notes\\Controller\\NotesController","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/custom_apps/notes/lib/Controller/Helper.php","line":140,"function":"retryIfLocked","class":"OCA\\Notes\\Service\\Util","type":"::","args":[["Closure"]]},{"file":"/var/www/html/custom_apps/notes/lib/Controller/NotesController.php","line":137,"function":"handleErrorResponse","class":"OCA\\Notes\\Controller\\Helper","type":"->","args":[["Closure"]]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":230,"function":"get","class":"OCA\\Notes\\Controller\\NotesController","type":"->","args":[74147]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":137,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Notes\\Controller\\NotesController"],"get"]},{"file":"/var/www/html/lib/private/AppFramework/App.php","line":184,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Notes\\Controller\\NotesController"],"get"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":315,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Notes\\Controller\\NotesController","get",["OC\\AppFramework\\DependencyInjection\\DIContainer"],["74147","notes.notes.get"]]},{"file":"/var/www/html/lib/base.php","line":1069,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/notes/notes/74147"]},{"file":"/var/www/html/index.php","line":39,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/html/custom_apps/notes/lib/Service/NotesService.php","Line":219,"message":"Controller failed with OCA\\Notes\\Service\\NoteDoesNotExistException","exception":[],"CustomMessage":"Controller failed with OCA\\Notes\\Service\\NoteDoesNotExistException"},"id":"661eb5c08649c"}

No proxy, normal AIO install from the official guide.

I have only added dozzle and portainer inside this ubuntu VM, to acces logs and easily manage things.

An other particular thing, my data dir (REP_X_NEXTCLOUD) goes to a CIFS share (20tb disk passed through to my main Windows VM where i have Plex and media files).
The CIFS is mounted like this :

REP_X_NEXTCLOUD = /mnt/x/px-nextcloud

My /etc/fstab :

doge@d0ge:~$ sudo cat /etc/fstab
[sudo] password for doge: 
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/ubuntu-vg/ubuntu-lv during curtin installation
/dev/disk/by-id/dm-uuid-LVM-aJiTfS5e2SYIvEVHigwaR1T9IMH98ShnfkRWwCfOBscslpkZOYAzSxaic0c6bde1 / ext4 defaults 0 1
# /boot was on /dev/sda2 during curtin installation
/dev/disk/by-uuid/47b22e65-6a6b-4a2c-ae4b-98bcbd335b6d /boot ext4 defaults 0 1
/swap.img       none    swap    sw      0       0

//192.168.50.114/x      /mnt/x  cifs    credentials=/mnt/ant.smbcred,uid=1000,gid=1000,rw,mfsymlinks,seal,iocharset=utf8,file_mode=0777,dir_mode=0777      0       0
//192.168.50.114/y      /mnt/y  cifs    credentials=/mnt/ant.smbcred,uid=1000,gid=1000,rw,mfsymlinks,seal,iocharset=utf8,file_mode=0777,dir_mode=0777      0       0
//192.168.50.114/z      /mnt/z  cifs    credentials=/mnt/ant.smbcred,uid=1000,gid=1000,rw,mfsymlinks,seal,iocharset=utf8,file_mode=0777,dir_mode=0777      0       0

My docker compose file :

# https://nextcloud.com/blog/how-to-install-the-nextcloud-all-in-one-on-linux/
# https://github.com/nextcloud/all-in-one/blob/main/compose.yaml
version: '3'
services:
  nextcloud-aio-mastercontainer:
    #image: ${C_NXA_IMG_BETA}
    image: ${C_NXA_IMG}
    init: true
    restart: ${C_ALL_RESTART}
    container_name: ${C_NXA}                                  # N1 ⚠️
    hostname: ${C_NXA_HOST}
    #user: "0:0" # ${PUID}:${PGID}
    volumes:
      - nextcloud_aio_mastercontainer:/mnt/docker-aio-config  # N2 ⚠️
      - /var/run/docker.sock:/var/run/docker.sock:ro          # A1
    ports:
      - "${C_NXA_80}:80" # A2
      - "${C_NXA_8080}:8080" 
      - "${C_NXA_8443}:8443" # A2
      #- "${C_NXA_3478}:3478" # talk port
      #- "${C_NXA_11000}:11000" # apache port
    environment:    # I1
      # - AIO_DISABLE_BACKUP_SECTION=false                    # I2
      #- APACHE_PORT=11000                                     # A3
      #- APACHE_IP_BINDING=127.0.0.1 #${C_NXA_IP_WEB}          # A4
      - BORG_RETENTION_POLICY=--keep-within=7d --keep-weekly=1 --keep-monthly=1   # A5
      # - COLLABORA_SECCOMP_DISABLED=false                    # A6 
      - NEXTCLOUD_DATADIR=${REP_X_NEXTCLOUD}/data             # A7 ⚠️ : /mnt/ncdata 
      - NEXTCLOUD_MOUNT=${REP_X_NEXTCLOUD}/partage/            # A8 : /mnt/
      #- NEXTCLOUD_TRUSTED_CACERTS_DIR=${REP_X_NEXTCLOUD}/certs  # A12 : /path/to/my/cacerts
      - NEXTCLOUD_UPLOAD_LIMIT=10G                            # A9 
      - NEXTCLOUD_MAX_TIME=3600                               # A10
      - NEXTCLOUD_MEMORY_LIMIT=4096M #1024M #512M             # A11
      # - NEXTCLOUD_STARTUP_APPS=deck twofactor_totp tasks calendar contacts notes  # A13
      - NEXTCLOUD_ADDITIONAL_APKS=imagemagick ffmpeg perl # imagemagick               # A14
      - NEXTCLOUD_ADDITIONAL_PHP_EXTENSIONS=imagick         # A15
      # - NEXTCLOUD_ENABLE_DRI_DEVICE=true                    # A16 
      # - NEXTCLOUD_KEEP_DISABLED_APPS=false                  # A17
      # - TALK_PORT=3478                                      # A18
      # - WATCHTOWER_DOCKER_SOCKET_PATH=/var/run/docker.sock  # A19 ⚠️
    # 
    #security_opt: ["label:disable"]                         # A22 
    #networks:
      #nextcloud-aio:                                          # A21
        #ipv4_address: ${C_NXA_IP_AIO}
      #web:
      #  ipv4_address: ${C_NXA_IP_WEB}

  # caddy: # A23
  #   image: caddy:alpine
  #   restart: always
  #   container_name: caddy
  #   volumes:
  #     - ./Caddyfile:/etc/caddy/Caddyfile
  #     - ./certs:/certs
  #     - ./config:/config
  #     - ./data:/data
  #     - ./sites:/srv
  #   network_mode: "host"

volumes: # A20
  nextcloud_aio_mastercontainer:
    name: nextcloud_aio_mastercontainer   # # N2 ⚠️

# # A24
# # A25 
#networks:
  #web: 
    #external: true
  #nextcloud-aio:
  #  external: true
#    name: nextcloud-aio                 # N3 ⚠️ 
#    driver: bridge
#    enable_ipv6: true
#    ipam:
#      driver: default
#      config:
#        - subnet: fd12:3456:789a:2::/64 # IPv6 subnet to use

#  srv_nextcloud:
#    environment:
#      - PUID=${PUID}
#      - PGID=${PGID}
#      - UMASK=${UMASK}
#      - TZ=${TZ}
#      - REDIS_HOST=${C_RED_HOST}
#      - REDIS_HOST_PORT=${C_RED_6379}
#      - REDIS_HOST_PASSWORD=${C_RED_PWD}
#      - NEXTCLOUD_TRUSTED_DOMAINS=nx.d0ge.ovh 192.*.*.*
#      - DB_TYPE=mysql
#      - MYSQL_HOST=${C_MDB_HOST}:${C_MDB_3306}
#      - MYSQL_DATABASE=${C_NXT_DB}
#      - MYSQL_USER=${C_MYSQL_USER} #${C_NXT_DB_USER}
#      - MYSQL_PASSWORD=${C_MYSQL_PWD} #${C_NXT_DB_PWD} #
#      - NEXTCLOUD_ADMIN_USER=${C_NXT_AUSER}
#      - NEXTCLOUD_ADMIN_PASSWORD=${C_NXT_APWD}

# ------ https://github.com/nextcloud/all-in-one ------
# BK : backup : https://github.com/nextcloud/all-in-one#how-to-disable-the-backup-section
# BO : borg :  https://github.com/nextcloud/all-in-one#how-to-adjust-borgs-retention-policy
# CO : collabora : https://github.com/nextcloud/all-in-one#how-to-disable-collaboras-seccomp-feature
# RP : reverse proxy : Apache, Nginx, Cloudflare Tunnel ... - https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md
# DD : data dir : https://github.com/nextcloud/all-in-one#how-to-change-the-default-location-of-nextclouds-datadir
# DV : data drive : https://github.com/nextcloud/all-in-one#how-to-store-the-filesinstallation-on-a-separate-drive
# HD : host dir : https://github.com/nextcloud/all-in-one#how-to-allow-the-nextcloud-container-to-access-directories-on-the-host
# CD : ca certs dir : https://github.com/nextcloud/all-in-one#how-to-trust-user-defined-certification-authorities-ca
# UL : upload limit : https://github.com/nextcloud/all-in-one#how-to-adjust-the-upload-limit-for-nextcloud
# MT : max time : https://github.com/nextcloud/all-in-one#how-to-adjust-the-max-execution-time-for-nextcloud
# ML : mem limit : https://github.com/nextcloud/all-in-one#how-to-adjust-the-php-memory-limit-for-nextcloud
# FA : first start : https://github.com/nextcloud/all-in-one#how-to-change-the-nextcloud-apps-that-are-installed-on-the-first-startup
# DA : disable aditionnal apps : https://github.com/nextcloud/all-in-one#how-to-keep-disabled-apps
# AP : aditionnal packages : https://github.com/nextcloud/all-in-one#how-to-add-os-packages-permanently-to-the-nextcloud-container
# AX : aditionnal php ext : https://github.com/nextcloud/all-in-one#how-to-add-php-extensions-permanently-to-the-nextcloud-container
# DR : device drivers : https://github.com/nextcloud/all-in-one#how-to-enable-hardware-transcoding-for-nextcloud
# TP : talk port : https://github.com/nextcloud/all-in-one#how-to-adjust-the-talk-port
# CR : Caddy reverse proxy : https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md
# CX : Caddy reverse proxy (examples) : https://github.com/nextcloud/all-in-one/discussions/588
# I6 : IPV6 : https://github.com/nextcloud/all-in-one/blob/main/docker-ipv6-support.md
# -----
# N1 : NOT allowed to be changed - BREAK : AIO will not work correctly
# N2 : NOT allowed to be changed - BREAK : built-in backup 
# N3 : NOT allowed to be changed - BREAK : the created network will not be used by the other containers of AIO
# A1 : allowed : also set 'WATCHTOWER_DOCKER_SOCKET_PATH'!
# A2 : RP : allowed : can be removed when running reverse proxy
# A3 : RP : needed : when running behind a web server or reverse proxy
# A4 : RP : should : be set when running behind a web server or reverse proxy 
# A5 : BO : allows : to adjust borgs retention policy
# A6 : CO : setting this to true allows to disable Collabora's Seccomp feature
# A7 : DD : set the host directory for Nextcloud's datadir. ⚠️ do not change after installation ! 
# A8 : HD : allows the Nextcloud container to access the chosen directory on the host
# A9 : UL : can be adjusted if you need more
# A10 : MT : can be adjusted if you need more
# A11 : ML : can be adjusted if you need more
# A12 : CD : CA certificates in this directory will be trusted by the OS of the nexcloud container (Useful e.g. for LDAPS)
# A13 : FA : modify the Nextcloud apps that are installed on starting AIO the first time
# A14 : AP : add additional packages (default = imagemagick) 
# A15 : AX : add additional php extensions
# A16 : DR : enable the /dev/dri device ⚠️ if device not present container will fail to start! 
# A17 : DA : true : will keep Nextcloud apps that are disabled in the AIO interface and not uninstall them if they should be installed
# A18 : TP : adjust the port that the talk container is using
# A19 : change if the docker socket not the default '/var/run/docker.sock' ⚠️ otherwise mastercontainer updates will fail !
# A20 : DV : if you want to store the data on a different drive
# A21 : for nextcloud-aio network with ipv6-support using this file, see the network config at the bottom
# A22 : uncomment when using SELinux
# A23 : CR, CX : Caddy reverse proxy
# A24 : I6 : ipv6 for internal nextcloud-aio network : follow step 1 and 2 of (I6) then uncomment the below config
# A25 : uncomment also the networking lines of the mastercontainer above in order to actually create the network with docker-compose
# I1 : needed : when using any of the options below
# I2 : setting this to true allows to hide the backup section in the AIO interface

/var/lib/docker/volumes/nextcloud_aio_nextcloud/_data/config/config.php

<?php
$CONFIG = array (
  'one-click-instance' => true,
  'one-click-instance.user-limit' => 100,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'apps_paths' => 
  array (
    0 => 
    array (
      'path' => '/var/www/html/apps',
      'url' => '/apps',
      'writable' => false,
    ),
    1 => 
    array (
      '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' => 
  array (
    'host' => 'nextcloud-aio-redis',
    'password' => 'sdfsdfsdfsdf',
    'port' => 6379,
  ),
  'overwritehost' => 'my-domain.ovh',
  'overwriteprotocol' => 'https',
  'passwordsalt' => 'sdfsdfsdfsdf',
  'secret' => 'sdfsdfsdfsdf',
  'trusted_domains' => 
  array (
    0 => 'localhost',
    1 => 'my-domain.ovh',
  ),
  'datadirectory' => '/mnt/ncdata',
  'dbtype' => 'pgsql',
  'version' => '28.0.4.1',
  'overwrite.cli.url' => 'https://my-domain.ovh/',
  'dbname' => 'nextcloud_database',
  'dbhost' => 'nextcloud-aio-database',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'oc_nextcloud',
  'dbpassword' => 'sdfsdfsdfsdf',
  'installed' => true,
  'instanceid' => 'sdfsdfsdfsdf',
  'maintenance' => false,
  'loglevel' => '2',
  'log_type' => 'file',
  'logfile' => '/var/www/html/data/nextcloud.log',
  'log_rotate_size' => '10485760',
  'log.condition' => 
  array (
    'apps' => 
    array (
      0 => 'admin_audit',
    ),
  ),
  'preview_max_x' => '2048',
  'preview_max_y' => '2048',
  'jpeg_quality' => '60',
  'enabledPreviewProviders' => 
  array (
    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',
  ),
  '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' => true,
  'trusted_proxies' => 
  array (
    0 => '127.0.0.1',
    1 => '::1',
  ),
  'preview_imaginary_url' => 'http://nextcloud-aio-imaginary:9000',
  'preview_imaginary_key' => 'sdfsdfsdfsdf',
  'default_phone_region' => 'FR',
  'data-fingerprint' => 'sdfsdfsdfsdf',
  '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',
  'memories.gis_type' => 2,
  'defaultapp' => '',
);

One other thing i would like to do :
When my internet connexion is down (witch happens often here), i woul like to be able to acces nextcloud on the LAN.
I tryed but seems very difficult so i messed up everything then restored a VM snapshot and reverted everything back to a clean state.

And the Ubuntu VM also has Cockpit installed to facilitate linux things.

And one other thing :
On the same proxmox i have Rocky Linux VM with podman, and cloud flare tunnels for other uses.

So my network looks like this :

VM1 : Ubuntu + Nextcloud VM + docker :
my-domain.ovh = nextcloud

VM2 : Rocky linux + other containers + podman + cloudflare tunnels :
app1.my-domain.ovh
app2.my-domain.ovh
…
appN.my-domain.ovh

I have a router (GT AXE 16000) with dual wan (fiber wan (Freebox, France) + cellular wan (Deco 5G, Free-mobile, France)).
When my fiber is broken (happens often) my dual wan switches to cellular connexion.
Cloudflare tunnels makes all my podman containers awalable on the internet automaticly.
But for the Nextcloud because podman is not supported, i installed a separate Ubuntu+Docker VM with no Cloudflare tunnels.
So unfortunatly the Nextcloud goes down when my fiber is broken.
For nextcloud i did port redirections on the fiber router : 443, 8443, 80, 3478.
Would be nice to have something like Cloudflare tunnels easily working with Nextcloud.

Possibly related to my other message :
Duplicate key value violates unique constraint - :bento: Features & apps - Nextcloud community