Corrupt Jail

jstawski

Cadet
Joined
Dec 16, 2019
Messages
1
Hello, I have the Nextcloud plugin installed (went through UI) and only available through the internal network of my home. Everything was working fine as I was able to sync my photos through the iOS app. I then had to shutdown the FREENAS server for about a month and after starting it up I wasn't able to connect to the nextcloud instance. Troubleshooting the problem I first thought it was my router using a different IP, but I was able to configure my router to set the old IP as static. I was still unable to connect to the web interface. I went into the shell of the Jail and figured that NGINX was not running, furthermore the folder /usr/local/etc/rc.d is missing. I tried installing packages again through the command:

pkg install nginx

and I get:

The package management tool is not yet installed on your system.
Do you want to fetch and install it now? [y/N]:

After trying to fetch and install, I get:

Bootstrapping pkg from http://pkg.cdn.trueos.org/iocage/11.2-RELEASE, please wait...
pkg: Error loading revoked certificates

There seems to be something corrupt in my image and I have no idea how it got to this state.

I then went ahead and installed the plugin again on another Jail just to compare the services running:

Corrupted Jail
root@nextcloud:/var/log # service -e
/etc/rc.d/cleanvar
/etc/rc.d/netif
/etc/rc.d/newsyslog
/etc/rc.d/syslogd
/etc/rc.d/virecover
/etc/rc.d/cleartmp
/etc/rc.d/motd
/etc/rc.d/sshd
/etc/rc.d/cron

Brand new Jail:
root@nextcloud-2:/usr/local/etc/rc.d # service -e
/etc/rc.d/cleanvar
/etc/rc.d/netif
/etc/rc.d/newsyslog
/etc/rc.d/syslogd
/etc/rc.d/virecover
/etc/rc.d/motd
/usr/local/etc/rc.d/php-fpm
/usr/local/etc/rc.d/nginx
/usr/local/etc/rc.d/mysql-server
/etc/rc.d/cron

I would like to get back up and running with Nextcloud without losing any of my data or configuration as easily as possible. Are there any logs I can look at to see what might have caused this? Can I "reset" the Jail to it's factory default without loosing the data or configuration? Maybe I can setup the new Jail so it works with the data of the old one? Thanks for any help
 

blanchet

Guru
Joined
Apr 17, 2018
Messages
516
Do not use plugins except for tests.
For real workloads, setup your own jail from scratch so that you understand how things work to be able to repair if something goes wrong.

There are many tutorials on this forum to setup Nextcloud in a FreeNAS jail from scratch.
 
Top