You are here
Moi Meme - Mon, 2019/09/23 - 18:36
Hi,
Everything installed OK on an AWS server, I can access Webmin and Adminer, but the main tool at https//my-ip gives a 500 error (after accepting the auto-signed SSL, I did not create one yet).
The logs give me
[Mon Sep 23 14:57:31.482011 2019] [php7:error] [pid 921] [client xxx] PHP Fatal error: Uncaught Doctrine\\DBAL\\DBALException: Failed to connect to the database: An exception occurred in driver: SQLSTATE[HY000] [2002] No such file or directory in /var/www/nextcloud/l:
Connecting to Webmin works OK.
Connecting to Adminer gives " No such file or directory "
I did read instructions and searched your faqs to no avail. Any idea what I did wrong, how to fix ?
Best regards.
Forum:
Hi there
Thanks for getting in touch.
Could you please share the AWS instance size and region that you are using? Then I can try to create the issue on my end.
My first guess is that for some reason the backend database has crashed. The fact that Adminer doesn't work and you are getting a 500 error from Nextcloud would be consistent with that guess.
I know that the resource requirements for Nextcloud have increased within the last few builds, and it also now requires (includes) Redis, so it may just be that it's now too heavy for the instance size you have chosen.
The first thing to try would be to double check the status of the MySQL/MariaDB server. Do that like this:
If that says that the status is "inactive (dead)" or "active (exited)" then I would try starting it and see if that fixes it. Do that like this:
Double check that it's now running by rechecking the status (as per above). It should say "active (running)"
Then see if you can log in. If it still doesn't work, double check the MySQL status again. if it's again crashed, that would suggest that the size server you are trying to run does not have sufficient resources.
As soon as I know the size and rgion, I'm happy to investigate further on my end.
Thanks for the reply. I chose
Thanks for the reply. I chose a t2.medium instance which I thought was the required size, in the closest location to us ie Paris, France.
Instance vCPU* CPU Credits / hour Mem (GiB)
t2.medium 2 12 4
I will test the commands you suggest for the DB,
Thanks.
The commands give
The commands give
admin@nextcloud ~$ systemctl status mysql
Failed to connect to bus: No such file or directory
The Start command gives the same
admin@nextcloud ~$ systemctl start mysql
Failed to connect to bus: No such file or directory
I had set a pretty restrictive security policy (connection from our IPs only) but no outgoing restriction, so I tried by "opening up" everything for a while, but no change.
Thank you.
This seems like the same
This seems like the same error, related ? It's above my level :-)
https://askubuntu.com/questions/813588/systemctl-failed-to-connect-to-bu...
Hi there, apologies on delayed response
Apologies on delayed response, I've been a bit unwell.
I'm pretty sure that the error message is because you need to be root when you run that command, so try prefixing it with sudo (FWIW by default all our servers use the root user account, however AWS MP servers are the exception to that rule). So if you could please retry them, prefixed with sudo.
Having said that, you note that it's a t2.medium sized server, that should have plenty enough resources, so this strikes me as especially weird. I'll launch one myself ASAP and see how I go. I'll post back if I have any luck.
Hello,
Hello,
Thanks for the reply and I hope you got better !
I could try those commands as root again, sorry for not detecting the required sudo option.
I indeed got a much more explicit message:
sudo systemctl status mysql
sudo systemctl start mysql
admin@nextcloud ~$ sudo systemctl start mysql
said nothing and seemed to work, and indeed after that:
and I now can see the Web admin to start the configuration.
So I guess it all boiled down to a database service not started install ? Not sure why though.
Have a nice day.
Yep, all good now! :)
Yes I'm much better now, thanks for your kind words.
Ok, so it sounds like MySQL (MariaDB technically) crashed for some reason. My suggestion is to have a little bit more of a dig and see if there are any hints in the logs. The MySQL log files should be in /var/log (I'm pretty sure they're called 'mysql.log' and 'mysql.err'). You can view them with 'cat', or if they're big, 'tail' ('tail -NUMBER_OF_LINES' - e.g. 'tail -30' to show the last 30 lines) might be better. Alternatively, you can view the journal using 'journalctl -u mysql' (will likely require sudo).
Although another option is to just see how it goes. Depending on why it crashed (e.g. if it ran out of RAM - which is my guess), it will likely crash again (maybe hours, days or perhaps even weeks). If you check the logs (as per above) as soon as it crashes (and before you try restarting it again) it may actually be easier to see why it crashed.
Regardless, good luck with it all.
Add new comment