Hi, nextcloud shows a blank page and desktop app cannot connect since i have updated to v158. all services are running without problems.
lighttpd log says
2017-11-17 01:51:47: (mod_fastcgi.c.2543) FastCGI-stderr: PHP message: PHP Fatal error: Uncaught Doctrine\DBAL\DBALException: Failed to connect to the database: An exception occured in driver: SQLSTATE[HY000] [1044] Access denied for user 'oc_admin'@'localhost' to database 'nextcloud' in /var/www/nextcloud/lib/private/DB/Connection.php:61
any ideas how to troubleshoot the isssue?
edit: i was able to solve it by editing /var/www/nextcloud/config/config.php and changing the mysql login data to root / dietpi, but i don’t understand what broke it…
i am aware of the alternatives, but i started to use dietpi because i was looking for a solution to host nextcloud specifically. anyhow, issue solved, linking this to the github issue so that michaling is aware of it.
It was more a hint from @johnvick , not especially only for you.Nore for all readers who will do a research for help.
Nice to see, you have post a link on github, so @MichaIng can have a look on it.
He work now for several months on this, and never give up! Really great job!
Wish here are more coder, who help @Fourdee to solve problems in code.
Hey there, yes I accidently introduced this bug with the last update. As database users were not removed in the past on uninstall, it slipped through tests.
Yes Nextcloud installation is under heavy rework, but this should not affect running systems, I will do way more testing an careful review before touching running systems again. So deeply sorry for that!
Simplest solution to fix database access is just to regrant access for the user, your nc instance uses, which should be oc_admin@localhost:
$ mysql -uroot -pdietpi -e “grant all privileges on nextcloud.* to ‘oc_admin’@‘localhost’”
You could also create a new user with that privilege just named oc_admin without host appendix, which will automatically bequieth it’s privileges to oc_admin@localhost, to totally restore the situation before bugdate:
$ mysql -uroot -pdietpi -e “grant all privileges on nextcloud.* to ‘oc_admin’ identified by ‘<password_from_config.php>’”
Giving Nextcloud root user access to database (set root and dietpi as dbuser and dbpass in config.php) is not recommended due to security reasons and will further not work for MariaDB setups.
Here PR to fix creation of bug and installation problems on MariaDB: https://github.com/Fourdee/DietPi/pull/1242
I am not yet sure if I should actually fix running systems on update or expact users to fix it by themself. I guess most users want to have their nc running fast again instead of waiting for next dietpi-update, or what you think?
So, for whatever reason, I had to reload DietPi on my Odroid XU4 and all went well except I am not able to install either Owncloud or Nextcloud. Install fails as noted by others in this forum … so my question is what should I do?? (Don’t be nasty) I was heavily using Owncloud between 3 computers and 4 phones at home with family members - actually Owncloud on the XU4 and Nextcloud app on our phones to auto upload pictures as the Owncloud app auto upload does not function.
Owncloud and Nextcloud fail install if Dietpi-software is used or apt-get install xx from the Owncloud/Nextcloud web site directions are used. I would be more than happy to test per directions posted here if that would help.
This does not delete your user files (don’t know about admin files, I do not store anything there), so you login via web page, add you old user and voila - your files are there. Most probably all other info would be gone, i.e. calendars etc. So use only if you have to.
We just released v159, which has some fixes for NextCloud. If the issue still occurs after updating, please let us know.
This does not delete your user files
Yep, we didnt really want to remove user data from NextCloud to avoid misuse. However, if problems persist, we may need to consider a complete removal system.
I have been following the git hub thread because last month my Nextcloud went down again.
Tried to reinstall my backed up image but it was foobar.
Did a fresh install. Worked fine on Sunday night when I finished, went to use it lastnight and it had a xxx is currently unable to handle this request.
HTTP ERROR 500
I have dietpi version 159 installed.
Also had to do a lot of work in apache to get port 443 to be recognized. It used to be done automatically before after letsencrypt was installed.
my Nextcloud also stopped working after the uodate to 158.
the proposed solution :
-uroot -pdietpi -e “grant all privileges on nextcloud.* to ‘oc_admin’@‘localhost’”
returns this error :
ERROR 1045 (28000): Access denied for user ‘root’@‘localhost’ (using password: YES)
any help would be appreciated. I spend a long time settings this up as the
install script did not work. The Let’s Encrypt script messed up everything.
Just sharing my experience with nextcloud with recent updates. I got 500 for both nextcloud and pihole after updating with apt a few weeks back. I googled the error message (I forgot what exactly the message was), and i was able to fix it by changing some config in PHP FPM and nginx. Sorry i could not remember what I googled so I could not find the URL.
What i changed was:
in /etc/php/7.0/fpm/pool.d/www.conf, find the line “listen = /run/php/php7.0-fpm.sock”, and change to “listen=127.0.0.1:9000”
in /etc/nginx/sites-available/default, find the part on “location ~ .php$”, and change like this
location ~ .php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass 127.0.0.1:9000;
}
Then restart php fpm and nginx, or simply do a reboot.
Everything works fine for me after changing these.
Just sharing my experience. I hope it helps but probably your problem was not caused by the same issue.
But keep in mind, that you changed your PHP + Nginx to listen/use TCP instead of local unix socket, which is not recommended on one-machine systems, especially for performance reasons.
I would suggest to find the reason, why the socket e.g. “/run/php/php7.0-fpm.sock” does not work as it should, if PHP and Nginx are configured to use it. I made many test installations the last month, including just today, with ownCloud, Nextcloud and also PiHole on different distro versions with Nginx and Lighttpd (both php-fpm) and using unix socket worked there.
On the other hand, never change a running system, if there is no reason to touch it anyway .
yeah because previously the php running was not 7.0, so the folder path changed but config was not updated. Im just lazy to change folder path again in case it updates again in the future haha.