Lost data after HDD failure, trying to recreate /data folder

Nextcloud version: 18.0.4.2
Operating system and version: DietPi (based on Debian Buster for ARM-64)
Apache or nginx version: nginx 1.14.2
PHP version: 7.3

The issue you are facing:
My Nextcloud server is self-hosted on a Raspberry Pi 4, but since the 32 GB of the SD card are very short, I decided to connect an external hard drive to the RasPi. The folder /var/www/nextcloud/data was symlinked to a folder of the external hard drive, which was configured to mount automatically on boot. Unfortunately, the hard drive failed after a power loss last morning, and although I have a backup of the files themselves and a new hard drive, I can’t reconfigure Nextcloud to regenerate the folders on /data and therefore the web-app refuses to restart. I cannot regenerate the folder structure manually by myself either, since I didn’t memorize it, it’s not documented online, and the only way to regenerate it would require forsaking my current setup and reinstall from scratch, something that I’m not willing to do as the calendar and contacts are currently intact.

Is this the first time you’ve seen this error?: Y

Steps to replicate it:

  1. Configure Nextcloud as usual, symlink /var/www/nextcloud/data to a folder located on a different drive
  2. Unplug the drive, optionally replace it with another one or remove the symlink
  3. Recreate the /var/www/nextcloud/data folder
  4. Run sudo -u www-data php occ maintenance:repair and sudo -u www-data php occ files:scan
  5. Check the /var/www/nextcloud/data folder to see if the folder structure has been regenerated

The output of your Nextcloud log in Admin > Logging:
Not available (there is no way to access the web-app as of now)

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

<?php
$CONFIG = array (
  'trusted_domains' => 
  array (
    0 => 'cloud.azkware.net',
  ),
  'datadirectory' => '/var/www/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '18.0.4.2',
  'overwrite.cli.url' => 'https://cloud.azkware.net',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost:5432',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'installed' => true,
  'maintenance' => false,
  'theme' => '',
  'loglevel' => 2,
  'has_rebuilt_cache' => true,
);

The output of your nginx log in /var/log/nginx/error.log:

2020/05/25 07:20:01 [error] 2498#2498: *98 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 179.50.167.76, server: azkware.net, request: "PROPFIND /cloud/remote.php/caldav/calendars/cso
2020/05/25 17:27:41 [error] 2497#2497: *592 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 179.50.167.76, server: cloud.azkware.net, request: "GET /index.php/apps/bookmarks/public/rest/
2020/05/25 17:30:22 [error] 2497#2497: *592 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 179.50.167.76, server: cloud.azkware.net, request: "GET /index.php/apps/bookmarks/public/rest/
2020/05/25 17:30:23 [error] 2497#2497: *772 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 179.50.167.76, server: cloud.azkware.net, request: "POST /index.php/apps/passwords/api/0.1/pas
2020/05/25 17:33:11 [error] 2497#2497: *772 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 179.50.167.76, server: cloud.azkware.net, request: "GET /index.php/apps/bookmarks/public/rest/
2020/05/25 17:33:15 [error] 2497#2497: *986 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 179.50.167.76, server: cloud.azkware.net, request: "GET /apps/files/ HTTP/2.0", upstream: "fas
2020/05/25 17:33:20 [error] 2497#2497: *1083 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 179.50.167.76, server: cloud.azkware.net, request: "GET /index.php/apps/bookmarks/public/rest
2020/05/25 17:36:02 [error] 2497#2497: *1083 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 179.50.167.76, server: cloud.azkware.net, request: "GET /index.php/apps/bookmarks/public/rest
2020/05/25 17:38:46 [error] 2497#2497: *1323 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 179.50.167.76, server: cloud.azkware.net, request: "GET /index.php/apps/bookmarks/public/rest
2020/05/25 17:40:44 [error] 2497#2497: *1323 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 179.50.167.76, server: cloud.azkware.net, request: "GET /index.php/apps/bookmarks/public/rest
2020/05/25 17:42:31 [error] 2498#2498: *1516 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 179.50.167.76, server: cloud.azkware.net, request: "GET /index.php/apps/bookmarks/public/rest
2020/05/25 17:45:04 [error] 2498#2498: *1516 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 179.50.167.76, server: cloud.azkware.net, request: "GET /index.php/apps/bookmarks/public/rest
2020/05/25 17:45:14 [error] 2497#2497: *1699 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 179.50.167.76, server: cloud.azkware.net, request: "GET /index.php/apps/bookmarks/public/rest
2020/05/25 17:49:20 [error] 2497#2497: *1699 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 179.50.167.76, server: cloud.azkware.net, request: "GET /index.php/apps/bookmarks/public/rest

Hi,

I think that you may miss understand how the occ scan command works…

How did you took your backup ? That is the first thing to see how to restore it.

Also, you are now learning one of the basic rule about backups : A backup has no value until you successfully restored it. No matter what are you backing up, you must always try to restore it before considering it is working. And not only must you test your restore when you develop your backup, it is always good to do a restore test at least once a year. I usually do mine during Christmas time and last time, I failed my restore… No problem, I was not in any real situation… I fixed the backup, did a new one and managed to restore it. Because I failed my annual test, I will be doing an extra one in June.

So tell us how you did your backup, were you using encryption or not and what your actual data looks like. There is still hope to restore it, but we must know about your case for that.

As for the “backup”, there wasn’t a backup proper - rather I’m the only user of this particular instance, all the files were stored on my computer, and I just copied them back from there to my new hard drive before connecting it to the server, then pointed the symlink to the hard drive. As for the problem solving part, I’m now having some progress - the files are now detected, now that I removed the old symlink, let Nextcloud regenerate things and then pointed the folders properly with the owner and permissions properly set. However, there’s still a problem with the web-app itself, namely it keeps displaying a text-only page saying:

Internal Server Error

The server encountered an internal error and was unable to complete your request.
Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report.
More details can be found in the server log.

The server log itself goes more or less like this (skipping some private data identifiers):

{"reqId":"uh3tDfkKyWE3Y4SZexK1","level":3,"time":"2020-05-26T04:31:31+00:00","remoteAddr":"179.50.167.76","user":"csolisr","app":"PHP","method":"GET","url":"/remote.php/dav/avatars/csolisr/128.png","message":"file_get_contents(/var/www/nextcloud/data/appdata_ocoi1ho5mcg2/avatar/csolisr/avatar.128.png): failed to open stream: No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#218","userAgent":"Mozilla/5.0 (Windows) mirall/2.6.4stable-Win64 (build 20200303) (Nextcloud)","version":"18.0.4.2"}
{"reqId":"uh3tDfkKyWE3Y4SZexK1","level":3,"time":"2020-05-26T04:31:31+00:00","remoteAddr":"179.50.167.76","user":"csolisr","app":"PHP","method":"GET","url":"/remote.php/dav/avatars/csolisr/128.png","message":"stat(): stat failed for /var/www/nextcloud/data/appdata_ocoi1ho5mcg2/avatar/csolisr/avatar.128.png at /var/www/nextcloud/lib/private/Files/Storage/Local.php#144","userAgent":"Mozilla/5.0 (Windows) mirall/2.6.4stable-Win64 (build 20200303) (Nextcloud)","version":"18.0.4.2"}
{"reqId":"uh3tDfkKyWE3Y4SZexK1","level":3,"time":"2020-05-26T04:31:31+00:00","remoteAddr":"179.50.167.76","user":"csolisr","app":"PHP","method":"GET","url":"/remote.php/dav/avatars/csolisr/128.png","message":"filesize(): stat failed for /var/www/nextcloud/data/appdata_ocoi1ho5mcg2/avatar/csolisr/avatar.128.png at /var/www/nextcloud/lib/private/LargeFileHelper.php#172","userAgent":"Mozilla/5.0 (Windows) mirall/2.6.4stable-Win64 (build 20200303) (Nextcloud)","version":"18.0.4.2"}
{"reqId":"uh3tDfkKyWE3Y4SZexK1","level":3,"time":"2020-05-26T04:31:31+00:00","remoteAddr":"179.50.167.76","user":"csolisr","app":"PHP","method":"GET","url":"/remote.php/dav/avatars/csolisr/128.png","message":"imagepng() expects parameter 1 to be resource, bool given at /var/www/nextcloud/apps/dav/lib/Avatars/AvatarNode.php#65","userAgent":"Mozilla/5.0 (Windows) mirall/2.6.4stable-Win64 (build 20200303) (Nextcloud)","version":"18.0.4.2"}
{"reqId":"DYyDw4Yd0bZf9EsH2clY","level":3,"time":"2020-05-26T04:31:33+00:00","remoteAddr":"179.50.167.76","user":"csolisr","app":"PHP","method":"GET","url":"/remote.php/dav/avatars/csolisr/128.png","message":"file_get_contents(/var/www/nextcloud/data/appdata_ocoi1ho5mcg2/avatar/csolisr/avatar.128.png): failed to open stream: No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#218","userAgent":"Mozilla/5.0 (Windows) mirall/2.6.4stable-Win64 (build 20200303) (Nextcloud)","version":"18.0.4.2"}
{"reqId":"DYyDw4Yd0bZf9EsH2clY","level":3,"time":"2020-05-26T04:31:33+00:00","remoteAddr":"179.50.167.76","user":"csolisr","app":"PHP","method":"GET","url":"/remote.php/dav/avatars/csolisr/128.png","message":"stat(): stat failed for /var/www/nextcloud/data/appdata_ocoi1ho5mcg2/avatar/csolisr/avatar.128.png at /var/www/nextcloud/lib/private/Files/Storage/Local.php#144","userAgent":"Mozilla/5.0 (Windows) mirall/2.6.4stable-Win64 (build 20200303) (Nextcloud)","version":"18.0.4.2"}
{"reqId":"DYyDw4Yd0bZf9EsH2clY","level":3,"time":"2020-05-26T04:31:33+00:00","remoteAddr":"179.50.167.76","user":"csolisr","app":"PHP","method":"GET","url":"/remote.php/dav/avatars/csolisr/128.png","message":"filesize(): stat failed for /var/www/nextcloud/data/appdata_ocoi1ho5mcg2/avatar/csolisr/avatar.128.png at /var/www/nextcloud/lib/private/LargeFileHelper.php#172","userAgent":"Mozilla/5.0 (Windows) mirall/2.6.4stable-Win64 (build 20200303) (Nextcloud)","version":"18.0.4.2"}
{"reqId":"DYyDw4Yd0bZf9EsH2clY","level":3,"time":"2020-05-26T04:31:33+00:00","remoteAddr":"179.50.167.76","user":"csolisr","app":"PHP","method":"GET","url":"/remote.php/dav/avatars/csolisr/128.png","message":"imagepng() expects parameter 1 to be resource, bool given at /var/www/nextcloud/apps/dav/lib/Avatars/AvatarNode.php#65","userAgent":"Mozilla/5.0 (Windows) mirall/2.6.4stable-Win64 (build 20200303) (Nextcloud)","version":"18.0.4.2"}
{"reqId":"hv4qXZMRKUiOpmPFfC4I","level":3,"time":"2020-05-26T04:31:37+00:00","remoteAddr":"179.50.167.76","user":"csolisr","app":"PHP","method":"GET","url":"/remote.php/dav/avatars/csolisr/128.png","message":"file_get_contents(/var/www/nextcloud/data/appdata_ocoi1ho5mcg2/avatar/csolisr/avatar.128.png): failed to open stream: No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#218","userAgent":"Mozilla/5.0 (Windows) mirall/2.6.4stable-Win64 (build 20200303) (Nextcloud)","version":"18.0.4.2"}
{"reqId":"hv4qXZMRKUiOpmPFfC4I","level":3,"time":"2020-05-26T04:31:37+00:00","remoteAddr":"179.50.167.76","user":"csolisr","app":"PHP","method":"GET","url":"/remote.php/dav/avatars/csolisr/128.png","message":"stat(): stat failed for /var/www/nextcloud/data/appdata_ocoi1ho5mcg2/avatar/csolisr/avatar.128.png at /var/www/nextcloud/lib/private/Files/Storage/Local.php#144","userAgent":"Mozilla/5.0 (Windows) mirall/2.6.4stable-Win64 (build 20200303) (Nextcloud)","version":"18.0.4.2"}
{"reqId":"hv4qXZMRKUiOpmPFfC4I","level":3,"time":"2020-05-26T04:31:37+00:00","remoteAddr":"179.50.167.76","user":"csolisr","app":"PHP","method":"GET","url":"/remote.php/dav/avatars/csolisr/128.png","message":"filesize(): stat failed for /var/www/nextcloud/data/appdata_ocoi1ho5mcg2/avatar/csolisr/avatar.128.png at /var/www/nextcloud/lib/private/LargeFileHelper.php#172","userAgent":"Mozilla/5.0 (Windows) mirall/2.6.4stable-Win64 (build 20200303) (Nextcloud)","version":"18.0.4.2"}
{"reqId":"hv4qXZMRKUiOpmPFfC4I","level":3,"time":"2020-05-26T04:31:37+00:00","remoteAddr":"179.50.167.76","user":"csolisr","app":"PHP","method":"GET","url":"/remote.php/dav/avatars/csolisr/128.png","message":"imagepng() expects parameter 1 to be resource, bool given at /var/www/nextcloud/apps/dav/lib/Avatars/AvatarNode.php#65","userAgent":"Mozilla/5.0 (Windows) mirall/2.6.4stable-Win64 (build 20200303) (Nextcloud)","version":"18.0.4.2"}
{"reqId":"c2FS8MXlk8GyCXS9k2uP","level":3,"time":"2020-05-26T04:33:43+00:00","remoteAddr":"179.50.167.76","user":"csolisr","app":"PHP","method":"GET","url":"/remote.php/dav/avatars/csolisr/128.png","message":"file_get_contents(/var/www/nextcloud/data/appdata_ocoi1ho5mcg2/avatar/csolisr/avatar.128.png): failed to open stream: No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#218","userAgent":"Mozilla/5.0 (Windows) mirall/2.6.4stable-Win64 (build 20200303) (Nextcloud)","version":"18.0.4.2"}
{"reqId":"c2FS8MXlk8GyCXS9k2uP","level":3,"time":"2020-05-26T04:33:43+00:00","remoteAddr":"179.50.167.76","user":"csolisr","app":"PHP","method":"GET","url":"/remote.php/dav/avatars/csolisr/128.png","message":"stat(): stat failed for /var/www/nextcloud/data/appdata_ocoi1ho5mcg2/avatar/csolisr/avatar.128.png at /var/www/nextcloud/lib/private/Files/Storage/Local.php#144","userAgent":"Mozilla/5.0 (Windows) mirall/2.6.4stable-Win64 (build 20200303) (Nextcloud)","version":"18.0.4.2"}
{"reqId":"c2FS8MXlk8GyCXS9k2uP","level":3,"time":"2020-05-26T04:33:44+00:00","remoteAddr":"179.50.167.76","user":"csolisr","app":"PHP","method":"GET","url":"/remote.php/dav/avatars/csolisr/128.png","message":"filesize(): stat failed for /var/www/nextcloud/data/appdata_ocoi1ho5mcg2/avatar/csolisr/avatar.128.png at /var/www/nextcloud/lib/private/LargeFileHelper.php#172","userAgent":"Mozilla/5.0 (Windows) mirall/2.6.4stable-Win64 (build 20200303) (Nextcloud)","version":"18.0.4.2"}
{"reqId":"c2FS8MXlk8GyCXS9k2uP","level":3,"time":"2020-05-26T04:33:44+00:00","remoteAddr":"179.50.167.76","user":"csolisr","app":"PHP","method":"GET","url":"/remote.php/dav/avatars/csolisr/128.png","message":"imagepng() expects parameter 1 to be resource, bool given at /var/www/nextcloud/apps/dav/lib/Avatars/AvatarNode.php#65","userAgent":"Mozilla/5.0 (Windows) mirall/2.6.4stable-Win64 (build 20200303) (Nextcloud)","version":"18.0.4.2"}
{"reqId":"Hkv96GLayjc5dk0nXo2H","level":3,"time":"2020-05-26T04:33:57+00:00","remoteAddr":"179.50.167.76","user":"csolisr","app":"PHP","method":"GET","url":"/remote.php/dav/avatars/csolisr/128.png","message":"file_get_contents(/var/www/nextcloud/data/appdata_ocoi1ho5mcg2/avatar/csolisr/avatar.128.png): failed to open stream: No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#218","userAgent":"Mozilla/5.0 (Windows) mirall/2.6.4stable-Win64 (build 20200303) (Nextcloud)","version":"18.0.4.2"}
{"reqId":"Hkv96GLayjc5dk0nXo2H","level":3,"time":"2020-05-26T04:33:57+00:00","remoteAddr":"179.50.167.76","user":"csolisr","app":"PHP","method":"GET","url":"/remote.php/dav/avatars/csolisr/128.png","message":"stat(): stat failed for /var/www/nextcloud/data/appdata_ocoi1ho5mcg2/avatar/csolisr/avatar.128.png at /var/www/nextcloud/lib/private/Files/Storage/Local.php#144","userAgent":"Mozilla/5.0 (Windows) mirall/2.6.4stable-Win64 (build 20200303) (Nextcloud)","version":"18.0.4.2"}
{"reqId":"Hkv96GLayjc5dk0nXo2H","level":3,"time":"2020-05-26T04:33:57+00:00","remoteAddr":"179.50.167.76","user":"csolisr","app":"PHP","method":"GET","url":"/remote.php/dav/avatars/csolisr/128.png","message":"filesize(): stat failed for /var/www/nextcloud/data/appdata_ocoi1ho5mcg2/avatar/csolisr/avatar.128.png at /var/www/nextcloud/lib/private/LargeFileHelper.php#172","userAgent":"Mozilla/5.0 (Windows) mirall/2.6.4stable-Win64 (build 20200303) (Nextcloud)","version":"18.0.4.2"}
{"reqId":"Hkv96GLayjc5dk0nXo2H","level":3,"time":"2020-05-26T04:33:57+00:00","remoteAddr":"179.50.167.76","user":"csolisr","app":"PHP","method":"GET","url":"/remote.php/dav/avatars/csolisr/128.png","message":"imagepng() expects parameter 1 to be resource, bool given at /var/www/nextcloud/apps/dav/lib/Avatars/AvatarNode.php#65","userAgent":"Mozilla/5.0 (Windows) mirall/2.6.4stable-Win64 (build 20200303) (Nextcloud)","version":"18.0.4.2"}
{"reqId":"b8OQMggoWa0w5fxVP36d","level":3,"time":"2020-05-26T04:34:49+00:00","remoteAddr":"179.50.167.76","user":"csolisr","app":"PHP","method":"GET","url":"/remote.php/dav/avatars/csolisr/128.png","message":"file_get_contents(/var/www/nextcloud/data/appdata_ocoi1ho5mcg2/avatar/csolisr/avatar.128.png): failed to open stream: No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#218","userAgent":"Mozilla/5.0 (Windows) mirall/2.6.4stable-Win64 (build 20200303) (Nextcloud)","version":"18.0.4.2"}
{"reqId":"b8OQMggoWa0w5fxVP36d","level":3,"time":"2020-05-26T04:34:49+00:00","remoteAddr":"179.50.167.76","user":"csolisr","app":"PHP","method":"GET","url":"/remote.php/dav/avatars/csolisr/128.png","message":"stat(): stat failed for /var/www/nextcloud/data/appdata_ocoi1ho5mcg2/avatar/csolisr/avatar.128.png at /var/www/nextcloud/lib/private/Files/Storage/Local.php#144","userAgent":"Mozilla/5.0 (Windows) mirall/2.6.4stable-Win64 (build 20200303) (Nextcloud)","version":"18.0.4.2"}
{"reqId":"b8OQMggoWa0w5fxVP36d","level":3,"time":"2020-05-26T04:34:49+00:00","remoteAddr":"179.50.167.76","user":"csolisr","app":"PHP","method":"GET","url":"/remote.php/dav/avatars/csolisr/128.png","message":"filesize(): stat failed for /var/www/nextcloud/data/appdata_ocoi1ho5mcg2/avatar/csolisr/avatar.128.png at /var/www/nextcloud/lib/private/LargeFileHelper.php#172","userAgent":"Mozilla/5.0 (Windows) mirall/2.6.4stable-Win64 (build 20200303) (Nextcloud)","version":"18.0.4.2"}
{"reqId":"b8OQMggoWa0w5fxVP36d","level":3,"time":"2020-05-26T04:34:49+00:00","remoteAddr":"179.50.167.76","user":"csolisr","app":"PHP","method":"GET","url":"/remote.php/dav/avatars/csolisr/128.png","message":"imagepng() expects parameter 1 to be resource, bool given at /var/www/nextcloud/apps/dav/lib/Avatars/AvatarNode.php#65","userAgent":"Mozilla/5.0 (Windows) mirall/2.6.4stable-Win64 (build 20200303) (Nextcloud)","version":"18.0.4.2"}
{"reqId":"wTvA9aBJzkKXnWfPQCBr","level":3,"time":"2020-05-26T04:34:56+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"file_get_contents(/var/www/nextcloud/data/news/config/config.ini): failed to open stream: No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#218","userAgent":"--","version":"18.0.4.2"}
{"reqId":"wTvA9aBJzkKXnWfPQCBr","level":2,"time":"2020-05-26T04:34:56+00:00","remoteAddr":"","user":"--","app":"news","method":"","url":"--","message":"Configuration invalid. Ignoring values.","userAgent":"--","version":"18.0.4.2"}
{"reqId":"9NmRACDzOGwnNJAOAhhm","level":3,"time":"2020-05-26T04:34:57+00:00","remoteAddr":"179.50.167.76","user":"csolisr","app":"PHP","method":"GET","url":"/remote.php/dav/avatars/csolisr/128.png","message":"file_get_contents(/var/www/nextcloud/data/appdata_ocoi1ho5mcg2/avatar/csolisr/avatar.128.png): failed to open stream: No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#218","userAgent":"Mozilla/5.0 (Windows) mirall/2.6.4stable-Win64 (build 20200303) (Nextcloud)","version":"18.0.4.2"}
{"reqId":"9NmRACDzOGwnNJAOAhhm","level":3,"time":"2020-05-26T04:34:57+00:00","remoteAddr":"179.50.167.76","user":"csolisr","app":"PHP","method":"GET","url":"/remote.php/dav/avatars/csolisr/128.png","message":"stat(): stat failed for /var/www/nextcloud/data/appdata_ocoi1ho5mcg2/avatar/csolisr/avatar.128.png at /var/www/nextcloud/lib/private/Files/Storage/Local.php#144","userAgent":"Mozilla/5.0 (Windows) mirall/2.6.4stable-Win64 (build 20200303) (Nextcloud)","version":"18.0.4.2"}
{"reqId":"9NmRACDzOGwnNJAOAhhm","level":3,"time":"2020-05-26T04:34:57+00:00","remoteAddr":"179.50.167.76","user":"csolisr","app":"PHP","method":"GET","url":"/remote.php/dav/avatars/csolisr/128.png","message":"filesize(): stat failed for /var/www/nextcloud/data/appdata_ocoi1ho5mcg2/avatar/csolisr/avatar.128.png at /var/www/nextcloud/lib/private/LargeFileHelper.php#172","userAgent":"Mozilla/5.0 (Windows) mirall/2.6.4stable-Win64 (build 20200303) (Nextcloud)","version":"18.0.4.2"}
{"reqId":"9NmRACDzOGwnNJAOAhhm","level":3,"time":"2020-05-26T04:34:57+00:00","remoteAddr":"179.50.167.76","user":"csolisr","app":"PHP","method":"GET","url":"/remote.php/dav/avatars/csolisr/128.png","message":"imagepng() expects parameter 1 to be resource, bool given at /var/www/nextcloud/apps/dav/lib/Avatars/AvatarNode.php#65","userAgent":"Mozilla/5.0 (Windows) mirall/2.6.4stable-Win64 (build 20200303) (Nextcloud)","version":"18.0.4.2"}
{"reqId":"vF3hHcFLze7SoBdtxjN9","level":3,"time":"2020-05-26T04:34:58+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"file_get_contents(/var/www/nextcloud/data/news/config/config.ini): failed to open stream: No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#218","userAgent":"--","version":"18.0.4.2"}
{"reqId":"vF3hHcFLze7SoBdtxjN9","level":2,"time":"2020-05-26T04:34:58+00:00","remoteAddr":"","user":"--","app":"news","method":"","url":"--","message":"Configuration invalid. Ignoring values.","userAgent":"--","version":"18.0.4.2"}
{"reqId":"K9KM05GHJFzINIkhmyXj","level":3,"time":"2020-05-26T04:36:15+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"file_get_contents(/var/www/nextcloud/data/news/config/config.ini): failed to open stream: No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#218","userAgent":"--","version":"18.0.4.2"}
{"reqId":"K9KM05GHJFzINIkhmyXj","level":2,"time":"2020-05-26T04:36:15+00:00","remoteAddr":"","user":"--","app":"news","method":"","url":"--","message":"Configuration invalid. Ignoring values.","userAgent":"--","version":"18.0.4.2"}
{"reqId":"kOlhswhPm0hyUFws8fG1","level":3,"time":"2020-05-26T04:36:15+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"file_get_contents(/var/www/nextcloud/data/news/config/config.ini): failed to open stream: No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#218","userAgent":"--","version":"18.0.4.2"}
{"reqId":"kOlhswhPm0hyUFws8fG1","level":2,"time":"2020-05-26T04:36:15+00:00","remoteAddr":"","user":"--","app":"news","method":"","url":"--","message":"Configuration invalid. Ignoring values.","userAgent":"--","version":"18.0.4.2"}
{"reqId":"Xp6SAJQB9p0DO7D3aCw9","level":3,"time":"2020-05-26T04:36:16+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"file_get_contents(/var/www/nextcloud/data/news/config/config.ini): failed to open stream: No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#218","userAgent":"--","version":"18.0.4.2"}
{"reqId":"Xp6SAJQB9p0DO7D3aCw9","level":2,"time":"2020-05-26T04:36:16+00:00","remoteAddr":"","user":"--","app":"news","method":"","url":"--","message":"Configuration invalid. Ignoring values.","userAgent":"--","version":"18.0.4.2"}
{"reqId":"350bVm6e7kFWffxPmDyz","level":3,"time":"2020-05-26T04:36:16+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"file_get_contents(/var/www/nextcloud/data/news/config/config.ini): failed to open stream: No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#218","userAgent":"--","version":"18.0.4.2"}
{"reqId":"350bVm6e7kFWffxPmDyz","level":2,"time":"2020-05-26T04:36:16+00:00","remoteAddr":"","user":"--","app":"news","method":"","url":"--","message":"Configuration invalid. Ignoring values.","userAgent":"--","version":"18.0.4.2"}
{"reqId":"zWXbmHgv6ONxCynjzWMJ","level":3,"time":"2020-05-26T04:36:16+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"file_get_contents(/var/www/nextcloud/data/news/config/config.ini): failed to open stream: No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#218","userAgent":"--","version":"18.0.4.2"}
{"reqId":"zWXbmHgv6ONxCynjzWMJ","level":2,"time":"2020-05-26T04:36:16+00:00","remoteAddr":"","user":"--","app":"news","method":"","url":"--","message":"Configuration invalid. Ignoring values.","userAgent":"--","version":"18.0.4.2"}
{"reqId":"JKg6F77AoBB4Z0L5WLLI","level":3,"time":"2020-05-26T04:36:16+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"file_get_contents(/var/www/nextcloud/data/news/config/config.ini): failed to open stream: No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#218","userAgent":"--","version":"18.0.4.2"}
{"reqId":"JKg6F77AoBB4Z0L5WLLI","level":2,"time":"2020-05-26T04:36:16+00:00","remoteAddr":"","user":"--","app":"news","method":"","url":"--","message":"Configuration invalid. Ignoring values.","userAgent":"--","version":"18.0.4.2"}
{"reqId":"Xjw787JfOQjWvI23p9xj","level":3,"time":"2020-05-26T04:36:16+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"file_get_contents(/var/www/nextcloud/data/news/config/config.ini): failed to open stream: No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#218","userAgent":"--","version":"18.0.4.2"}
{"reqId":"Xjw787JfOQjWvI23p9xj","level":2,"time":"2020-05-26T04:36:16+00:00","remoteAddr":"","user":"--","app":"news","method":"","url":"--","message":"Configuration invalid. Ignoring values.","userAgent":"--","version":"18.0.4.2"}
{"reqId":"z3FIRlOqticNIcRBm5wh","level":3,"time":"2020-05-26T04:36:16+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"file_get_contents(/var/www/nextcloud/data/news/config/config.ini): failed to open stream: No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#218","userAgent":"--","version":"18.0.4.2"}
{"reqId":"z3FIRlOqticNIcRBm5wh","level":2,"time":"2020-05-26T04:36:16+00:00","remoteAddr":"","user":"--","app":"news","method":"","url":"--","message":"Configuration invalid. Ignoring values.","userAgent":"--","version":"18.0.4.2"}
{"reqId":"EXCwRfaVFWRfnH2yQhcI","level":3,"time":"2020-05-26T04:36:17+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"file_get_contents(/var/www/nextcloud/data/news/config/config.ini): failed to open stream: No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#218","userAgent":"--","version":"18.0.4.2"}
{"reqId":"EXCwRfaVFWRfnH2yQhcI","level":2,"time":"2020-05-26T04:36:17+00:00","remoteAddr":"","user":"--","app":"news","method":"","url":"--","message":"Configuration invalid. Ignoring values.","userAgent":"--","version":"18.0.4.2"}
{"reqId":"8nw81QY13dsU5sKXFR4s","level":3,"time":"2020-05-26T04:36:17+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"file_get_contents(/var/www/nextcloud/data/news/config/config.ini): failed to open stream: No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#218","userAgent":"--","version":"18.0.4.2"}
{"reqId":"8nw81QY13dsU5sKXFR4s","level":2,"time":"2020-05-26T04:36:17+00:00","remoteAddr":"","user":"--","app":"news","method":"","url":"--","message":"Configuration invalid. Ignoring values.","userAgent":"--","version":"18.0.4.2"}
{"reqId":"gqhHbmHKMOuZ1DFQg4Hf","level":3,"time":"2020-05-26T04:36:25+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"file_get_contents(/var/www/nextcloud/data/news/config/config.ini): failed to open stream: No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#218","userAgent":"--","version":"18.0.4.2"}
{"reqId":"gqhHbmHKMOuZ1DFQg4Hf","level":2,"time":"2020-05-26T04:36:25+00:00","remoteAddr":"","user":"--","app":"news","method":"","url":"--","message":"Configuration invalid. Ignoring values.","userAgent":"--","version":"18.0.4.2"}
{"reqId":"YkYVVoRXYozu0Cgjxv3J","level":3,"time":"2020-05-26T04:36:25+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"file_get_contents(/var/www/nextcloud/data/news/config/config.ini): failed to open stream: No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#218","userAgent":"--","version":"18.0.4.2"}
{"reqId":"YkYVVoRXYozu0Cgjxv3J","level":2,"time":"2020-05-26T04:36:25+00:00","remoteAddr":"","user":"--","app":"news","method":"","url":"--","message":"Configuration invalid. Ignoring values.","userAgent":"--","version":"18.0.4.2"}
{"reqId":"vvXwnQlsi3Ckg3FMVpJA","level":3,"time":"2020-05-26T04:36:25+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"file_get_contents(/var/www/nextcloud/data/news/config/config.ini): failed to open stream: No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#218","userAgent":"--","version":"18.0.4.2"}
{"reqId":"vvXwnQlsi3Ckg3FMVpJA","level":2,"time":"2020-05-26T04:36:25+00:00","remoteAddr":"","user":"--","app":"news","method":"","url":"--","message":"Configuration invalid. Ignoring values.","userAgent":"--","version":"18.0.4.2"}
{"reqId":"eNe7LQGDMgIaEBDQpmkh","level":3,"time":"2020-05-26T04:36:26+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"file_get_contents(/var/www/nextcloud/data/news/config/config.ini): failed to open stream: No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#218","userAgent":"--","version":"18.0.4.2"}
{"reqId":"eNe7LQGDMgIaEBDQpmkh","level":2,"time":"2020-05-26T04:36:26+00:00","remoteAddr":"","user":"--","app":"news","method":"","url":"--","message":"Configuration invalid. Ignoring values.","userAgent":"--","version":"18.0.4.2"}
{"reqId":"1Q1dMHUbHNULUvVkm9sS","level":3,"time":"2020-05-26T04:36:27+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"file_get_contents(/var/www/nextcloud/data/news/config/config.ini): failed to open stream: No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#218","userAgent":"--","version":"18.0.4.2"}
{"reqId":"1Q1dMHUbHNULUvVkm9sS","level":2,"time":"2020-05-26T04:36:27+00:00","remoteAddr":"","user":"--","app":"news","method":"","url":"--","message":"Configuration invalid. Ignoring values.","userAgent":"--","version":"18.0.4.2"}
{"reqId":"OxKolRb6axFyG6kQ5zUl","level":3,"time":"2020-05-26T04:36:27+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"file_get_contents(/var/www/nextcloud/data/news/config/config.ini): failed to open stream: No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#218","userAgent":"--","version":"18.0.4.2"}
{"reqId":"OxKolRb6axFyG6kQ5zUl","level":2,"time":"2020-05-26T04:36:27+00:00","remoteAddr":"","user":"--","app":"news","method":"","url":"--","message":"Configuration invalid. Ignoring values.","userAgent":"--","version":"18.0.4.2"}
{"reqId":"MkbHlvUnSYxR5XSBcsVX","level":3,"time":"2020-05-26T04:36:27+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"file_get_contents(/var/www/nextcloud/data/news/config/config.ini): failed to open stream: No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#218","userAgent":"--","version":"18.0.4.2"}
{"reqId":"MkbHlvUnSYxR5XSBcsVX","level":2,"time":"2020-05-26T04:36:27+00:00","remoteAddr":"","user":"--","app":"news","method":"","url":"--","message":"Configuration invalid. Ignoring values.","userAgent":"--","version":"18.0.4.2"}
{"reqId":"PAOYWHRckhryrRrV0Wyy","level":3,"time":"2020-05-26T04:36:27+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"file_get_contents(/var/www/nextcloud/data/news/config/config.ini): failed to open stream: No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#218","userAgent":"--","version":"18.0.4.2"}
{"reqId":"PAOYWHRckhryrRrV0Wyy","level":2,"time":"2020-05-26T04:36:27+00:00","remoteAddr":"","user":"--","app":"news","method":"","url":"--","message":"Configuration invalid. Ignoring values.","userAgent":"--","version":"18.0.4.2"}
{"reqId":"GOohUrAfHjFJb2diLEPX","level":3,"time":"2020-05-26T04:36:29+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"file_get_contents(/var/www/nextcloud/data/news/config/config.ini): failed to open stream: No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#218","userAgent":"--","version":"18.0.4.2"}
{"reqId":"GOohUrAfHjFJb2diLEPX","level":2,"time":"2020-05-26T04:36:29+00:00","remoteAddr":"","user":"--","app":"news","method":"","url":"--","message":"Configuration invalid. Ignoring values.","userAgent":"--","version":"18.0.4.2"}

Digging a bit further thanks to the log, I found a few other things I could do that helped me return to normal:

  • The several instances of /var/www/nextcloud/data/appdata_ocxxxxxxx led me to this thread that recommended using occ config:system:delete xxxxxxx to reset the specific user’s app data.
  • Also, I disabled some apps temporarily to be safe with occ app-disable.
  • And finally, found that occ maintenance:repair skipped some of the heavier fixes by default, so I used occ maintenance: repair --include-expensive to make the fixes more thorough.
1 Like