Hello
I have Owncloud running in a 10.2 jail. Something seems to have caused an issue with Mysql as a connection to a database now throws an error.
Server configuration
Environment:Home server
Server: lighthttpd on freebsd 10.2
Database: Mysql 5.6
Client: Any
OC-Version: 8.2.5.2
PHP-Version: 5.6
Owncloud became non-responsive (unable to connect with the desktop sync tool and webpage), so I restarted services (restart the jail).
After the restart, I get the following error when accessing Owncloud:
Internal Server Error
The server encountered an internal error and was unable to complete your request.
The events worthy of mention in Owncloud log:
On June 24th, I upgraded the OC version as follow:
"message":"starting upgrade from 8.2.2.2 to 8.2.5.2","level":0
Then the log is quiet until yesterday (July 1):
Exception: {\"Message\":\"HTTP\\\/1.1 423 \\\"Pictures\\\/Lightroom\\\/Lightroom 5 Catalog.lrcat-chunking-121536809-149-148\\\" is locked\"
and
message":"Failed to connect to the database: An exception occured in driver: SQLSTATE[HY000] [2002] Connection refused","level":4
Not sure if this has anything to do with the issue, but the file Lightroom 5 Catalog.lrcat is big.
When I try to connect directly to Mysql, I get the following
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
I tried to change localhost to 127.0.0.1 as mentionned in some forums, no success.
I tried to stop/start Mysql with the console, but get the following error
"mysql not running? (check /var/db/mysql/owncloud.local.pid)."
Would anyone have suggestions for the next steps to resolve this issue? Or should I simply restore the last backup of the database? (I have a daily backup scheduled with the following command "/usr/local/bin/mysqldump --lock-tables -h localhost -u ....")
Thank you for your help
This is the old XigmaNAS forum in read only mode,
it will taken offline by the end of march 2021!
I like to aks Users and Admins to rewrite/take over important post from here into the new fresh main forum!
Its not possible for us to export from here and import it to the main forum!
it will taken offline by the end of march 2021!
I like to aks Users and Admins to rewrite/take over important post from here into the new fresh main forum!
Its not possible for us to export from here and import it to the main forum!
An exception occured in driver: SQLSTATE[HY000] [2002] Connection refused"
-
stephane
- NewUser

- Posts: 10
- Joined: 18 Apr 2014 18:39
- Status: Offline
-
stephane
- NewUser

- Posts: 10
- Joined: 18 Apr 2014 18:39
- Status: Offline
Re: An exception occured in driver: SQLSTATE[HY000] [2002] Connection refused"
Hello
Looks like the issue might be caused by the recent upgrade i made to the jail where the database reside, from freebsd 9.3 to 10.2. The mysql version is the package from 9.3. When i try to update it, (I am trying anything at this point to get MySql to start) the pkg command returns an error about a shared component missing libarchive.so.6.
Even though the mysql start command appears to work, the status confirms it is not.
Looks like the issue might be caused by the recent upgrade i made to the jail where the database reside, from freebsd 9.3 to 10.2. The mysql version is the package from 9.3. When i try to update it, (I am trying anything at this point to get MySql to start) the pkg command returns an error about a shared component missing libarchive.so.6.
Even though the mysql start command appears to work, the status confirms it is not.
-
stephane
- NewUser

- Posts: 10
- Joined: 18 Apr 2014 18:39
- Status: Offline
Re: An exception occured in driver: SQLSTATE[HY000] [2002] Connection refused"
For others that may one day have the same issue.. not sure what caused it, but Mysql would no longer start in the freebsd jail it was running. May have been caused by a update of freebsd or database corruption.. I don't think I'll ever know.
So the fix for me was to rebuild a new jail and reinstall everything from scratch, then restore the database backup I had.
Steph
So the fix for me was to rebuild a new jail and reinstall everything from scratch, then restore the database backup I had.
Steph