Hi, started getting “Your data directory is invalid” error today. Tried rebooting a few times and error is still there.
I have 2 usb drives connected and both seems to be mounted fine.
I checked .ocdata file and it is in /var/www/ncp-data.oDKyH4 directory with permissions below.
Anything else I can check what may be causing this error?
Thanks in advance.
Okan
root@nextcloudpi:/var/www/ncp-data.oDKyH4# ls -ali .ocdata
28420644 -rw-r----- 1 www-data www-data 0 Jul 14 07:03 .ocdata
Nextcloud version (eg, 20.0.5): Current Nextcloud version 23.0.2.1
NextCloudPi version v1.49.0
Operating system and version (eg, Ubuntu 20.04): Raspbian GNU/Linux 10. 5.10.103-v7l+ (armv7l)
Apache or nginx version (eg, Apache 2.4.25):
PHP version (eg, 7.4): PHP 7.3.31-1~deb10u1 (cli)
The issue you are facing:
Error
Your data directory is invalid
Ensure there is a file called “.ocdata” in the root of the data directory.
Is this the first time you’ve seen this error? (Y/N): Yes
Steps to replicate it:
- This issue started today. After multiple reboots, same error is displayed
The output of your Nextcloud log in Admin > Logging:
[ncp-update-nc]
Current Nextcloud version 23.0.2.1
Available Nextcloud version 23.0.2
Nothing to update
[ nc-previews-auto ]
[ nc-update-nc-apps-auto ]
checking for updates...
[ncp-update-nc]
Current Nextcloud version 23.0.2.1
Available Nextcloud version 23.0.2
Nothing to update
[ nc-previews-auto ]
[ nc-limits ] (Tue 16 Aug 15:03:46 BST 2022)
Using 3221225472B for PHP
Using 6 PHP threads
Using 1023410176 memory for the database
[ nc-limits ] (Tue 16 Aug 15:56:46 BST 2022)
Using 3221225472B for PHP
Using 6 PHP threads
Using 1023410176 memory for the database
[ nc-limits ] (Tue 16 Aug 16:17:15 BST 2022)
Using 3221225472B for PHP
Using 6 PHP threads
Using 1023410176 memory for the database
[ nc-limits ] (Tue 16 Aug 16:41:24 BST 2022)
Using 3221225472B for PHP
Using 6 PHP threads
Using 1023410176 memory for the database
[ nc-limits ] (Tue 16 Aug 16:48:47 BST 2022)
Using 3221225472B for PHP
Using 6 PHP threads
Using 1023410176 memory for the database
[ nc-limits ] (Tue 16 Aug 16:55:13 BST 2022)
Using 3221225472B for PHP
Using 6 PHP threads
Using 1023410176 memory for the database
The output of your config.php file in /path/to/nextcloud
(make sure you remove any identifiable information!):
<?php
$CONFIG = array (
'passwordsalt' => 'XXXXX',
'secret' => 'XXXXX',
'trusted_domains' =>
array (
0 => 'localhost',
11 => '174.108.44.74',
1 => '192.168.1.5',
5 => 'nextcloudpi.local',
7 => 'nextcloudpi',
8 => 'nextcloudpi.lan',
3 => 'nextcloudpi',
4 => 'XXXXX',
12 => 'XXXXX',
22 => 'nextcloudpi',
'' => 'XXXXX',
14 => 'nextcloudpi',
),
'datadirectory' => '/var/www/nextcloud/data',
'dbtype' => 'mysql',
'version' => '23.0.6.1',
'overwrite.cli.url' => 'https://nextcloudpi/',
'dbname' => 'nextcloud',
'dbhost' => 'localhost',
'dbport' => '',
'dbtableprefix' => 'oc_',
'mysql.utf8mb4' => true,
'dbuser' => 'XXXXX',
'dbpassword' => 'XXXXX',
'installed' => true,
'instanceid' => 'oc6jlsglksrh',
'memcache.local' => '\\OC\\Memcache\\Redis',
'memcache.locking' => '\\OC\\Memcache\\Redis',
'redis' =>
array (
'host' => '/var/run/redis/redis.sock',
'port' => 0,
'timeout' => 0.0,
'password' => 'XXXXX',
),
'tempdirectory' => '/var/www/nextcloud/data/tmp',
'mail_smtpmode' => 'smtp',
'mail_smtpauthtype' => 'LOGIN',
'mail_from_address' => 'XXXXX',
'mail_domain' => 'XXXXX',
'jpeg_quality' => '60',
'overwriteprotocol' => 'https',
'loglevel' => '2',
'log_type' => 'file',
'mail_sendmailmode' => 'smtp',
'mail_smtpsecure' => 'tls',
'mail_smtpauth' => 1,
'mail_smtphost' => 'XXXXX',
'mail_smtpport' => '587',
'mail_smtpname' => 'XXXXX',
'mail_smtppassword' => 'XXXXX',
'maintenance' => false,
'preview_max_x' => '2048',
'preview_max_y' => '2048',
'theme' => '',
'twofactor_enforced' => 'true',
'twofactor_enforced_groups' =>
array (
0 => 'admin',
),
'twofactor_enforced_excluded_groups' =>
array (
),
'data-fingerprint' => 'XXXXX',
'app_install_overwrite' =>
array (
0 => 'bookmarks_fulltextsearch',
),
'trusted_proxies' =>
array (
11 => '127.0.0.1',
12 => '::1',
13 => 'nextcloudpi',
14 => '',
),
'default_phone_region' => 'US',
'logfile' => '/var/www/nextcloud/data/nextcloud.log',
);
The output of your Apache/nginx/system log in /var/log/____
:
Not sure how to do this.
Not sure how to do this.
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.
{"reqId":"YvsQAAgWJJ6IgGxZNQzOLgAAAI0","level":4,"time":"2022-08-16T03:33:21+00:00","remoteAddr":"192.168.1.10","user":"--","app":"w$
{"reqId":"YvsQAggWJJ6IgGxZNQzOLwAAAIw","level":4,"time":"2022-08-16T03:33:22+00:00","remoteAddr":"192.168.1.10","user":"--","app":"w$
{"reqId":"YvsUG5c3iW-wJ0ZnCJ4@qAAAABY","level":4,"time":"2022-08-16T03:50:52+00:00","remoteAddr":"192.168.1.10","user":"--","app":"w$
{"reqId":"YvsbI5c3iW-wJ0ZnCJ4@4gAAABE","level":4,"time":"2022-08-16T04:20:53+00:00","remoteAddr":"192.168.1.10","user":"xxxxxx","app"$
{"reqId":"YvsbI5c3iW-wJ0ZnCJ4@4gAAABE","level":2,"time":"2022-08-16T04:20:53+00:00","remoteAddr":"192.168.1.10","user":"xxxxxx","app"$
{"reqId":"YvsbJZc3iW-wJ0ZnCJ4@4wAAAA0","level":4,"time":"2022-08-16T04:20:55+00:00","remoteAddr":"192.168.1.10","user":"xxxxxx","app"$
{"reqId":"YvsbJZc3iW-wJ0ZnCJ4@4wAAAA0","level":2,"time":"2022-08-16T04:20:55+00:00","remoteAddr":"192.168.1.10","user":"xxxxxx","app"$
{"reqId":"YvsbJ5c3iW-wJ0ZnCJ4@5AAAAA8","level":4,"time":"2022-08-16T04:20:57+00:00","remoteAddr":"192.168.1.10","user":"xxxxxx","app"$
{"reqId":"YvsbJ5c3iW-wJ0ZnCJ4@5AAAAA8","level":2,"time":"2022-08-16T04:20:57+00:00","remoteAddr":"192.168.1.10","user":"xxxxxx","app"$
{"reqId":"YvsbKZc3iW-wJ0ZnCJ4@5QAAABY","level":4,"time":"2022-08-16T04:20:59+00:00","remoteAddr":"192.168.1.10","user":"xxxxxx","app"$
{"reqId":"YvsbKZc3iW-wJ0ZnCJ4@5QAAABY","level":2,"time":"2022-08-16T04:20:59+00:00","remoteAddr":"192.168.1.10","user":"xxxxxx","app"$
{"reqId":"YvsgewgWJJ6IgGxZNQzOgQAAAJQ","level":4,"time":"2022-08-16T04:43:41+00:00","remoteAddr":"192.168.1.10","user":"xxxxxx","app"$
{"reqId":"YvsgewgWJJ6IgGxZNQzOgQAAAJQ","level":2,"time":"2022-08-16T04:43:41+00:00","remoteAddr":"192.168.1.10","user":"xxxxxx","app"$
{"reqId":"YvsgfggWJJ6IgGxZNQzOggAAAIw","level":4,"time":"2022-08-16T04:43:44+00:00","remoteAddr":"192.168.1.10","user":"xxxxxx","app"$
{"reqId":"YvsgfggWJJ6IgGxZNQzOggAAAIw","level":2,"time":"2022-08-16T04:43:44+00:00","remoteAddr":"192.168.1.10","user":"xxxxxx","app"$
{"reqId":"YvsggQgWJJ6IgGxZNQzOhAAAAJA","level":4,"time":"2022-08-16T04:43:47+00:00","remoteAddr":"192.168.1.10","user":"xxxxxx","app"$
{"reqId":"YvsggQgWJJ6IgGxZNQzOhAAAAJA","level":2,"time":"2022-08-16T04:43:47+00:00","remoteAddr":"192.168.1.10","user":"xxxxxx","app"$
{"reqId":"YvsiKwgWJJ6IgGxZNQzOkgAAAJM","level":4,"time":"2022-08-16T04:50:53+00:00","remoteAddr":"192.168.1.10","user":"xxxxxx","app"$
{"reqId":"YvsiKwgWJJ6IgGxZNQzOkgAAAJM","level":2,"time":"2022-08-16T04:50:53+00:00","remoteAddr":"192.168.1.10","user":"xxxxxx","app"$
{"reqId":"YvspM5c3iW-wJ0ZnCJ4-aQAAABE","level":4,"time":"2022-08-16T05:20:53+00:00","remoteAddr":"192.168.1.10","user":"xxxxxx","app"$
{"reqId":"YvspM5c3iW-wJ0ZnCJ4-aQAAABE","level":2,"time":"2022-08-16T05:20:53+00:00","remoteAddr":"192.168.1.10","user":"xxxxxx","app"$
{"reqId":"YvsrBggWJJ6IgGxZNQzOsAAAAI8","level":4,"time":"2022-08-16T05:28:38+00:00","remoteAddr":"192.168.1.10","user":"xxxxxx","app"$
{"reqId":"YvsrIggWJJ6IgGxZNQzOsQAAAJQ","level":4,"time":"