Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DietPi-Software | Nextcloud fails to Install #3275

Closed
DevinCharles opened this issue Dec 21, 2019 · 4 comments
Closed

DietPi-Software | Nextcloud fails to Install #3275

DevinCharles opened this issue Dec 21, 2019 · 4 comments
Labels
External bug 🐞 For bugs which are not caused by DietPi. Solution available 🥂 Definite solution has been done
Milestone

Comments

@DevinCharles
Copy link

DevinCharles commented Dec 21, 2019

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

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.

@MichaIng
Copy link
Owner

MichaIng commented Dec 21, 2019

@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!

@MichaIng MichaIng added External bug 🐞 For bugs which are not caused by DietPi. and removed Bug 🐞 labels Dec 21, 2019
@MichaIng
Copy link
Owner

MichaIng commented Dec 21, 2019

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: #3278

Bug reported to Nextcloud repo: nextcloud/server#18513

  • Identified harmful change with 17.0.2: nextcloud/server@f3ad49b
  • Sadly we cannot fix this in code, since this would produce integrity check failure. We must wait for official fix.

MichaIng added a commit that referenced this issue Dec 21, 2019
+ DietPi-Software | Nextcloud: Revert to v17.0.1 for fresh installs due to a bug introduced with v17.0.2 which breaks "occ maintenance:install": #3275
@MichaIng MichaIng added Workaround available 🆗 Workaround is available/has been implemented, but a definite solution should be found when possible. Waiting for external fix ⏳ and removed Investigating 🤔 labels Dec 21, 2019
@MichaIng MichaIng changed the title Nextcloud Fails to Install DietPi-Software | Nextcloud fails to Install Dec 21, 2019
@MichaIng
Copy link
Owner

@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

MichaIng added a commit that referenced this issue Dec 22, 2019
+ DietPi-Software | Nextcloud: Revert to v17.0.1 for fresh installs due to a bug introduced with v17.0.2 which breaks "occ maintenance:install": #3275
@Joulinar
Copy link
Collaborator

btw: I can confirm the one-liner workaround working 👍

@MichaIng MichaIng closed this as completed Jan 1, 2020
@MichaIng MichaIng added Solution available 🥂 Definite solution has been done and removed Workaround available 🆗 Workaround is available/has been implemented, but a definite solution should be found when possible. Waiting for external fix ⏳ labels Mar 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
External bug 🐞 For bugs which are not caused by DietPi. Solution available 🥂 Definite solution has been done
Projects
None yet
Development

No branches or pull requests

3 participants