Resource icon

Scripted installation of Nextcloud 28 in iocage jail 2018-03-23

wille1101

Dabbler
Joined
Oct 20, 2018
Messages
16
I've checked it, and it isn't working:
Code:
 dan@dan-MacBookPro  ~  curl http://www.yourdomain.xyz/.well-known/acme-challenge/test
curl: (52) Empty reply from server
 ✘ dan@dan-MacBookPro  ~  curl http://yourdomain.xyz/.well-known/acme-challenge/test
<a href='http://www.yourdomain.xyz/.well-known/acme-challenge/test'>Found</a>.

So yourdomain.xyz is redirecting everything to www.yourdomain.xyz, and www.yourdomain.xyz isn't responding on anything other than the base URL (which returns the aforementioned Namecheap parking page). I suspect this means that your DNS records aren't actually pointing yourdomain.xyz to your server.

Alright, so I've fixed a new static public IP from my ISP and I'm now getting the certificate during the install which means that apache24 is running. However, when I try to access my domain I get ERR_TOO_MANY_REDIRECTS in chrome. Can you check if the test file is now working?
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,456
No, I'm getting a redirect too:
Code:
Dans-MacBook-Pro-4709% curl https://yourdomain.xyz
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>302 Found</title>
</head><body>
<h1>Found</h1>
<p>The document has moved <a href="https://yourdomain.xyz">here</a>.</p>
</body></html>

It's redirecting to itself, which obviously won't work. You've put the yourdomain.conf file back in place? What are its contents?
 

wille1101

Dabbler
Joined
Oct 20, 2018
Messages
16
You've put the yourdomain.conf file back in place? What are its contents?

Yes, here's the domain.xyz.conf:

Code:
[root@nextcloud /usr/local/etc/apache24/Includes]# cat domain.xyz.conf
<VirtualHost 192.168.1.147:80>
  DocumentRoot "/usr/local/www/apache24/data/nextcloud"
  ServerName domain.xyz
  RewriteEngine on
  RewriteRule ^/\.well-known/ - [L]
  RewriteRule (.*) https://domain.xyz [R,L]
  Alias "/.well-known/acme-challenge/" "/usr/local/www/apache24/data/.well-known/acme-challenge/"
  <Directory "/usr/local/www/apache24/data/.well-known/acme-challenge/">
	 Require all granted
	 Options -Indexes -FollowSymLinks
	 AllowOverride None
  </Directory>
</VirtualHost>

<VirtualHost 192.168.1.147:443>
  ServerAdmin admin@example.com
  ServerName domain.xyz
  DocumentRoot "/usr/local/www/apache24/data/nextcloud"
  RewriteEngine On
  RewriteCond %{HTTP:Authorization} ^(.*)
  RewriteRule .* - [e=HTTP_AUTHORIZATION:%1]
  #ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:9000/usr/local/www/apache24/data/nextcloud/$1
  <FilesMatch \.php$>
		 SetHandler "proxy:fcgi://localhost:9000"
  </FilesMatch>
  DirectoryIndex /index.php index.php
  SSLCertificateFile /usr/local/etc/pki/tls/certs/fullchain.pem
  SSLCertificateKeyFile /usr/local/etc/pki/tls/private/privkey.pem
  SSLEngine on
  # Modern configuration, tweak to your needs
  SSLProtocol			 all -SSLv3 -TLSv1 -TLSv1.1
  SSLCipherSuite		  ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256
  SSLHonorCipherOrder  on
  SSLCompression  off
#  SSLUseStapling on
  SSLSessionTickets	   off
#  SSLOpenSSLConfCmd DHParameters "/usr/local/etc/pki/tls/private/dhparams_4096.pem"
  SSLOptions +StrictRequire
  <Directory /usr/local/www/apache24/data/nextcloud>
  AllowOverride all
  </Directory>
  <IfModule mod_headers.c>
#  Header always set Strict-Transport-Security "max-age=15552000; includeSubDomains"
  </IfModule>
</VirtualHost>
 

Apollo

Wizard
Joined
Jun 13, 2013
Messages
1,449
I have tried running the script on a VM, as I have done numerous times for experimentation and the Standalone option in nexctloud-config once set doesn't execute let'sencrypt as I am also getting error messages about acme not being found.
 

wille1101

Dabbler
Joined
Oct 20, 2018
Messages
16
I have tried running the script on a VM, as I have done numerous times for experimentation and the Standalone option in nexctloud-config once set doesn't execute let'sencrypt as I am also getting error messages about acme not being found.
Try using .acme.sh/acme.sh instead of just acme.sh. It then works for me.
 

peter_cd.cn

Dabbler
Joined
Feb 9, 2018
Messages
39
My nextcloud is installed successfully. I followed the thread by dureal99d. Looks like this script is impoved upon that as well. I am having a really difficult time taking nextcloud site to be external accessible. I don't really understand what do I need. I have googled and read many different forums.

* Do I need to lease a domain from a domain leasing website? My wife has her website for a small business through WIX.com. For example, if her website is www.example.com. Can I add a cloud.example.com in WIX as a subdomain and use that for my nextcloud project? (I tried in WIX admin page, cloud.example.com just redirect me to the main page: www.example.com)

* Do I need to do a port forwarding in my router? I have dd wrt, I forwarded port from 443 to 443 on my nextcloud_jail_IP. And from port 80 to 80.

* what is this filename I should use for this file? Beside my wife's business website, I currently don't have a working website. Let's pretend the domain is www.example.com. Does the file name should be example.com? and all the 'yousite.com' in the file is same as file name? 'example.com' ??
Code:
<VirtualHost *:80>
DocumentRoot "/usr/local/www/apache24/data/nextcloud"
ServerName YOURSITE.com
RewriteEngine on
RewriteCond %{SERVER_NAME} =YOURSITE.com
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,QSA,R=permanent]
#ErrorLog ${APACHE_LOG_DIR}/error.log
#CustomLog ${APACHE_LOG_DIR}/access.log combined
<Directory /usr/local/www/apache24/data/nextcloud/>
Options +FollowSymlinks
AllowOverride All
<IfModule mod_dav.c>
Dav off
</IfModule>
SetEnv HOME /usr/local/www/apache24/data/nextcloud
SetEnv HTTP_HOME /usr/local/www/apache24/data/nextcloud
Satisfy Any
</Directory>
</VirtualHost>

* Below code start with nano command, he put a start after filename. Is that a typo? Filename should be matching the 'yousite.com' value in content, right? yousite.com == example.com for discussion purpose.
Code:
cd /usr/local/etc/apache24/Includes
nano YOURDOMAIN*

* In php.config file, the trusted domain part. Does this should be the same value as 'yousite.com'? yousite.com == example.com for discussion purpose.
Code:
'trusted_domains' =>
array (
   0 => '192.168.1.30',
   1 => 'coolp.to.org',<<<This line should be replaced with example.com?
),


* I am running into problems when trying to use
Code:
certbot certonly --webroot -w /usr/local/www/apache24/data/nextcloud -d YOURSITE.COM

When 'yousite.com' is something I made up. Meaning non-existing website. Above command seems to pass with no error. But I can't visit that non-existing site I used. If I use some real website for the value, for example my wife's small business website. I get an error 404. Unauthorized. This make sense, but I don't know how to become authorized.

* The more I think, the more I feel like I have to pay for another domain. Is that true? Can I use my wife's wix.com subscribed plan? (WIX calls it a "premium plan")

I finished all setup including the corn job. But haven't do the Force to https redirect, yet. Because the website is not accessible outside LAN. Even in http.

My setup:
FreeBSD 12.0-release
Apache 2.4
MariaDB 10.1
PHP 7.2 (but I followed the step for PHP7.0 and 7.1 to set the memecache to use Redis)
NextCloud 14.0.3


I am just really lost on what do I need to bring this local nextcloud site to public so I can use it with other family and friends.

Any pointer or guide will be greatly appreciated.
 
Last edited:

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,456
this doesnt seem to work any more on the most recent freenas release.
That's a completely useless comment. If you'll share the version of FreeNAS you're using and exactly what's happening, perhaps we can figure it out.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,456
I am having a really difficult time taking nextcloud site to be external accessible.
I'm not sure why you're raising this question here, since you didn't use the script, and thus details of your configuration may be a little different. But in general, to access your installation from the outside world, a few things have to be true:
  • You need to have a public domain name available. This can be a base domain (example.com), a subdomain (sub.example.com), or whatever, but it needs to be available for your use. Strictly speaking, this isn't essential, as you can browse by IP address as well, but for practical purposes it's needed.
  • You need to have DNS records pointing that domain name to your public IP address.
  • If your installation is behind a firewall (as it should be), ports 80 and 443 need to be forwarded to the internal IP of your FreeNAS jail.
  • You really should have a TLS certificate (self-signed or trusted), and configure your installation to use it.
Most of your other questions seem to ask about the details of implementing that, and I don't think this is the best place, or I'm the best person, to address those.
 

Apollo

Wizard
Joined
Jun 13, 2013
Messages
1,449
this doesnt seem to work any more on the most recent freenas release.
As mentioned on my last post, I couldn't make it work on my VM that day when I did a fresh install. Maybe this was a user error.
However, yesterday, I have been running the script on my server and all worked fine.
I suspect the server hosting the letsencrypt script might have been down causing those issues in the first place. Who knows.
BTW, I am running FreeNAS-11.2-RC1.
 

wille1101

Dabbler
Joined
Oct 20, 2018
Messages
16
I managed to solve the problem. I changed my SSL setting from flexible to full in cloudflare and now the redirects have stopped and nextcloud is up and running. Thank you danb35 for your help. I'm sorry for bothering you with something that ended up not really being relevant to your script.
 

peter_cd.cn

Dabbler
Joined
Feb 9, 2018
Messages
39
since you didn't use the script
Thanks for answering the question. I wish I did go with the script. I just discovered this later when I am mostly done with "doing it by hands". I looked into the script and mostly it is the same. I used NextCloud 14 instead the other thread says to use 13.

I will see how can I make the four bullets things happen. Thanks for the general pointer. I am much more clear on what I need to do now.
 

peter_cd.cn

Dabbler
Joined
Feb 9, 2018
Messages
39
I'm not sure why you're raising this question here, since you didn't use the script, and thus details of your configuration may be a little different. But in general, to access your installation from the outside world, a few things have to be true:
  • You need to have a public domain name available. This can be a base domain (example.com), a subdomain (sub.example.com), or whatever, but it needs to be available for your use. Strictly speaking, this isn't essential, as you can browse by IP address as well, but for practical purposes it's needed.
  • You need to have DNS records pointing that domain name to your public IP address.
  • If your installation is behind a firewall (as it should be), ports 80 and 443 need to be forwarded to the internal IP of your FreeNAS jail.
  • You really should have a TLS certificate (self-signed or trusted), and configure your installation to use it.
Most of your other questions seem to ask about the details of implementing that, and I don't think this is the best place, or I'm the best person, to address those.

Hi, sorry I am afraid that I have to come back to this thread for help. If there is somewhere else on the forum I should post. Please let me know.

I believe step 1 and 2 are done. If I visit cloud.example.com within my LAN(on home wifi), I landed on my router page (192.168.1.1). If I visit cloud.example.com over cellphone LTE, I can't connect to it.

If I use a DNS checker tool(https://dnschecker.org/), I can see the cloud.example.com propagate to my public IP. (Does this mean I have done step 1,2 correctly?)

I saw some message in the other nextcloud setup forum. I tried the certbot certonly --standalone to try to resolve the
SSLCertificateFile: file '/usr/local/etc/letsencrypt/live/cloud.example.com/fullchain.pem' does not exist or is empty
error.

--standalone and --webroot returns same error: (firewall problem.)

Some log for debugging purpose: why is my local address shows *:80 or *:443? Am I not port forwarding correctly? I saw the other poster Alex, has his local address to be: SOME-IP:80

Code:
root@nextcloud:~ # sockstat -l

USER	 COMMAND	PID   FD PROTO  LOCAL ADDRESS		 FOREIGN ADDRESS	

www	  httpd	  91543 4  tcp6   *:80				  *:*

www	  httpd	  91543 5  tcp4   *:80				  *:*

www	  httpd	  91543 6  tcp6   *:443				 *:*

www	  httpd	  91543 7  tcp4   *:443				 *:*

www	  httpd	  91506 4  tcp6   *:80				  *:*

www	  httpd	  91506 5  tcp4   *:80				  *:*

www	  httpd	  91506 6  tcp6   *:443				 *:*

www	  httpd	  91506 7  tcp4   *:443				 *:*

www	  httpd	  91141 4  tcp6   *:80				  *:*

www	  httpd	  91141 5  tcp4   *:80				  *:*

www	  httpd	  91141 6  tcp6   *:443				 *:*

www	  httpd	  91141 7  tcp4   *:443				 *:*

www	  httpd	  91140 4  tcp6   *:80				  *:*

www	  httpd	  91140 5  tcp4   *:80				  *:*

www	  httpd	  91140 6  tcp6   *:443				 *:*

www	  httpd	  91140 7  tcp4   *:443				 *:*

www	  httpd	  91139 4  tcp6   *:80				  *:*

www	  httpd	  91139 5  tcp4   *:80				  *:*

www	  httpd	  91139 6  tcp6   *:443				 *:*

www	  httpd	  91139 7  tcp4   *:443				 *:*

www	  httpd	  91138 4  tcp6   *:80				  *:*

www	  httpd	  91138 5  tcp4   *:80				  *:*

www	  httpd	  91138 6  tcp6   *:443				 *:*

www	  httpd	  91138 7  tcp4   *:443				 *:*

www	  httpd	  91137 4  tcp6   *:80				  *:*

www	  httpd	  91137 5  tcp4   *:80				  *:*

www	  httpd	  91137 6  tcp6   *:443				 *:*

www	  httpd	  91137 7  tcp4   *:443				 *:*

www	  httpd	  91136 4  tcp6   *:80				  *:*

www	  httpd	  91136 5  tcp4   *:80				  *:*

www	  httpd	  91136 6  tcp6   *:443				 *:*

www	  httpd	  91136 7  tcp4   *:443				 *:*

root	 httpd	  91135 4  tcp6   *:80				  *:*

root	 httpd	  91135 5  tcp4   *:80				  *:*

root	 httpd	  91135 6  tcp6   *:443				 *:*

root	 httpd	  91135 7  tcp4   *:443				 *:*

mysql	mysqld	 87036 20 tcp46  *:3306				*:*

mysql	mysqld	 87036 21 stream /tmp/mysql.sock

redis	redis-serv 86962 6  stream /tmp/redis.sock

root	 syslogd	86906 4  dgram  /var/run/log

root	 syslogd	86906 5  dgram  /var/run/logpriv

root@nextcloud:~ # service apache24 stop

Stopping apache24.

Waiting for PIDS: 91135.

root@nextcloud:~ # certbot certonly --standalone --preferred-challenges http -d cloud.example.com

Saving debug log to /var/log/letsencrypt/letsencrypt.log

Plugins selected: Authenticator standalone, Installer None

Obtaining a new certificate

Performing the following challenges:

http-01 challenge for cloud.example.com

Waiting for verification...

Cleaning up challenges

Failed authorization procedure. cloud.example.com (http-01): urn:ietf:params:acme:error:connection :: The server could not connect to the client to verify the domain :: Fetching http://cloud.example.com/.well-known/acme-challenge/somelongkeyvalue: Timeout during connect (likely firewall problem)

IMPORTANT NOTES:

 - The following errors were reported by the server:


   Domain: cloud.example.com

   Type:   connection

   Detail: Fetching

   http://cloud.example.com/.well-known/acme-challenge/somelongkeyvalue:

   Timeout during connect (likely firewall problem)


   To fix these errors, please make sure that your domain name was

   entered correctly and the DNS A/AAAA record(s) for that domain

   contain(s) the right IP address. Additionally, please check that

   your computer has a publicly routable IP address and that no

   firewalls are preventing the server from communicating with the

   client. If you're using the webroot plugin, you should also verify

   that you are serving files from the webroot path you provided.





My port forwarding setting via dropbox
 
Last edited:

r644

Cadet
Joined
Nov 4, 2018
Messages
1
Hi danb35, thanks for you great work and support. I'm struggling to get the script running using FreeNAS-11.2-RC1.

My config:
OS: FreeNAS-11.2-RC1
Board+CPU: Supermicro A2SDi-H-TF + Intel® Atom® Processor C3758
RAM: 32GB Samsung DDR4 2400MHz ECC
LAN: connected to Interface ix0,

Problem:

nextcloud-config:
Code:
JAIL_IP="172.28.5.8"
DEFAULT_GW_IP="172.28.5.1"
INTERFACE="ix0"
VNET="off"
POOL_PATH="/mnt/PATH/tank"
JAIL_NAME="nextcloud"
TIME_ZONE="Europe/Berlin" # See http://php.net/manual/en/timezones.php
HOST_NAME="nextcloud.mydomain.com" # reachable from internet
STANDALONE_CERT=1
DNS_CERT=0
SELFSIGNED_CERT=0
NO_CERT=0
TEST_CERT="--test"


The script does its job and starts by installing the packages:

Code:
Testing SRV response to FreeBSD
Testing DNSSEC response to FreeBSD

Installing pkg...


The script finishs successfully, but if when try to access Nextcloud, I get the FreeNAS Web Gui. I therefore followed your advice:

Strange--which version of FreeNAS are you running? IIRC, @cunningorb reported the same thing under 11.1-U2, but said it worked under 11.1-U4. I haven't seen this behavior under either version.

Can you try using virtual networking? Change the interface to "vnet0" and set VNET="yes" in nextcloud-config, clear out the db/ dataset, destroy the jail ( iocage destroy -f nextcloud), and run the script again.

In this case, the script finishs also without errors, but when I try to access nextcloud (tried with hostname/ip/port80 and 443), the connection is refused "ERR_CONNECTION_REFUSEDERR_CONNECTION_REFUSED"

ifconfig after the last step:

Code:
ix0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
		options=a400b9<RXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,VLAN_HWTSO,RXCSUM_IPV6>
		ether ac:1f:6b:41:2a:e2
		hwaddr ac:1f:6b:41:2a:e2
		inet 172.28.5.3 netmask 0xffffff00 broadcast 172.28.5.255
		nd6 options=9<PERFORMNUD,IFDISABLED>
		media: Ethernet autoselect (1000baseT <full-duplex,rxpause,txpause>)
		status: active
ix1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
		options=e407bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4,TSO6,LRO,VLAN_HWTSO,RXCSUM_IPV6,TXCSUM_IPV6>
		ether ac:1f:6b:41:2a:e3
		hwaddr ac:1f:6b:41:2a:e3
		nd6 options=9<PERFORMNUD,IFDISABLED>
		media: Ethernet autoselect
		status: no carrier
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
		options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
		inet6 ::1 prefixlen 128
		inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
		inet 127.0.0.1 netmask 0xff000000
		nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
		groups: lo
bridge0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
		ether 02:5a:9d:cf:6a:00
		nd6 options=1<PERFORMNUD>
		groups: bridge
		id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15
		maxage 20 holdcnt 6 proto rstp maxaddr 2000 timeout 1200
		root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0
		member: vnet0:16 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
				ifmaxaddr 0 port 6 priority 128 path cost 2000
		member: vnet0:5 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
				ifmaxaddr 0 port 5 priority 128 path cost 2000
		member: ix0 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
				ifmaxaddr 0 port 1 priority 128 path cost 2000
vnet0:5: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
		description: associated with jail: plexmediaserver-plexpass
		options=8<VLAN_MTU>
		ether 02:ff:60:42:a9:22
		hwaddr 02:1a:d0:00:05:0a
		nd6 options=1<PERFORMNUD>
		media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>)
		status: active
		groups: epair
vnet0:16: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
		description: associated with jail: nextcloud
		options=8<VLAN_MTU>
		ether 02:ff:60:76:13:ed
		hwaddr 02:1a:d0:00:06:0a
		nd6 options=1<PERFORMNUD>
		media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>)
		status: active
		groups: epair


Do you have any advices, that could help me to solve this? Or do you need more informations? Thanks in advance!

EDIT:

I guessed apache is not running, which is right:
Code:
/usr/local/etc/rc.d/apache24 start
Performing sanity check on apache24 configuration:
AH00526: Syntax error on line 27 of /usr/local/etc/apache24/Includes/nextcloud.mydomain.com.conf:
SSLCertificateFile: file '/usr/local/etc/pki/tls/certs/fullchain.pem' does not exist or is empty
Starting apache24.
AH00526: Syntax error on line 27 of /usr/local/etc/apache24/Includes/nextcloud.mydomain.com.conf:
SSLCertificateFile: file '/usr/local/etc/pki/tls/certs/fullchain.pem' does not exist or is empty
/usr/local/etc/rc.d/apache24: WARNING: failed to start apache24


I will check again the cert settings...
 
Last edited:

Apollo

Wizard
Joined
Jun 13, 2013
Messages
1,449
Hi r644,

Seems like it never got the certificate.
Are you sure Letsencrypt was successful at generating the key and request the certificate?

I would rerun the acme script in --test mode and --standalone within the iocage jail and see if you get it to work.

If all fails, you can create another iocage jail and run a fresh script install from there, making sure to disable the other jail running with the above IP address.

I have noticed a few times, prior to 11-2-RC1 that Pluggins and jails created from the web interface could cause issues.
Sometimes restarting the server would fix those issues.

With 11-2-RC1, iocage jails seem more stable and creating or destroying jails or pluggins no longer seem to cause routing issues.
 
Last edited:

rfanch3r

Dabbler
Joined
Aug 16, 2015
Messages
34
@danb35 I reported an issue on your github but it looks like you do not monitor it so posting here for assistance.

Running 11.1-U6 and currently have the following errors when running this script.

JAIL_IP="192.168.1.56"
DEFAULT_GW_IP="192.168.1.1"
INTERFACE="igb0"
VNET="off"
POOL_PATH="/mnt/Data"
JAIL_NAME="nextcloud"
TIME_ZONE="America/Los_Angeles" # See http://php.net/manual/en/timezones.php
HOST_NAME="FQDN"
STANDALONE_CERT=1
DNS_CERT=0
SELFSIGNED_CERT=0
NO_CERT=0
TEST_CERT="--test"

Shared object "libdl.so.1" not found, required by "bash", I see this line alot.

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2 "No such file or directory")
True
Repeats 6x
mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2 "No such file or directory")'
Check that mysqld is running and that the socket: '/tmp/mysql.sock' exists!

Shared object "libdl.so.1" not found, required by "bash"
True
Repeats 10x

iocage console nextcloud
Edit /etc/motd to change this login announcement.
Shared object "libdl.so.1" not found, required by "bash"

Then dumps me into the same exact dir as I started before issuing a iocage console command, I don't think I am actually in the jail at this point because I should be seeing nextcloud in the prompt line.

It also made the following dirs in /mnt/Data which I feel should have been made in its own jail dir?

db
files
portsnap

Does 11.1-U6 need those libs you described at the top of the page? I only saw mention of U3 and U4 and some comments saying that it worked fine in U3 and U4

So as a test I issued this line: iocage create -n nextcloud -r 11.1-RELEASE ip4_addr="vnet0|192.168.1.56/24" defaultrouter="192.168.1.1" vnet="on" allow_raw_sockets="1" boot="on"

This worked without issue and I was able to do a iocage console nextcloud and got the prompt I was expecting.
 
Last edited:

rfanch3r

Dabbler
Joined
Aug 16, 2015
Messages
34
Hi danb35,
I installed nextcloud with the script you posted on github and it worked well, on FreeNAS-11.1-U6. So thanks for putting it together!
I'm having issues after there was a power outage. FreeNAS is up, I use the GUI, but the nextcloud jail is not listed. Also, the pool (Storage->Volumes) shows as status LOCKED.
Do you know how I can bring nextcloud back up? And if there is a way to automate this for the next time the power goes down so I don't have to do it manually?
Thanks

Did you need to do anything special to get this to work in 11.1-U6?
 

gt2416

Patron
Joined
Feb 4, 2018
Messages
262
@danb35
Shared object "libdl.so.1" not found, required by "bash", I see this line a lot.
That error is not his script. FreeBSD 11.1 is end of life and the packages are broken for it. Most packages like bash are compiled to work with 11.2 EVEN if you change the freebsd pkg url as described in other posts. This is a common issue right now.
What I did was install freenas 11.2 in a vm and copy the libdl.so and libdl.so.1 to my jails /usr/lib and it works.
The real fix is wait for 11.2.
 

rfanch3r

Dabbler
Joined
Aug 16, 2015
Messages
34
That error is not his script. FreeBSD 11.1 is end of life and the packages are broken for it. Most packages like bash are compiled to work with 11.2 EVEN if you change the freebsd pkg url as described in other posts. This is a common issue right now.
What I did was install freenas 11.2 in a vm and copy the libdl.so and libdl.so.1 to my jails /usr/lib and it works.
The real fix is wait for 11.2.

You sure? That would not explain why I did not get the error when I made the jail by hand. Well thought I'd report it for 11.1-U6 for anyone else trying this, seems to be mixed results with others using 11.1-U6, last night I decided to bite the bullet and install 11.2RC1 so running the script again and will report back.

Though I do have a question before running it, can I specify having the dirs db/files/portsnap installed in the nextcloud dir rather than the main /mnt/Data dataset? Or was this just an issue with 11.1-U6?
 
Last edited:
Top