Error downloading /ipaddress/owncloud/status.php after system crash


#1

Hi,

I'm not sure if this is the best place to post this, but I'm not sure if it's an OC error, or something else. My system crashed and since restarting I'm getting an error connecting to OC.

I've tried restoring to a couple of different backups, but I'm getting this same error each time.

In the desktop client the error is:

"No connection to ownCloud at https://myip/owncloud. 
Error downloading https://myip/owncloud/status.php - server replied: Internal Server Error"

When trying to log in via a browser, I just get a blank screen.

I've looked at the logs, and in ocdata/owncloud.log there's a very long entry which reads:

{"reqId":"\/vFnspqdK3N3dRgAcpxi","remoteAddr":"myip","app":"PHP","message":"Uncaught exception 'Doctrine\DBAL\DBALException' with message 'Failed to connect to the database: An exception occured in driver: SQLSTATE[HY000] [2002] Connection refused' in \/var\/www\/owncloud\/lib\/private\/DB\/Connection.php:58\nStack trace:\n#0 \/var\/www\/owncloud\/3rdparty\/doctrine\/dbal\/lib\/Doctrine\/DBAL\/Connection.php(429): OC\DB\Connection->connect()\n#1 \/var\/www\/owncloud\/3rdparty\/doctrine\/dbal\/lib\/Doctrine\/DBAL\/Connection.php(389): Doctrine\DBAL\Connection->getDatabasePlatformVersion()\n#2 \/var\/www\/owncloud\/3rdparty\/doctrine\/dbal\/lib\/Doctrine\/DBAL\/Connection.php(328): Doctrine\DBAL\Connection->detectDatabasePlatform()\n#3 \/var\/www\/owncloud\/3rdparty\/doctrine\/dbal\/lib\/Doctrine\/DBAL\/Connection.php(621): Doctrine\DBAL\Connection->getDatabasePlatform()\n#4 \/var\/www\/owncloud\/lib\/private\/DB\/Connection.php(141): Doctrine\DBAL\Connection->setTransactionIsolation(2)\n#5 \/var\/www\/owncloud\/3rdparty\/doctrine\/dbal\/lib\/Doctrine\/DBAL\/DriverManager.php(172): OC\DB\Connection->__construct(Array, Object(Doctrine\DBAL\Driver\PDOMySql\ at \/var\/www\/owncloud\/lib\/private\/DB\/Connection.php#58","level":3,"time":"2016-11-22T03:44:36+00:00","method":"GET","url":"\/owncloud\/status.php","user":"--"}

It seems to be talking about a connection error between php and MySQL, but I'm way out of my depth here.

Please, any help would be really appreciated.


#2

Hi,

it seems your database is somehow not running / down. The MySQL database needs to be restarted / started to solve this issue.


#3

Thanks RealRancor.

I've just restarted mysql...

# service mysql start
mysql start/running

And also restarted apache to be sure.

# service apache2 restart
 * Restarting web server apache2

Unfortunately I'm still getting the same error. Any other ideas?


#4

You might need to contact a community dedicated to your distro to get further help here. The PHP driver (not oC itself) just can't connect to the specific database for unknown reasons.


#5

Thanks RealRancor. If only the Ubuntu community was a supportive as you.

I've posted four requests for assistance over the last two months, and never received a response from any of them. I guess they are probably so swamped with threads they can't seem to get to them all.

Anyway, I'll give it another shot.


#6

Actually, I don't know if this helps, but here's the php log from...

/var/log/php-errors.log

[22-Nov-2016 10:02:25 UTC] PHP Fatal error: Uncaught exception 'Doctrine\DBAL\DBALException' with message 'Failed to connect to the database: An exception occured in driver: SQLSTATE[HY000] [2002] Connection refused' in /var/www/ownclou$
Stack trace:
0 /var/www/owncloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(429): OC\DB\Connection->connect()
1 /var/www/owncloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(389): Doctrine\DBAL\Connection->getDatabasePlatformVersion()
2 /var/www/owncloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(328): Doctrine\DBAL\Connection->detectDatabasePlatform()
3 /var/www/owncloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(621): Doctrine\DBAL\Connection->getDatabasePlatform()
4 /var/www/owncloud/lib/private/DB/Connection.php(141): Doctrine\DBAL\Connection->setTransactionIsolation(2)
5 /var/www/owncloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DriverManager.php(172): OC\DB\Connection->__construct(Array, Object(Doctrine\DBAL\Driver\PDOMySql\ in /var/www/owncloud/lib/private/DB/Connection.php on line 58

Looks like it could have something to do with a 3rdparty application?


#7

Hi,

the logfiles here shows the problem i've described above:

PHP just can't connect to your database.


#8

Ok, thanks for you help.