sed -i '/download\.nextcloud\.com/s/latest\.tar\.bz2/nextcloud-17.0.1.tar.bz2/' /DietPi/dietpi/dietpi-software
Nextcloud should install
Install fails
DietPi-Software: ncc maintenance:install
娄 - Exit code: 1
娄 - DietPi version: v6.26.3 (MichaIng/master) | HW_MODEL:4 | HW_ARCH:2 | DISTRO:5
娄 - Image creator: DietPi Core Team
娄 - Pre-image: Raspbian Lite
娄
娄 Log file content:
娄 Error while trying to create admin user: Failed to connect to the database: An
娄 exception occurred in driver: SQLSTATE[HY000] [1698] Access denied for user
娄 'oc_admin'@'localhost'
娄 ->
娄
娄 If problems persist, please report at https://github.com/MichaIng/DietPi/issues
娄 for investigation.
娄
娄 Unable to continue, DietPi-Software will now terminate.
@DevinCharles
Bug confirmed. Somehow the install command does not create the default oc_admin database user before using it. I rechecked the official docs and it seems to be a bug on Nextcloud side, as it is not intended to create this user prior to running the command, nor is there an option to e.g. define its name: https://docs.nextcloud.com/server/17/admin_manual/configuration_server/occ_command.html#command-line-installation-label
Damn thing.... workaround is a difficult thing. oc_admin is for security reasons created with a random password which is applied as one install step to config.php automatically. Since there is not even a default config.php available on fresh install, we cannot even pre-create the user with password... And even then, if I remember right, ncc maintenance:install simple creates a new user when already existing... although since it does not create it currently... further investigation required!
Jep, no change to use the command with a pre-created database user:
Error while trying to create admin user: Failed to connect to the database: An exception occurred in driver: SQLSTATE[HY000] [1045] Access denied for user 'oc_admin1'@'localhost' (using password: YES)
Nasty bug... we can of course do a complete manual install but that would be a VERY bad step back...
Still working with: https://download.nextcloud.com/server/releases/nextcloud-17.0.1.tar.bz2
So a bug introduced with Nextcloud 17.0.2.
PR up for workaround: https://github.com/MichaIng/DietPi/pull/3278
Bug reported to Nextcloud repo: https://github.com/nextcloud/server/issues/18513
@DevinCharles
Or make it a one-liner:
sed -i '/download\.nextcloud\.com/s/latest\.tar\.bz2/nextcloud-17.0.1.tar.bz2/' /DietPi/dietpi/dietpi-software
btw: I can confirm the one-liner workaround working 馃憤
Most helpful comment
btw: I can confirm the one-liner workaround working 馃憤