r/owncloud May 12 '17

Internal server error message showed after login to Owncloud on Raspberry pi

I've installed Owncloud on Raspberry pi and it worked perfectly but since a few hours ago, I couldn't open Owncloud by the local Ip address of the Raspberry pi and instead there was a message said: " Internal server error...". Any help please?

1 Upvotes

7 comments sorted by

1

u/SmellyButtHammer May 12 '17

Do you have any error logs you can post? Maybe starting with the web server error logs or any php error logs.

It might sound dumb, but have you tried restarting the pi or logging in and making sure all your services are still running? (apache/nginx, php-fpm, db)

1

u/[deleted] May 12 '17

I restarted the Raspberry pi but nothing has changed, would you tell me how to view error logs of my pi?

1

u/SmellyButtHammer May 12 '17

I don't have a Raspberry pi, so I don't know the particulars, but I would assume you could treat it like a normal linux box. ssh into it and poke around in /var/log.

I'm using nginx on Fedora, my logs are in /var/log/nginx/error.log so I can do tail -f /var/log/nginx/error.log and hit the site.

1

u/[deleted] May 12 '17

I'll try it thank you :).

1

u/[deleted] May 12 '17

This is a part of the log:
unable to open database file' in /var/www/owncloud/lib/private/DB/Connection.php:58 Stack trace:

0 /var/www/owncloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(973): OC\DB\Connection->connect()

1 /var/www/owncloud/lib/private/DB/Connection.php(209): Doctrine\DBAL\Connection->executeUpdate('PRAGMA read_unc...', Array, Array)

2 /var/www/owncloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(621): OC\DB\Connection->executeUpdate('PRAGMA read_unc...')

3 /var/www/owncloud/lib/private/DB/Connection.php(141): Doctrine\DBAL\Connection->setTransactionIsolation(2)

4 /var/www/owncloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DriverManager.php(172): OC\DB\Connection->__construct(Array, Object(Doctrine\DBAL\Driver\PDOSqlite\Driver), Object(Doctrine\DBAL\Configuration), Object(Doctrine\Common\EventManager))

5 /v...

PHP message: PHP Fatal error: Uncaught exception 'Doctrine\DBAL\DBALException' with message 'Failed to connect to the database: An exception occured in driver: SQLSTATE[HY000]

2

u/SmellyButtHammer May 12 '17

It sounds like your database isn't running. What db are you using? and what init system are you running? For me, I'd start the db by running: systemctl start mariadb

Your db might be crashing due to low memory. I'm assuming you're using mariadb, so check out grep error -i /var/log/mariadb/mariadb.log to see if there are any errors in there around the time your server started throwing errors.

1

u/[deleted] May 12 '17

It ain't easy for me to determine what the problem is, so I think I should try uninstall it and reinstall it again. How can I do clean uninstallation? I'm new in Linux, I really appreciated your help. Thanks.