DietPi-Software | Nextcloud fails to Install

Created on 21 Dec 2019  路  4Comments  路  Source: MichaIng/DietPi

ADMIN EDIT

Workaround

sed -i '/download\.nextcloud\.com/s/latest\.tar\.bz2/nextcloud-17.0.1.tar.bz2/' /DietPi/dietpi/dietpi-software

Creating a bug report/issue

Required Information

  • DietPi version | 6.26.3 master MichaIng
  • Distro version | Debian 10.2
  • Kernel version | Linux DietPi 4.19.57-v7l+ #1244 SMP Thu Jul 4 18:48:07 BST 2019 armv7l GNU/Linux
  • SBC device | RPi 4 Model B (armv7l)
  • Power supply used | CanaKit 3.5A USB-C
  • SDcard used | SanDisk ultra

Additional Information (if applicable)

  • Software title | Nextcloud
  • Fresh Install of Nextcloud on fresh install of DietPi, no other software installed
  • Can be replicated (this was a fresh install)

Steps to reproduce

  1. Login as root (also tried as dietpi with sudo)
  2. Install Dietpi
  3. Install Nextcloud

Expected behaviour

Nextcloud should install

Actual behaviour

Install fails

Extra details

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.

External Bug Solution available

Most helpful comment

btw: I can confirm the one-liner workaround working 馃憤

All 4 comments

@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 馃憤

Was this page helpful?
0 / 5 - 0 ratings