Nextcloud Box 11.0.1 (production) on Raspberry Pi 2 errors after reboot

Hi,
just had to install a firmware update on my router, where my nextcloud box is connected.
Before that, erverything was working fine.

Now I can not connect anymore to my nextcloud box externaly (https://joergi.tk).
Localy I can connect but, get a lot of error messages:

Error core Doctrine\DBAL\Exception\DriverException: An exception occurred while executing ‘SELECT uid, displayname FROM oc_users WHERE LOWER(uid) = LOWER(?)’ with params [“admin”]: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away 2017-02-21T22:40:36+0100
Error core Doctrine\DBAL\Exception\DriverException: An exception occurred while executing ‘SELECT uid, displayname FROM oc_users WHERE LOWER(uid) = LOWER(?)’ with params [“admin”]: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away 2017-02-21T22:40:36+0100
Error index Doctrine\DBAL\Exception\DriverException: An exception occurred while executing ‘SELECT uid, displayname FROM oc_users WHERE LOWER(uid) = LOWER(?)’ with params [“admin”]: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away 2017-02-21T22:40:36+0100
Error PHP PDOStatement::execute(): Error reading result set’s header at /snap/nextcloud/863/htdocs/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php#91 2017-02-21T22:40:36+0100
Error PHP PDOStatement::execute(): MySQL server has gone away at /snap/nextcloud/863/htdocs/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php#91 2017-02-21T22:40:36+0100
Fatal cron An exception occurred while executing ‘UPDATE oc_jobs SET reserved_at = ‘0’ WHERE id = ?’ with params [“5”]: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away 2017-02-21T22:27:36+0100
Error PHP PDO::commit(): Error reading result set’s header at /snap/nextcloud/863/htdocs/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php#1216 2017-02-21T22:27:36+0100
Error PHP PDO::commit(): MySQL server has gone away at /snap/nextcloud/863/htdocs/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php#1216 2017-02-21T22:27:36+0100
Error core Doctrine\DBAL\Exception\DriverException: An exception occurred while executing ‘SELECT uid, displayname FROM oc_users WHERE LOWER(uid) = LOWER(?)’ with params [“admin”]: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away 2017-02-21T22:21:54+0100
Error core Doctrine\DBAL\Exception\DriverException: An exception occurred while executing ‘SELECT uid, displayname FROM oc_users WHERE LOWER(uid) = LOWER(?)’ with params [“admin”]: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away 2017-02-21T22:21:54+0100
Error index Doctrine\DBAL\Exception\DriverException: An exception occurred while executing ‘SELECT uid, displayname FROM oc_users WHERE LOWER(uid) = LOWER(?)’ with params [“admin”]: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away 2017-02-21T22:21:54+0100
Error PHP PDOStatement::execute(): Error reading result set’s header at /snap/nextcloud/863/htdocs/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php#91 2017-02-21T22:21:54+0100
Error PHP PDOStatement::execute(): MySQL server has gone away at /snap/nextcloud/863/htdocs/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php#91 2017-02-21T22:21:54+0100
Error index Doctrine\DBAL\Exception\DriverException: An exception occurred while executing ‘SELECT fileid, storage, path, parent, name, mimetype, mimepart, size, mtime, storage_mtime, encrypted, etag, permissions, checksum FROM oc_filecache WHERE storage = ? AND path_hash = ?’ with params [2, “91d214462bc9ea422ed1b0ffd72282ca”]: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away 2017-02-21T21:57:45+0100
Error PHP Error while sending QUERY packet. PID=15560 at /snap/nextcloud/863/htdocs/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php#91 2017-02-21T21:57:45+0100

Any idea?
thx

You’re describing two independent issues here - a router upgrade won’t cause database issues on your NC box.

On the router, check your port forwards are still working. When I check from here, I see that both 80 and 443 are not open on your domain, which resolves to 62.178.239.48.

http://www.yougetsignal.com/tools/open-ports/

Presumably your NC box uses the snap? I’ve seen this in other topics but can’t remember which at the moment. cc @oparoz

Well it’s database related, so perhaps the database user doesn’t have the right permissions to the nextcloud database? Could even be the directory the nextcloud files reside in don’t have the proper permissions

With the router firmware upgrade I just wanted to imply, that the network connection was resetted.
So I think there is nothing wrong with my router setup.

I rather think, that my hard reset (unplug power) of my nextcloud box caused an issue. After I was able to connect to the box again via shell, I tried a software reboot (shutdown -r 0), but the issue is still there.
Maybe there is an issue with my SSL certificate?

As I said, ports 80 and 443 were not open when I checked. You need those open on your router and correctly natted to get to the server from outside your network.

Your logs say MySQL went away, it’s a database issue.
You’re potentially right though, hard-resetting the box is generally not good for a DB server.

I agree, hard resetting is not a good idea… but I could not connect anymore…

so any idea how to fix my issues.
help would be very appriciated…

is there a way to switch back to an older snap maybe?
thx

ok, looks like I am going to reinstall the box from scratch… :-/

I would suggest savings yourself some time if this is indeed a production box by salvaging the mysql database

In addition it might be possible to repair the database itself.

Have you fixed the port issues on your router? If not it won’t matter how many times you start fresh. You won’t be able to access it remotely.

no, its a private box, so not urgent - thx :slight_smile:

I followed this post here:

at the moment I am facing the problem, that the box does not seem the get an ip address… waited for 6 hours…
going to reboot again…, wait and see…

so either, my nextcloud box does not want to boot or it does not get an ip address…
maybe my image/sdcard is corrupted.
is there an original image which I could use, and instructions how to install the image via windows 10?
thx

edit: ok, found it: Nextcloud Box OS images
edit2: installed the image, box is alive again…

1 Like

A post was split to a new topic: Error enabling SSL Nextcloud Box