[SOLVED] NCP ERROR - Reading no DATA DIRECTORY - NC-INIT fixed it!

being a noob, there can only be a finite amount of space for errors ;).

Running any commands in the Config, TUI/GUI, dont matter I get a error message: “Error reading data directory. Is NextCloud running and configured?”

Sooo. Am lost from here.

I panicked earlier and thought I wasted time purchasing a 128gb SD card for nothing because I feared NCP is only off of a USB. Didn’t make sense that it would be that way anyways.

For some reason, it should that my DBDIR (database dir) is /media/USBdrive/ncdatabase. that’s the default path in the NC-DATABASE option. Not too sure if thats’ just a guided path for when a user applies a USB or no.

Any assistance would be appreciated.

Your data directory is set to default /var/www/nextcloud/data
and /var/lib/mysql for the db

The /media/USBdrive/ncdatabase is the proposed location if and when you decide to move your db

If you want coherent answers you will have to learn how to ask questions! You’ll get a lot more response if you include the steps you took, what you expected and what exactly went wrong …

For example: I followed this tutorial when I arrived at step # i expected so and so, instead I got something else. I tried a) this first b) then this next and now c) I am stuck

That said; Did you activate NCP?

1 Like

If by activate, do you mean in the Activation page on my Localip.local:4443/activation? if so yes I clicked activation but it’s in an endless loop of “NextCloudPi not yet initialized, trying again in a few seconds …”

This post was done with 4 hours of sleep. Thank you for correcting me.

And yes i followed this tutorial, https://github.com/nextcloud/nextcloudpi/wiki/How-to-configure-NextCloudPi, after completing the tutorial, I shortly encountered my current issue.

I also just encountered this. After trying to do nc-update,
" [ nc-admin ]
An unhandled exception has been thrown:
Doctrine\DBAL\DBALException: Failed to connect to the database: An exception occured in driver: SQLSTATE[HY000] [1045] Access denied for user ‘ncadmin’@‘localhost’ (using password: YES) in /var/www/nextcloud/lib/private/DB/Connection.php:64
Stack trace:
#0 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(429): OC\DB\Connection->connect()
#1 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(389): Doctrine\DBAL\Connection->getDatabasePlatformVersion()
#2 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(328): Doctrine\DBAL\Connection->detectDatabasePlatform()
#3 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(623): Doctrine\DBAL\Connection->getDatabasePlatform()
#4 /var/www/nextcloud/lib/private/DB/Connection.php(151): Doctrine\DBAL\Connection->setTransactionIsolation(2)
#5 /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DriverManager.php(172): OC\DB\Connection->__construct(Array, Object(Doctrine\DBAL\Driver\PDOMySql\Driver), Object(Doctrine\DBAL\Configuration), Object(Doctrine\Common\EventManager))
#6 /var/www/nextcloud/lib/private/DB/ConnectionFactory.php(152): Doctrine\DBAL\DriverManager::getConnection(Array, Object(Doctrine\DBAL\Configuration), Object(Doctrine\Common\EventManager))
#7 /var/www/nextcloud/lib/private/Server.php(630): OC\DB\ConnectionFactory->getConnection(‘mysql’, Array)
#8 /var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\Server->OC{closure}(Object(OC\Server))
#9 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(117): Pimple\Container->offsetGet(‘OCP\IDBConnecti…’)
#10 /var/www/nextcloud/lib/private/ServerContainer.php(132): OC\AppFramework\Utility\SimpleContainer->query(‘OCP\IDBConnecti…’)
#11 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(165): OC\ServerContainer->query(‘OCP\IDBConnecti…’)
#12 /var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(114): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility{closure}(Object(OC\Server))
#13 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(117): Pimple\Container->offsetGet(‘DatabaseConnect…’)
#14 /var/www/nextcloud/lib/private/ServerContainer.php(132): OC\AppFramework\Utility\SimpleContainer->query(‘DatabaseConnect…’)
#15 /var/www/nextcloud/lib/private/Server.php(1532): OC\ServerContainer->query(‘DatabaseConnect…’)
#16 /var/www/nextcloud/lib/private/Server.php(352): OC\Server->getDatabaseConnection()
#17 /var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\Server->OC{closure}(Object(OC\Server))
#18 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(117): Pimple\Container->offsetGet(‘OC\Authenticati…’)
#19 /var/www/nextcloud/lib/private/ServerContainer.php(132): OC\AppFramework\Utility\SimpleContainer->query(‘OC\Authenticati…’)
#20 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(68): OC\ServerContainer->query(‘OC\Authenticati…’)
#21 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(98): OC\AppFramework\Utility\SimpleContainer->buildClass(Object(ReflectionClass))
#22 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(119): OC\AppFramework\Utility\SimpleContainer->resolve(‘OC\Authenticati…’)
#23 /var/www/nextcloud/lib/private/ServerContainer.php(132): OC\AppFramework\Utility\SimpleContainer->query(‘OC\Authenticati…’)
#24 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(68): OC\ServerContainer->query(‘OC\Authenticati…’)
#25 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(98): OC\AppFramework\Utility\SimpleContainer->buildClass(Object(ReflectionClass))
#26 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(119): OC\AppFramework\Utility\SimpleContainer->resolve(‘OC\Authenticati…’)
#27 /var/www/nextcloud/lib/private/ServerContainer.php(132): OC\AppFramework\Utility\SimpleContainer->query(‘OC\Authenticati…’)
#28 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(165): OC\ServerContainer->query(‘OC\Authenticati…’)
#29 /var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(114): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility{closure}(Object(OC\Server))
#30 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(117): Pimple\Container->offsetGet(‘OC\Authenticati…’)
#31 /var/www/nextcloud/lib/private/ServerContainer.php(132): OC\AppFramework\Utility\SimpleContainer->query(‘OC\Authenticati…’)
#32 /var/www/nextcloud/lib/private/Server.php(364): OC\ServerContainer->query(‘OC\Authenticati…’)
#33 /var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\Server->OC{closure}(Object(OC\Server))
#34 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(117): Pimple\Container->offsetGet(‘OCP\IUserSessio…’)
#35 /var/www/nextcloud/lib/private/ServerContainer.php(132): OC\AppFramework\Utility\SimpleContainer->query(‘OCP\IUserSessio…’)
#36 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(165): OC\ServerContainer->query(‘OCP\IUserSessio…’)
#37 /var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(114): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility{closure}(Object(OC\Server))
#38 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(117): Pimple\Container->offsetGet(‘UserSession’)
#39 /var/www/nextcloud/lib/private/ServerContainer.php(132): OC\AppFramework\Utility\SimpleContainer->query(‘UserSession’)
#40 /var/www/nextcloud/lib/private/Server.php(1408): OC\ServerContainer->query(‘UserSession’)
#41 /var/www/nextcloud/lib/private/Server.php(683): OC\Server->getUserSession()
#42 /var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\Server->OC{closure}(Object(OC\Server))
#43 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(117): Pimple\Container->offsetGet(‘OC\App\AppManag…’)
#44 /var/www/nextcloud/lib/private/ServerContainer.php(132): OC\AppFramework\Utility\SimpleContainer->query(‘OC\App\AppManag…’)
#45 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(165): OC\ServerContainer->query(‘OC\App\AppManag…’)
#46 /var/www/nextcloud/3rdparty/pimple/pimple/src/Pimple/Container.php(114): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility{closure}(Object(OC\Server))
#47 /var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(117): Pimple\Container->offsetGet(‘AppManager’)
#48 /var/www/nextcloud/lib/private/ServerContainer.php(132): OC\AppFramework\Utility\SimpleContainer->query(‘AppManager’)
#49 /var/www/nextcloud/lib/private/Server.php(1703): OC\ServerContainer->query(‘AppManager’)
#50 /var/www/nextcloud/lib/private/legacy/app.php(342): OC\Server->getAppManager()
#51 /var/www/nextcloud/lib/private/legacy/app.php(113): OC_App::getEnabledApps()
#52 /var/www/nextcloud/lib/base.php(654): OC_App::loadApps(Array)
#53 /var/www/nextcloud/lib/base.php(1068): OC::init()
#54 /var/www/nextcloud/console.php(46): require_once(’/var/www/nextcl…’)
#55 /var/www/nextcloud/occ(11): require_once(’/var/www/nextcl…’)
#56 {main}

The activation page is at https://your-local-ip/ or https://nextcloudpi.local/
Only after it is completed do you get redirected to https://local-ip:4443
You should not try any configuration actions from ncp-config untill activation has completed.

The first run can take a very, very, very long time on a rpi, i think mostly due to limited RAM.
One has to wait untill “init done” appears in the ncp.log

As you are doing a fresh install, it seems, you can run nc-init from ncp-config to make fresh start, then after activating, go to the ncp.log and wait for “init done”
Or if you get errors post them here or on pastebin.
To keep the log file open I use

sudo tail -f /var/log/ncp.log

You should see all the actions taken come by untill init done :persevere:

Also: Make sure that you have a good and reliable power supply for your Raspberry Pi. Otherwise all kinds of weird errors might occur. And do have a separate power supply for your additional drive, if you have one connected.

Got it, will start to reinstall. And my PSU and Cable are good to go, thank God.

It worked. Like a charm, thank you for your time OliverV. I seriously appreciate your help <3

1 Like

A post was split to a new topic: Reset db password ncp-docker