Elasticsearch in combination with external storage (smb)

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 20.0.5): 23.0.3
Operating system and version (eg, Ubuntu 20.04): Ubuntu 20.04
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4.41-4ubuntu3.10
PHP version (eg, 7.4): PHP 8.0.18

The issue you are facing:
We are trying now for days to fix this issue. If we took global informations, it’s working, but when we take ‘save login to session’
it’s not working anymore. We tried already to change the settings from external storage and elasticsearch, different configs, restarts,
checking all logs and even switching to another php and nextcloud version. But the problem is everytime the same. Even on a freshly
installed nextcloud instance the problem is always the same. Everytime when the ‘save login to session’ option is enabled, the indexing
process skips this smb folder. The second problem is maybe related to the first problem, but we don’t know it exactly. When the ‘remote
subfolder’ field has a variable like $USER from which we get the nc username, all smb folders are skipped and even the local files are
not indexing anymore then. No error occurs in the process window or logs for now. Maybe somebody here can help us with this problem.

Is this the first time you’ve seen this error? (Y/N): N

Steps to replicate it:

  1. Add an SMB Entry
  2. Set authentication to ‘Save login to session’
  3. Fill in the needed informations
  4. Save the entry
  5. Reset the index of the elasticsearch
  6. Start the indexing process
  7. Now the elasticsearch is not processing the added SMB

Second Problem:

  1. Same Steps as above
  2. But in the field ‘remote subfolder’ insert a variable like $USER (to index user specific folders)
  3. With global informations, it’s been indexing, but without not

The output of your Nextcloud log in Admin > Logging:

[files_fulltextsearch] Warnung: Exception while improving searchresult:  - trace: [{"file":"\/var\/www\/nextcloud\/apps\/files_fulltextsearch\/lib\/Service\/SearchService.php","line":275,"function":"getFileFromId","class":"OCA\\Files_FullTextSearch\\Service\\FilesService","type":"->"},{"file":"\/var\/www\/nextcloud\/apps\/files_fulltextsearch\/lib\/Service\/SearchService.php","line":235,"function":"setDocumentInfo","class":"OCA\\Files_FullTextSearch\\Service\\SearchService","type":"->"},{"file":"\/var\/www\/nextcloud\/apps\/files_fulltextsearch\/lib\/Provider\/FilesProvider.php","line":362,"function":"improveSearchResult","class":"OCA\\Files_FullTextSearch\\Service\\SearchService","type":"->"},{"file":"\/var\/www\/nextcloud\/apps\/fulltextsearch\/lib\/Service\/SearchService.php","line":203,"function":"improveSearchResult","class":"OCA\\Files_FullTextSearch\\Provider\\FilesProvider","type":"->"},{"file":"\/var\/www\/nextcloud\/apps\/fulltextsearch\/lib\/Service\/SearchService.php","line":166,"function":"searchFromProviders","class":"OCA\\FullTextSearch\\Service\\SearchService","type":"->"},{"file":"\/var\/www\/nextcloud\/apps\/fulltextsearch\/lib\/Search\/UnifiedSearchProvider.php","line":139,"function":"search","class":"OCA\\FullTextSearch\\Service\\SearchService","type":"->"},{"file":"\/var\/www\/nextcloud\/lib\/private\/Search\/SearchComposer.php","line":162,"function":"search","class":"OCA\\FullTextSearch\\Search\\UnifiedSearchProvider","type":"->"},{"file":"\/var\/www\/nextcloud\/core\/Controller\/UnifiedSearchController.php","line":115,"function":"search","class":"OC\\Search\\SearchComposer","type":"->"},{"file":"\/var\/www\/nextcloud\/lib\/private\/AppFramework\/Http\/Dispatcher.php","line":217,"function":"search","class":"OC\\Core\\Controller\\UnifiedSearchController","type":"->"},{"file":"\/var\/www\/nextcloud\/lib\/private\/AppFramework\/Http\/Dispatcher.php","line":126,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"\/var\/www\/nextcloud\/lib\/private\/AppFramework\/App.php","line":157,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"\/var\/www\/nextcloud\/lib\/private\/Route\/Router.php","line":302,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"\/var\/www\/nextcloud\/ocs\/v1.php","line":62,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"\/var\/www\/nextcloud\/ocs\/v2.php","line":23,"args":["\/var\/www\/nextcloud\/ocs\/v1.php"],"function":"require_once"}]

GET /ocs/v2.php/search/providers/fulltextsearch/search?term=test&from=%2Fapps%2Ffiles%2F%3Fdir%3D%2FSchulveranstaltungen%26fileid%3D4077
from *.*.*.* by ****** at 2022-04-26T10:44:37+02:00

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'passwordsalt' => '*****',
  'secret' => '*****',
  'trusted_domains' =>
  array (
    0 => 'localhost',
    1 => '*******',
    2 => 'nextcloud',
    3 => '********',
  ),
  'datadirectory' => '/mnt/ncdata',
  'dbtype' => 'pgsql',
  'version' => '23.0.3.2',
  'overwrite.cli.url' => '**********',
  'htaccess.RewriteBase' => '/',
  'dbname' => 'nextcloud_db',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'ncadmin',
  'dbpassword' => '***************',
  'installed' => true,
  'instanceid' => '**********',
  'upgrade.disable-web' => true,
  'log_type' => 'file',
  'logfile' => '/var/log/nextcloud/nextcloud.log',
  'loglevel' => '2',
  'log.condition' =>
  array (
    'apps' =>
    array (
      0 => 'admin_audit',
    ),
  ),
  'mail_smtpmode' => 'smtp',
  'remember_login_cookie_lifetime' => '1800',
  'log_rotate_size' => '10485760',
  'trashbin_retention_obligation' => 'auto, 60',
  'versions_retention_obligation' => 'auto, 180',
  'activity_expire_days' => '120',
  'simpleSignUpLink.shown' => false,
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'filelocking.enabled' => true,
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' =>
  array (
    'host' => '/var/run/redis/redis-server.sock',
    'port' => 0,
    'timeout' => 0.5,
    'dbindex' => 0,
    'password' => '*******************',
  ),
  'default_phone_region' => 'de',
  'logtimezone' => 'Europe/Berlin',
  'ldapProviderFactory' => 'OCA\\User_LDAP\\LDAPProviderFactory',
  'maintenance' => false,
  'mail_from_address' => 'nc',
  'mail_sendmailmode' => 'smtp',
  'mail_domain' => '**********',
  'mail_smtphost' => '***********',
  'mail_smtpport' => '25',
  'app_install_overwrite' =>
  array (
    0 => 'mindmap_app',
  ),
);

The output of your Apache/nginx/system log in /var/log/____:

syslog
Apr 26 08:00:01 nc CRON[200548]: (root) CMD (which zfs-auto-snapshot > /dev/null || exit 0 ; zfs-auto-snapshot --quiet --syslog --label=frequent --keep=4 //)
Apr 26 08:00:01 nc CRON[200549]: (www-data) CMD (php -f /var/www/nextcloud/cron.php > /dev/null 2>&1)
Apr 26 08:00:01 nc zfs-auto-snap: @zfs-auto-snap_frequent-2022-04-26-0800, 1 created, 1 destroyed, 0 warnings.
Apr 26 08:00:01 nc zed: eid=1389 class=history_event pool_guid=0x415CFD74EE74D815  
Apr 26 08:00:01 nc zed: eid=1390 class=history_event pool_guid=0x415CFD74EE74D815  
Apr 26 08:00:02 nc zed: eid=1391 class=history_event pool_guid=0x415CFD74EE74D815  
Apr 26 08:05:01 nc CRON[200686]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Apr 26 08:05:01 nc CRON[200687]: (www-data) CMD (php -f /var/www/nextcloud/cron.php > /dev/null 2>&1)
Apr 26 08:09:00 nc systemd[1]: Starting Clean php session files...
Apr 26 08:09:00 nc systemd[1]: phpsessionclean.service: Succeeded.
Apr 26 08:09:00 nc systemd[1]: Finished Clean php session files.
Apr 26 08:09:01 nc CRON[200782]: (root) CMD (  [ -x /usr/lib/php/sessionclean ] && if [ ! -d /run/systemd/system ]; then /usr/lib/php/sessionclean; fi)
Apr 26 08:10:01 nc CRON[200788]: (www-data) CMD (php -f /var/www/nextcloud/cron.php > /dev/null 2>&1)
Apr 26 08:15:01 nc CRON[200811]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Apr 26 08:15:01 nc CRON[200812]: (root) CMD (which zfs-auto-snapshot > /dev/null || exit 0 ; zfs-auto-snapshot --quiet --syslog --label=frequent --keep=4 //)
Apr 26 08:15:01 nc CRON[200813]: (www-data) CMD (php -f /var/www/nextcloud/cron.php > /dev/null 2>&1)
Apr 26 08:15:01 nc zfs-auto-snap: @zfs-auto-snap_frequent-2022-04-26-0815, 1 created, 1 destroyed, 0 warnings.
Apr 26 08:15:01 nc zed: eid=1392 class=history_event pool_guid=0x415CFD74EE74D815  
Apr 26 08:15:01 nc zed: eid=1393 class=history_event pool_guid=0x415CFD74EE74D815  
Apr 26 08:15:01 nc zed: eid=1394 class=history_event pool_guid=0x415CFD74EE74D815  
Apr 26 08:17:01 nc CRON[200937]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Apr 26 08:17:01 nc zfs-auto-snap: @zfs-auto-snap_hourly-2022-04-26-0817, 1 created, 1 destroyed, 0 warnings.
Apr 26 08:17:01 nc zed: eid=1395 class=history_event pool_guid=0x415CFD74EE74D815  
Apr 26 08:17:01 nc zed: eid=1396 class=history_event pool_guid=0x415CFD74EE74D815  
Apr 26 08:17:01 nc zed: eid=1397 class=history_event pool_guid=0x415CFD74EE74D815  
Apr 26 08:20:01 nc CRON[201114]: (www-data) CMD (php -f /var/www/nextcloud/cron.php > /dev/null 2>&1)
Apr 26 08:25:01 nc CRON[201138]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Apr 26 08:25:01 nc CRON[201139]: (www-data) CMD (php -f /var/www/nextcloud/cron.php > /dev/null 2>&1)
Apr 26 08:30:01 nc CRON[201164]: (root) CMD (which zfs-auto-snapshot > /dev/null || exit 0 ; zfs-auto-snapshot --quiet --syslog --label=frequent --keep=4 //)
Apr 26 08:30:01 nc CRON[201167]: (www-data) CMD (php -f /var/www/nextcloud/cron.php > /dev/null 2>&1)
Apr 26 08:30:01 nc zfs-auto-snap: @zfs-auto-snap_frequent-2022-04-26-0830, 1 created, 1 destroyed, 0 warnings.
Apr 26 08:30:01 nc zed: eid=1398 class=history_event pool_guid=0x415CFD74EE74D815  
Apr 26 08:30:01 nc Hyper-V VSS: VSS: op=CHECK HOT BACKUP
Apr 26 08:30:01 nc zed: eid=1399 class=history_event pool_guid=0x415CFD74EE74D815  
Apr 26 08:30:02 nc zed: eid=1400 class=history_event pool_guid=0x415CFD74EE74D815  
Apr 26 08:35:01 nc CRON[201304]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Apr 26 08:35:01 nc CRON[201305]: (www-data) CMD (php -f /var/www/nextcloud/cron.php > /dev/null 2>&1)
Apr 26 08:39:00 nc systemd[1]: Starting Clean php session files...
Apr 26 08:39:00 nc systemd[1]: phpsessionclean.service: Succeeded.
Apr 26 08:39:00 nc systemd[1]: Finished Clean php session files.
Apr 26 08:39:01 nc CRON[201403]: (root) CMD (  [ -x /usr/lib/php/sessionclean ] && if [ ! -d /run/systemd/system ]; then /usr/lib/php/sessionclean; fi)
Apr 26 08:40:01 nc CRON[201411]: (www-data) CMD (php -f /var/www/nextcloud/cron.php > /dev/null 2>&1)
Apr 26 08:45:01 nc CRON[201438]: (root) CMD (which zfs-auto-snapshot > /dev/null || exit 0 ; zfs-auto-snapshot --quiet --syslog --label=frequent --keep=4 //)
Apr 26 08:45:01 nc CRON[201439]: (www-data) CMD (php -f /var/www/nextcloud/cron.php > /dev/null 2>&1)
Apr 26 08:45:01 nc CRON[201445]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Apr 26 08:45:01 nc zfs-auto-snap: @zfs-auto-snap_frequent-2022-04-26-0845, 1 created, 1 destroyed, 0 warnings.
Apr 26 08:45:01 nc zed: eid=1401 class=history_event pool_guid=0x415CFD74EE74D815  
Apr 26 08:45:01 nc zed: eid=1402 class=history_event pool_guid=0x415CFD74EE74D815  
Apr 26 08:45:02 nc zed: eid=1403 class=history_event pool_guid=0x415CFD74EE74D815  
Apr 26 08:50:01 nc CRON[201581]: (www-data) CMD (php -f /var/www/nextcloud/cron.php > /dev/null 2>&1)
Apr 26 08:55:01 nc CRON[201606]: (www-data) CMD (php -f /var/www/nextcloud/cron.php > /dev/null 2>&1)
Apr 26 08:55:01 nc CRON[201607]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Apr 26 09:00:01 nc CRON[201643]: (root) CMD (which zfs-auto-snapshot > /dev/null || exit 0 ; zfs-auto-snapshot --quiet --syslog --label=frequent --keep=4 //)
Apr 26 09:00:01 nc CRON[201644]: (www-data) CMD (php -f /var/www/nextcloud/cron.php > /dev/null 2>&1)
Apr 26 09:00:01 nc zfs-auto-snap: @zfs-auto-snap_frequent-2022-04-26-0900, 1 created, 1 destroyed, 0 warnings.
Apr 26 09:00:01 nc zed: eid=1404 class=history_event pool_guid=0x415CFD74EE74D815  
Apr 26 09:00:02 nc zed: eid=1405 class=history_event pool_guid=0x415CFD74EE74D815  
Apr 26 09:00:02 nc zed: eid=1406 class=history_event pool_guid=0x415CFD74EE74D815  
Apr 26 09:05:01 nc CRON[201797]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Apr 26 09:05:01 nc CRON[201798]: (www-data) CMD (php -f /var/www/nextcloud/cron.php > /dev/null 2>&1)
Apr 26 09:09:00 nc systemd[1]: Starting Clean php session files...
Apr 26 09:09:01 nc systemd[1]: phpsessionclean.service: Succeeded.
Apr 26 09:09:01 nc systemd[1]: Finished Clean php session files.
Apr 26 09:09:01 nc CRON[201894]: (root) CMD (  [ -x /usr/lib/php/sessionclean ] && if [ ! -d /run/systemd/system ]; then /usr/lib/php/sessionclean; fi)
Apr 26 09:10:01 nc CRON[201899]: (www-data) CMD (php -f /var/www/nextcloud/cron.php > /dev/null 2>&1)
Apr 26 09:11:10 nc systemd[1]: fwupd.service: Succeeded.
Apr 26 09:15:01 nc CRON[201934]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Apr 26 09:15:01 nc CRON[201936]: (root) CMD (which zfs-auto-snapshot > /dev/null || exit 0 ; zfs-auto-snapshot --quiet --syslog --label=frequent --keep=4 //)
Apr 26 09:15:01 nc CRON[201937]: (www-data) CMD (php -f /var/www/nextcloud/cron.php > /dev/null 2>&1)
Apr 26 09:15:01 nc zfs-auto-snap: @zfs-auto-snap_frequent-2022-04-26-0915, 1 created, 1 destroyed, 0 warnings.
Apr 26 09:15:02 nc zed: eid=1407 class=history_event pool_guid=0x415CFD74EE74D815  
Apr 26 09:15:02 nc zed: eid=1408 class=history_event pool_guid=0x415CFD74EE74D815  
Apr 26 09:15:02 nc zed: eid=1409 class=history_event pool_guid=0x415CFD74EE74D815  
Apr 26 09:17:01 nc CRON[202077]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Apr 26 09:17:01 nc zfs-auto-snap: @zfs-auto-snap_hourly-2022-04-26-0917, 1 created, 1 destroyed, 0 warnings.
Apr 26 09:17:01 nc zed: eid=1410 class=history_event pool_guid=0x415CFD74EE74D815  
Apr 26 09:17:02 nc zed: eid=1411 class=history_event pool_guid=0x415CFD74EE74D815  
Apr 26 09:17:02 nc zed: eid=1412 class=history_event pool_guid=0x415CFD74EE74D815  
Apr 26 09:20:01 nc CRON[202214]: (www-data) CMD (php -f /var/www/nextcloud/cron.php > /dev/null 2>&1)
Apr 26 09:25:01 nc CRON[202262]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Apr 26 09:25:01 nc CRON[202263]: (www-data) CMD (php -f /var/www/nextcloud/cron.php > /dev/null 2>&1)
Apr 26 09:30:01 nc CRON[202296]: (root) CMD (which zfs-auto-snapshot > /dev/null || exit 0 ; zfs-auto-snapshot --quiet --syslog --label=frequent --keep=4 //)
Apr 26 09:30:01 nc CRON[202297]: (www-data) CMD (php -f /var/www/nextcloud/cron.php > /dev/null 2>&1)
Apr 26 09:30:02 nc zfs-auto-snap: @zfs-auto-snap_frequent-2022-04-26-0930, 1 created, 1 destroyed, 0 warnings.
Apr 26 09:30:02 nc zed: eid=1413 class=history_event pool_guid=0x415CFD74EE74D815  
Apr 26 09:30:02 nc zed: eid=1414 class=history_event pool_guid=0x415CFD74EE74D815  
Apr 26 09:30:02 nc zed: eid=1415 class=history_event pool_guid=0x415CFD74EE74D815  
Apr 26 09:35:01 nc CRON[202452]: (www-data) CMD (php -f /var/www/nextcloud/cron.php > /dev/null 2>&1)
Apr 26 09:35:01 nc CRON[202453]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Apr 26 09:39:01 nc systemd[1]: Starting Clean php session files...
Apr 26 09:39:01 nc systemd[1]: phpsessionclean.service: Succeeded.
Apr 26 09:39:01 nc systemd[1]: Finished Clean php session files.
Apr 26 09:39:01 nc CRON[202557]: (root) CMD (  [ -x /usr/lib/php/sessionclean ] && if [ ! -d /run/systemd/system ]; then /usr/lib/php/sessionclean; fi)
Apr 26 09:40:02 nc CRON[202608]: (www-data) CMD (php -f /var/www/nextcloud/cron.php > /dev/null 2>&1)
Apr 26 09:45:01 nc CRON[202645]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Apr 26 09:45:01 nc CRON[202646]: (root) CMD (which zfs-auto-snapshot > /dev/null || exit 0 ; zfs-auto-snapshot --quiet --syslog --label=frequent --keep=4 //)
Apr 26 09:45:01 nc CRON[202647]: (www-data) CMD (php -f /var/www/nextcloud/cron.php > /dev/null 2>&1)
Apr 26 09:45:01 nc zfs-auto-snap: @zfs-auto-snap_frequent-2022-04-26-0945, 1 created, 1 destroyed, 0 warnings.
Apr 26 09:45:01 nc zed: eid=1416 class=history_event pool_guid=0x415CFD74EE74D815  
Apr 26 09:45:01 nc zed: eid=1417 class=history_event pool_guid=0x415CFD74EE74D815  
Apr 26 09:45:01 nc zed: eid=1418 class=history_event pool_guid=0x415CFD74EE74D815  
Apr 26 09:50:01 nc CRON[202831]: (www-data) CMD (php -f /var/www/nextcloud/cron.php > /dev/null 2>&1)
Apr 26 09:55:01 nc CRON[202873]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Apr 26 09:55:01 nc CRON[202874]: (www-data) CMD (php -f /var/www/nextcloud/cron.php > /dev/null 2>&1)
Apr 26 10:00:01 nc CRON[203044]: (root) CMD (which zfs-auto-snapshot > /dev/null || exit 0 ; zfs-auto-snapshot --quiet --syslog --label=frequent --keep=4 //)
Apr 26 10:00:01 nc CRON[203048]: (www-data) CMD (php -f /var/www/nextcloud/cron.php > /dev/null 2>&1)
Apr 26 10:00:01 nc zfs-auto-snap: @zfs-auto-snap_frequent-2022-04-26-1000, 1 created, 1 destroyed, 0 warnings.
Apr 26 10:00:01 nc zed: eid=1419 class=history_event pool_guid=0x415CFD74EE74D815  
Apr 26 10:00:01 nc zed: eid=1420 class=history_event pool_guid=0x415CFD74EE74D815  
Apr 26 10:00:02 nc zed: eid=1421 class=history_event pool_guid=0x415CFD74EE74D815  
Apr 26 10:04:25 nc systemd[1]: session-1.scope: Succeeded.
Apr 26 10:04:35 nc systemd[1]: Stopping User Manager for UID 1000...
Apr 26 10:04:35 nc systemd[1863]: Stopped target Main User Target.
Apr 26 10:04:35 nc systemd[1863]: Stopped target Basic System.
Apr 26 10:04:35 nc systemd[1863]: Stopped target Paths.
Apr 26 10:04:35 nc systemd[1863]: Stopped target Sockets.
Apr 26 10:04:35 nc systemd[1863]: Stopped target Timers.
Apr 26 10:04:35 nc systemd[1863]: dbus.socket: Succeeded.
Apr 26 10:04:35 nc systemd[1863]: Closed D-Bus User Message Bus Socket.
Apr 26 10:04:35 nc systemd[1863]: dirmngr.socket: Succeeded.
Apr 26 10:04:35 nc systemd[1863]: Closed GnuPG network certificate management daemon.
Apr 26 10:04:35 nc systemd[1863]: gpg-agent-browser.socket: Succeeded.
Apr 26 10:04:35 nc systemd[1863]: Closed GnuPG cryptographic agent and passphrase cache (access for web browsers).
Apr 26 10:04:35 nc systemd[1863]: gpg-agent-extra.socket: Succeeded.
Apr 26 10:04:35 nc systemd[1863]: Closed GnuPG cryptographic agent and passphrase cache (restricted).
Apr 26 10:04:35 nc systemd[1863]: gpg-agent-ssh.socket: Succeeded.
Apr 26 10:04:35 nc systemd[1863]: Closed GnuPG cryptographic agent (ssh-agent emulation).
Apr 26 10:04:35 nc systemd[1863]: gpg-agent.socket: Succeeded.
Apr 26 10:04:35 nc systemd[1863]: Closed GnuPG cryptographic agent and passphrase cache.
Apr 26 10:04:35 nc systemd[1863]: pk-debconf-helper.socket: Succeeded.
Apr 26 10:04:35 nc systemd[1863]: Closed debconf communication socket.
Apr 26 10:04:35 nc systemd[1863]: snapd.session-agent.socket: Succeeded.
Apr 26 10:04:35 nc systemd[1863]: Closed REST API socket for snapd user session agent.
Apr 26 10:04:35 nc systemd[1863]: Reached target Shutdown.
Apr 26 10:04:35 nc systemd[1863]: systemd-exit.service: Succeeded.
Apr 26 10:04:35 nc systemd[1863]: Finished Exit the Session.
Apr 26 10:04:35 nc systemd[1863]: Reached target Exit the Session.
Apr 26 10:04:35 nc systemd[1]: user@1000.service: Succeeded.
Apr 26 10:04:35 nc systemd[1]: Stopped User Manager for UID 1000.
Apr 26 10:04:35 nc systemd[1]: Stopping User Runtime Directory /run/user/1000...
Apr 26 10:04:35 nc systemd[1]: run-user-1000.mount: Succeeded.
Apr 26 10:04:35 nc systemd[1]: user-runtime-dir@1000.service: Succeeded.
Apr 26 10:04:35 nc systemd[1]: Stopped User Runtime Directory /run/user/1000.
Apr 26 10:04:35 nc systemd[1]: Removed slice User Slice of UID 1000.
Apr 26 10:05:01 nc CRON[203469]: (www-data) CMD (php -f /var/www/nextcloud/cron.php > /dev/null 2>&1)
Apr 26 10:05:01 nc CRON[203470]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Apr 26 10:08:41 nc systemd[1]: Starting Message of the Day...
Apr 26 10:08:42 nc 50-motd-news[203634]:  * Super-optimized for small spaces - read how we shrank the memory
Apr 26 10:08:42 nc 50-motd-news[203634]:    footprint of MicroK8s to make it the smallest full K8s around.
Apr 26 10:08:42 nc 50-motd-news[203634]:    https://ubuntu.com/blog/microk8s-memory-optimisation
Apr 26 10:08:42 nc systemd[1]: motd-news.service: Succeeded.
Apr 26 10:08:42 nc systemd[1]: Finished Message of the Day.
Apr 26 10:09:01 nc CRON[203654]: (root) CMD (  [ -x /usr/lib/php/sessionclean ] && if [ ! -d /run/systemd/system ]; then /usr/lib/php/sessionclean; fi)
Apr 26 10:09:01 nc systemd[1]: Starting Clean php session files...
Apr 26 10:09:01 nc systemd[1]: phpsessionclean.service: Succeeded.
Apr 26 10:09:01 nc systemd[1]: Finished Clean php session files.
Apr 26 10:10:01 nc CRON[203762]: (www-data) CMD (php -f /var/www/nextcloud/cron.php > /dev/null 2>&1)
Apr 26 10:14:15 nc systemd[1]: Created slice User Slice of UID 1000.
Apr 26 10:14:15 nc systemd[1]: Starting User Runtime Directory /run/user/1000...
Apr 26 10:14:15 nc systemd[1]: Finished User Runtime Directory /run/user/1000.
Apr 26 10:14:15 nc systemd[1]: Starting User Manager for UID 1000...
Apr 26 10:14:15 nc systemd[203850]: Reached target Paths.
Apr 26 10:14:15 nc systemd[203850]: Reached target Timers.
Apr 26 10:14:15 nc systemd[203850]: Starting D-Bus User Message Bus Socket.
Apr 26 10:14:15 nc systemd[203850]: Listening on GnuPG network certificate management daemon.
Apr 26 10:14:15 nc systemd[203850]: Listening on GnuPG cryptographic agent and passphrase cache (access for web browsers).
Apr 26 10:14:15 nc systemd[203850]: Listening on GnuPG cryptographic agent and passphrase cache (restricted).
Apr 26 10:14:15 nc systemd[203850]: Listening on GnuPG cryptographic agent (ssh-agent emulation).
Apr 26 10:14:15 nc systemd[203850]: Listening on GnuPG cryptographic agent and passphrase cache.
Apr 26 10:14:15 nc systemd[203850]: Listening on debconf communication socket.
Apr 26 10:14:15 nc systemd[203850]: Listening on REST API socket for snapd user session agent.
Apr 26 10:14:15 nc systemd[203850]: Listening on D-Bus User Message Bus Socket.
Apr 26 10:14:15 nc systemd[203850]: Reached target Sockets.
Apr 26 10:14:15 nc systemd[203850]: Reached target Basic System.
Apr 26 10:14:15 nc systemd[203850]: Reached target Main User Target.
Apr 26 10:14:15 nc systemd[203850]: Startup finished in 69ms.
Apr 26 10:14:15 nc systemd[1]: Started User Manager for UID 1000.
Apr 26 10:14:15 nc systemd[1]: Started Session 2368 of user ncadmin.
Apr 26 10:15:01 nc CRON[204043]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Apr 26 10:15:01 nc CRON[204045]: (root) CMD (which zfs-auto-snapshot > /dev/null || exit 0 ; zfs-auto-snapshot --quiet --syslog --label=frequent --keep=4 //)
Apr 26 10:15:01 nc CRON[204046]: (www-data) CMD (php -f /var/www/nextcloud/cron.php > /dev/null 2>&1)
Apr 26 10:15:01 nc zfs-auto-snap: @zfs-auto-snap_frequent-2022-04-26-1015, 1 created, 1 destroyed, 0 warnings.
Apr 26 10:15:01 nc zed: eid=1422 class=history_event pool_guid=0x415CFD74EE74D815  
Apr 26 10:15:02 nc zed: eid=1423 class=history_event pool_guid=0x415CFD74EE74D815  
Apr 26 10:15:02 nc zed: eid=1424 class=history_event pool_guid=0x415CFD74EE74D815  
Apr 26 10:17:01 nc CRON[204215]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Apr 26 10:17:01 nc zfs-auto-snap: @zfs-auto-snap_hourly-2022-04-26-1017, 1 created, 1 destroyed, 0 warnings.
Apr 26 10:17:01 nc zed: eid=1425 class=history_event pool_guid=0x415CFD74EE74D815  
Apr 26 10:17:02 nc zed: eid=1426 class=history_event pool_guid=0x415CFD74EE74D815  
Apr 26 10:17:02 nc zed: eid=1427 class=history_event pool_guid=0x415CFD74EE74D815  
Apr 26 10:18:27 nc snapd[1156]: storehelpers.go:721: cannot refresh: snap has no updates available: "core18", "core20", "lxd", "snapd"
Apr 26 10:18:27 nc snapd[1156]: autorefresh.go:539: auto-refresh: all snaps are up-to-date
Apr 26 10:20:01 nc CRON[204454]: (www-data) CMD (php -f /var/www/nextcloud/cron.php > /dev/null 2>&1)
Apr 26 10:25:01 nc CRON[205166]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Apr 26 10:25:01 nc CRON[205167]: (www-data) CMD (php -f /var/www/nextcloud/cron.php > /dev/null 2>&1)
Apr 26 10:30:01 nc CRON[205419]: (root) CMD (which zfs-auto-snapshot > /dev/null || exit 0 ; zfs-auto-snapshot --quiet --syslog --label=frequent --keep=4 //)
Apr 26 10:30:01 nc CRON[205420]: (www-data) CMD (php -f /var/www/nextcloud/cron.php > /dev/null 2>&1)
Apr 26 10:30:01 nc zfs-auto-snap: @zfs-auto-snap_frequent-2022-04-26-1030, 1 created, 1 destroyed, 0 warnings.
Apr 26 10:30:01 nc zed: eid=1428 class=history_event pool_guid=0x415CFD74EE74D815  
Apr 26 10:30:01 nc zed: eid=1429 class=history_event pool_guid=0x415CFD74EE74D815  
Apr 26 10:30:02 nc zed: eid=1430 class=history_event pool_guid=0x415CFD74EE74D815  
Apr 26 10:30:05 nc Hyper-V VSS: VSS: op=CHECK HOT BACKUP
Apr 26 10:35:01 nc CRON[206029]: (www-data) CMD (php -f /var/www/nextcloud/cron.php > /dev/null 2>&1)
Apr 26 10:35:01 nc CRON[206030]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Apr 26 10:39:00 nc systemd[1]: Starting Clean php session files...
Apr 26 10:39:00 nc systemd[1]: phpsessionclean.service: Succeeded.
Apr 26 10:39:00 nc systemd[1]: Finished Clean php session files.
Apr 26 10:39:01 nc CRON[206284]: (root) CMD (  [ -x /usr/lib/php/sessionclean ] && if [ ! -d /run/systemd/system ]; then /usr/lib/php/sessionclean; fi)
Apr 26 10:40:01 nc CRON[206436]: (www-data) CMD (php -f /var/www/nextcloud/cron.php > /dev/null 2>&1)
Apr 26 10:45:01 nc CRON[207359]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Apr 26 10:45:01 nc CRON[207360]: (root) CMD (which zfs-auto-snapshot > /dev/null || exit 0 ; zfs-auto-snapshot --quiet --syslog --label=frequent --keep=4 //)
Apr 26 10:45:01 nc CRON[207361]: (www-data) CMD (php -f /var/www/nextcloud/cron.php > /dev/null 2>&1)
Apr 26 10:45:01 nc zfs-auto-snap: @zfs-auto-snap_frequent-2022-04-26-1045, 1 created, 1 destroyed, 0 warnings.
Apr 26 10:45:01 nc zed: eid=1431 class=history_event pool_guid=0x415CFD74EE74D815  
Apr 26 10:45:01 nc zed: eid=1432 class=history_event pool_guid=0x415CFD74EE74D815  
Apr 26 10:45:01 nc zed: eid=1433 class=history_event pool_guid=0x415CFD74EE74D815  
Apr 26 10:50:01 nc CRON[207539]: (www-data) CMD (php -f /var/www/nextcloud/cron.php > /dev/null 2>&1)
Apr 26 10:55:01 nc CRON[207719]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Apr 26 10:55:01 nc CRON[207721]: (www-data) CMD (php -f /var/www/nextcloud/cron.php > /dev/null 2>&1)
Apr 26 11:00:01 nc CRON[207808]: (root) CMD (which zfs-auto-snapshot > /dev/null || exit 0 ; zfs-auto-snapshot --quiet --syslog --label=frequent --keep=4 //)
Apr 26 11:00:01 nc CRON[207813]: (www-data) CMD (php -f /var/www/nextcloud/cron.php > /dev/null 2>&1)
Apr 26 11:00:01 nc zfs-auto-snap: @zfs-auto-snap_frequent-2022-04-26-1100, 1 created, 1 destroyed, 0 warnings.
Apr 26 11:00:01 nc zed: eid=1434 class=history_event pool_guid=0x415CFD74EE74D815  
Apr 26 11:00:02 nc zed: eid=1435 class=history_event pool_guid=0x415CFD74EE74D815  
Apr 26 11:00:02 nc zed: eid=1436 class=history_event pool_guid=0x415CFD74EE74D815  
Apr 26 11:05:01 nc CRON[208450]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Apr 26 11:05:01 nc CRON[208451]: (www-data) CMD (php -f /var/www/nextcloud/cron.php > /dev/null 2>&1)
Apr 26 11:09:01 nc systemd[1]: Starting Clean php session files...
Apr 26 11:09:01 nc systemd[1]: phpsessionclean.service: Succeeded.
Apr 26 11:09:01 nc systemd[1]: Finished Clean php session files.
Apr 26 11:09:02 nc CRON[208914]: (root) CMD (  [ -x /usr/lib/php/sessionclean ] && if [ ! -d /run/systemd/system ]; then /usr/lib/php/sessionclean; fi)
Apr 26 11:10:01 nc CRON[208928]: (www-data) CMD (php -f /var/www/nextcloud/cron.php > /dev/null 2>&1)
Apr 26 11:15:01 nc CRON[209008]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Apr 26 11:15:01 nc CRON[209009]: (root) CMD (which zfs-auto-snapshot > /dev/null || exit 0 ; zfs-auto-snapshot --quiet --syslog --label=frequent --keep=4 //)
Apr 26 11:15:01 nc CRON[209012]: (www-data) CMD (php -f /var/www/nextcloud/cron.php > /dev/null 2>&1)
Apr 26 11:15:01 nc zfs-auto-snap: @zfs-auto-snap_frequent-2022-04-26-1115, 1 created, 1 destroyed, 0 warnings.
Apr 26 11:15:01 nc zed: eid=1437 class=history_event pool_guid=0x415CFD74EE74D815  
Apr 26 11:15:01 nc zed: eid=1438 class=history_event pool_guid=0x415CFD74EE74D815  
Apr 26 11:15:01 nc zed: eid=1439 class=history_event pool_guid=0x415CFD74EE74D815  
Apr 26 11:17:01 nc CRON[209165]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Apr 26 11:17:01 nc zfs-auto-snap: @zfs-auto-snap_hourly-2022-04-26-1117, 1 created, 1 destroyed, 0 warnings.
Apr 26 11:17:01 nc zed: eid=1440 class=history_event pool_guid=0x415CFD74EE74D815  
Apr 26 11:17:01 nc zed: eid=1441 class=history_event pool_guid=0x415CFD74EE74D815  
Apr 26 11:17:01 nc zed: eid=1442 class=history_event pool_guid=0x415CFD74EE74D815  
Apr 26 11:20:01 nc CRON[209370]: (www-data) CMD (php -f /var/www/nextcloud/cron.php > /dev/null 2>&1)
Apr 26 11:25:01 nc CRON[209432]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Apr 26 11:25:01 nc CRON[209433]: (www-data) CMD (php -f /var/www/nextcloud/cron.php > /dev/null 2>&1)
Apr 26 11:30:01 nc CRON[209500]: (root) CMD (which zfs-auto-snapshot > /dev/null || exit 0 ; zfs-auto-snapshot --quiet --syslog --label=frequent --keep=4 //)
Apr 26 11:30:01 nc CRON[209504]: (www-data) CMD (php -f /var/www/nextcloud/cron.php > /dev/null 2>&1)
Apr 26 11:30:01 nc zfs-auto-snap: @zfs-auto-snap_frequent-2022-04-26-1130, 1 created, 1 destroyed, 0 warnings.
Apr 26 11:30:02 nc zed: eid=1443 class=history_event pool_guid=0x415CFD74EE74D815  
Apr 26 11:30:02 nc zed: eid=1444 class=history_event pool_guid=0x415CFD74EE74D815  
Apr 26 11:30:02 nc zed: eid=1445 class=history_event pool_guid=0x415CFD74EE74D815  

Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.

[index] Fehler: fwrite(): Argument #1 ($stream) must be of type resource, bool given in file ‘/var/www/nextcloud/lib/private/Files/Storage/Common.php’ line 208

PUT /apps/files_mindmap/ajax/savefile
from ... by ********* at 2022-04-26T10:21:55+02:00

This might be the culprit… conflicts between elasticsearch and Nextcloud. Check against each app’s github issues. There are quite a few possibilities on just elasticsearch app issues.

  • Which elasticsearch apps are you running?
  • Perhaps disabling the mindmap app will help if it is generating an error. Your output here seems heavily truncated. You can also check against their github repository just in case.

And a dumb question…

Does Samba work just fine as external storage if you disable all elastic search functionality in Nextcloud entirely?

Yea we checked the issues, but no one seems to have this problem for now.

Elasticsearch apps we have the Full text search, Full text search - Elasticsearch Platform, Full text search - Files and Full text search - Files - Tesseract OCR installed. The Elasticsearch version is 7.17.3.

No, there are no more error messages sadly.

I didn’t found any logs for the ZFS end for now, i think it hasn’t logs?

No hints in the logs also.

I disabled the mindmap app now, but still the same problem. The github issues also don’t give any information about our problem.

Yea but if it’s enabled it’s also working, all works fine for now except the indexing process.
That’s so strange.

Are you using LDAP?

You can also try generic searches from some of the errors you are seeing like “save login to session”. Perhaps something can be found there:

https://help.nextcloud.com/search?q=save%20login%20to%20session

Try searching a bit more. If nothing turns up you’ll probably want to file an issue and share logs with the developer / maintainer, plus link them to this topic.
You can also link the github issue your create back here.
Sounds frustrating.