danb35 / freenas-iocage-nextcloud

Script to create an iocage jail on FreeNAS for the latest Nextcloud 28 release, including Caddy, MariaDB or PostgreSQL, and Let's Encrypt
GNU General Public License v3.0
258 stars 69 forks source link

Database Fails to reconnect after reboot #56

Closed kazjim closed 5 years ago

kazjim commented 5 years ago

FreeNAS version FreeNAS-11.2-U2 (Build Date: Feb 14, 2019 20:8)

Run script - works perfectly, able to upload to Nextcloud site via FQDN with letsEncrypt certificte.

Reboot FreeNas box - NextCloud Web page returns error 500

Further investigation appears to show the database not reconnecting.

Quik fix is to delete the jail and db folders and re-run the script, but the MySQL user account appears to be getting 'brokwn' on reboot.,

kazjim commented 5 years ago

After resetting the MariaDB root password and checking the databases there appears to be no 'nextcloud' db

image

danb35 commented 5 years ago

I'm having trouble duplicating this. Here's the databases immediately after installation:

MariaDB [(none)]> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| nextcloud          |
| performance_schema |
+--------------------+
4 rows in set (0.00 sec)

MariaDB [(none)]> 

After restarting the jail, I'm still able to access Nextcloud, log in, view files, etc. After restarting the whole system, same result. The nextcloud database is still there, my added user is still there, all the files are still there.

ThomasVandenberghe162 commented 5 years ago

Having the exact same issue. Tried to run the nextcloud-script on FreeNAS-11.2-U2.1 Got to the dreadfull "Your Data directory is readable by other users Please change the permissions to 0770 so that the directory cannot be listed by other users."-nextcloud-page. However after restarting I just got a blank page (in firefox). In Edge I get a page 500-error. Did complete wipe of the jail and jaildata on my pool. After rerunning the script, I got again the same results. Is there a fix available? Thx, Thomas.

ThomasVandenberghe162 commented 5 years ago

another complete reinstall fixed my issue.

danb35 commented 5 years ago

There seems to be an issue in (at least) FreeNAS 11.2-U2.1 that removes mountpoints from jails on reboot. I've reported a bug (currently private since I've attached a debug file), but in the interim, you should be able to work by adding a mountpoint for the files and database datasets.

danb35 commented 5 years ago

This bug appears to be fixed in FreeNAS 11.2-U3.