Resource icon

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

terrorbye

Dabbler
Joined
Dec 27, 2022
Messages
17
Hello now i am getting this error not sure how to solve it
not sure if it important my main isp router ip is (192.168.1.1)
while the actually router ip that ALL devices in my network use is 192.168.0.1

[ /mnt/tank/nextcloud/themes '=' /mnt/tank/nextcloud ]
+ echo 192.168.0.190
+ cut -f1 -d/
+ IP=192.168.0.190
+ echo 192.168.0.190
+ cut -f2 -d/
+ NETMASK=192.168.0.190
+ [ 192.168.0.190 '=' 192.168.0.190 ]
+ NETMASK=24
+ [ 24 -lt 8 ]
+ [ 24 -gt 30 ]
+ ls -A /mnt/tank/nextcloud/config
+ [ '' ]
+ cat
+ iocage create --name nextcloud -p /tmp/pkg.json -r 13.2-RELEASE 'interfaces=vnet0:bridge0' 'ip4_addr=em0|192.168.0.190/24' 'defaultrouter=192.168.0.1' 'boot=on' 'host_hostname=nextcloud' 'vnet=on'
nextcloud successfully created!

Stopped nextcloud due to VNET failure
+ echo 'Failed to create jail
Failed to create jail
+ exit 1

Command exit status: 1



and this i my config file:
JAIL_IP="192.168.0.190"
DEFAULT_GW_IP="192.168.0.1"
INTERFACE="em0"
POOL_PATH="/mnt/tank/nextcloud"
TIME_ZONE="Asia/Riyadh"
HOST_NAME="truenas.XXXX.com"
STANDALONE_CERT=1
CERT_EMAIL="pm@xxxx.com
COUNTRY_CODE="SA"
DB_PATH=" /mnt/tank/nextcloud/db"
FILES_PATH=" /mnt/tank/nextcloud/files"
CONFIG_PATH=" /mnt/tank/nextcloud/config"
THEMES_PATH=" /mnt/tank/nextcloud/themes"
 

victort

Guru
Joined
Dec 31, 2021
Messages
973
Hello now i am getting this error not sure how to solve it
not sure if it important my main isp router ip is (192.168.1.1)
while the actually router ip that ALL devices in my network use is 192.168.0.1

[ /mnt/tank/nextcloud/themes '=' /mnt/tank/nextcloud ]
+ echo 192.168.0.190
+ cut -f1 -d/
+ IP=192.168.0.190
+ echo 192.168.0.190
+ cut -f2 -d/
+ NETMASK=192.168.0.190
+ [ 192.168.0.190 '=' 192.168.0.190 ]
+ NETMASK=24
+ [ 24 -lt 8 ]
+ [ 24 -gt 30 ]
+ ls -A /mnt/tank/nextcloud/config
+ [ '' ]
+ cat
+ iocage create --name nextcloud -p /tmp/pkg.json -r 13.2-RELEASE 'interfaces=vnet0:bridge0' 'ip4_addr=em0|192.168.0.190/24' 'defaultrouter=192.168.0.1' 'boot=on' 'host_hostname=nextcloud' 'vnet=on'
nextcloud successfully created!

Stopped nextcloud due to VNET failure
+ echo 'Failed to create jail
Failed to create jail
+ exit 1

Command exit status: 1



and this i my config file:
JAIL_IP="192.168.0.190"
DEFAULT_GW_IP="192.168.0.1"
INTERFACE="em0"
POOL_PATH="/mnt/tank/nextcloud"
TIME_ZONE="Asia/Riyadh"
HOST_NAME="truenas.XXXX.com"
STANDALONE_CERT=1
CERT_EMAIL="pm@xxxx.com
COUNTRY_CODE="SA"
DB_PATH=" /mnt/tank/nextcloud/db"
FILES_PATH=" /mnt/tank/nextcloud/files"
CONFIG_PATH=" /mnt/tank/nextcloud/config"
THEMES_PATH=" /mnt/tank/nextcloud/themes"
You have 192.168.0.1 as your gateway in your config file, but you state above that you router (gateway) is 192.168.1.1

Is your subnet larger that /24?
 

terrorbye

Dabbler
Joined
Dec 27, 2022
Messages
17
I have 2 routers one form my isp that is crappy and basically use to convert fiber to ethenert (192.168.1.1) and my second router(192.168.0.1) with port forward from to use and works as i openvpn works

as for my subnet, how don't the only thing i found to subnet is this in my gateway (255.255.255.0)
 

victort

Guru
Joined
Dec 31, 2021
Messages
973
I have 2 routers one form my isp that is crappy and basically use to convert fiber to ethenert (192.168.1.1) and my second router(192.168.0.1) with port forward from to use and works as i openvpn works

as for my subnet, how don't the only thing i found to subnet is this in my gateway (255.255.255.0)
Your issue is likely the INTERFACE variable. Remove it from your config file.
 

terrorbye

Dabbler
Joined
Dec 27, 2022
Messages
17
so it started istalling then failed, then did it 3 more times before come with an error

Installing pkg...
pkg failed to install, retry #1

pkg failed to install, retry #2
pkg failed to install, retry #3

pkg error:
- pkg-static: http://pkg.freebsd.org/FreeBSD:13:amd64/quarterly/meta.txz: No address record
pkg-static: http://pkg.freebsd.org/FreeBSD:13:amd64/quarterly/packagesite.pkg: No address record
pkg-static: http://pkg.freebsd.org/FreeBSD:13:amd64/quarterly/packagesite.txz: No address record

Please check your network
+ echo ' Failed to create jail '
Failed to create jail
+exit 1




this is the full log if it isn't enough(edited of course to hid any sentetive data):

Script started, output file is nextcloud.log
+ id -u
+ [ 0 '=' 0 ]
+ JAIL_IP=''
+ JAIL_INTERFACES=''
+ DEFAULT_GW_IP=''
+ INTERFACE=vnet0
+ VNET=on
+ POOL_PATH=''
+ JAIL_NAME=nextcloud
+ TIME_ZONE=''
+ HOST_NAME=''
+ DATABASE=mariadb
+ DB_PATH=''
+ FILES_PATH=''
+ PORTS_PATH=''
+ CONFIG_PATH=''
+ THEMES_PATH=''
+ STANDALONE_CERT=0
+ SELFSIGNED_CERT=0
+ DNS_CERT=0
+ NO_CERT=0
+ CERT_EMAIL=''
+ DL_FLAGS=''
+ DNS_SETTING=''
+ CONFIG_NAME=nextcloud-config
+ NEXTCLOUD_VERSION=27
+ COUNTRY_CODE=US
+ readlink -f ./nextcloud-jail.sh
+ SCRIPT=/root/freenas-iocage-nextcloud/nextcloud-jail.sh
+ dirname /root/freenas-iocage-nextcloud/nextcloud-jail.sh
+ SCRIPTPATH=/root/freenas-iocage-nextcloud
+ [ -e /root/freenas-iocage-nextcloud/nextcloud-config ]
+ . /root/freenas-iocage-nextcloud/nextcloud-config
+ JAIL_IP=192.168.0.190
+ DEFAULT_GW_IP=192.168.0.1
+ POOL_PATH=/mnt/tank
+ TIME_ZONE=Asia/Riyadh
+ HOST_NAME=truenas.xxxxx.com
+ STANDALONE_CERT=1
+ CERT_EMAIL=pm@xxxxx.com
+ COUNTRY_CODE=SA
+ INCLUDES_PATH=/root/freenas-iocage-nextcloud/includes
+ openssl rand -base64 12
+ ADMIN_PASSWORD=oA6iyntwQW+I/axU
+ openssl rand -base64 16
+ DB_ROOT_PASSWORD='Pw7mrLjjIp0z3fMCYUh0pA=='
+ openssl rand -base64 16
+ DB_PASSWORD='rE6UnFWSCxf/bk/H7T0mqg=='
+ [ mariadb '=' mariadb ]
+ DB_NAME=MariaDB
+ freebsd-version
+ cut -d - -f -1
+ RELEASE=13.1-RELEASE
+ [ 13.1-RELEASE '=' 13.1-RELEASE ]
+ RELEASE=13.2-RELEASE
+ iocage get -p
+ zfs get -H -o value mountpoint tank/iocage
+ JAILS_MOUNT=/mnt/tank/iocage
+ [ -z 192.168.0.190 ]
+ [ -z '' ]
+ echo 'JAIL_INTERFACES not set, defaulting to: vnet0:bridge0'
JAIL_INTERFACES not set, defaulting to: vnet0:bridge0
+ JAIL_INTERFACES=vnet0:bridge0
+ [ -z 192.168.0.1 ]
+ [ -z /mnt/tank ]
+ [ -z Asia/Riyadh ]
+ [ -z truenas.xxxxxx.com ]
+ [ 1 -eq 0 ]
+ [ 1 -eq 1 ]
+ [ 0 -eq 1 ]
+ [ 0 -eq 1 ]
+ [ 0 -eq 1 ]
+ [ 1 -eq 1 ]
+ [ pm@xxxxxxx.com '=' '' ]
+ [ -z '' ]
+ DB_PATH=/mnt/tank/nextcloud/db
+ [ -z '' ]
+ FILES_PATH=/mnt/tank/nextcloud/files
+ [ -z '' ]
+ CONFIG_PATH=/mnt/tank/nextcloud/config
+ [ -z '' ]
+ THEMES_PATH=/mnt/tank/nextcloud/themes
+ [ -z '' ]
+ PORTS_PATH=/mnt/tank/portsnap
+ [ /mnt/tank/nextcloud/db '=' /mnt/tank/nextcloud/files ]
+ [ /mnt/tank/nextcloud/files '=' /mnt/tank/portsnap ]
+ [ /mnt/tank/portsnap '=' /mnt/tank/nextcloud/db ]
+ [ /mnt/tank/nextcloud/config '=' /mnt/tank/nextcloud/files ]
+ [ /mnt/tank/nextcloud/config '=' /mnt/tank/portsnap ]
+ [ /mnt/tank/nextcloud/config '=' /mnt/tank/nextcloud/db ]
+ [ /mnt/tank/nextcloud/themes '=' /mnt/tank/portsnap ]
+ [ /mnt/tank/nextcloud/themes '=' /mnt/tank/nextcloud/db ]
+ [ /mnt/tank/nextcloud/themes '=' /mnt/tank/nextcloud/config ]
+ [ /mnt/tank/nextcloud/db '=' /mnt/tank ]
+ [ /mnt/tank/nextcloud/files '=' /mnt/tank ]
+ [ /mnt/tank/portsnap '=' /mnt/tank ]
+ [ /mnt/tank/nextcloud/config '=' /mnt/tank ]
+ [ /mnt/tank/nextcloud/themes '=' /mnt/tank ]
+ echo 192.168.0.190
+ cut -f1 -d/
+ IP=192.168.0.190
+ echo 192.168.0.190
+ cut -f2 -d/
+ NETMASK=192.168.0.190
+ [ 192.168.0.190 '=' 192.168.0.190 ]
+ NETMASK=24
+ [ 24 -lt 8 ]
+ [ 24 -gt 30 ]
+ ls -A /mnt/tank/nextcloud/config
+ [ '' ]
+ cat
+ iocage create --name nextcloud -p /tmp/pkg.json -r 13.2-RELEASE 'interfaces=vnet0:bridge0' 'ip4_addr=vnet0|192.168.0.190/24' 'defaultrouter=192.168.0.1' 'boot=on' 'host_hostname=nextcloud' 'vnet=on'
nextcloud successfully created!

Testing Host DNS response to pkg.freebsd.org
Testing nextcloud's SRV response to pkg.freebsd.org
pkg.freebsd.org's SRV record could not be verified.

Testing nextcloud's DNSSEC response to pkg.freebsd.org

Installing pkg...
pkg failed to install, retry #1

pkg failed to install, retry #2
pkg failed to install, retry #3

pkg error:
- pkg-static: http://pkg.freebsd.org/FreeBSD:13:amd64/quarterly/meta.txz: No address record
pkg-static: http://pkg.freebsd.org/FreeBSD:13:amd64/quarterly/packagesite.pkg: No address record
pkg-static: http://pkg.freebsd.org/FreeBSD:13:amd64/quarterly/packagesite.txz: No address record

Please check your network
+ echo ' Failed to create jail '
Failed to create jail
+exit 1
 

victort

Guru
Joined
Dec 31, 2021
Messages
973
so it started istalling then failed, then did it 3 more times before come with an error

Installing pkg...
pkg failed to install, retry #1

pkg failed to install, retry #2
pkg failed to install, retry #3

pkg error:
- pkg-static: http://pkg.freebsd.org/FreeBSD:13:amd64/quarterly/meta.txz: No address record
pkg-static: http://pkg.freebsd.org/FreeBSD:13:amd64/quarterly/packagesite.pkg: No address record
pkg-static: http://pkg.freebsd.org/FreeBSD:13:amd64/quarterly/packagesite.txz: No address record

Please check your network
+ echo ' Failed to create jail '
Failed to create jail
+exit 1




this is the full log if it isn't enough(edited of course to hid any sentetive data):

Script started, output file is nextcloud.log
+ id -u
+ [ 0 '=' 0 ]
+ JAIL_IP=''
+ JAIL_INTERFACES=''
+ DEFAULT_GW_IP=''
+ INTERFACE=vnet0
+ VNET=on
+ POOL_PATH=''
+ JAIL_NAME=nextcloud
+ TIME_ZONE=''
+ HOST_NAME=''
+ DATABASE=mariadb
+ DB_PATH=''
+ FILES_PATH=''
+ PORTS_PATH=''
+ CONFIG_PATH=''
+ THEMES_PATH=''
+ STANDALONE_CERT=0
+ SELFSIGNED_CERT=0
+ DNS_CERT=0
+ NO_CERT=0
+ CERT_EMAIL=''
+ DL_FLAGS=''
+ DNS_SETTING=''
+ CONFIG_NAME=nextcloud-config
+ NEXTCLOUD_VERSION=27
+ COUNTRY_CODE=US
+ readlink -f ./nextcloud-jail.sh
+ SCRIPT=/root/freenas-iocage-nextcloud/nextcloud-jail.sh
+ dirname /root/freenas-iocage-nextcloud/nextcloud-jail.sh
+ SCRIPTPATH=/root/freenas-iocage-nextcloud
+ [ -e /root/freenas-iocage-nextcloud/nextcloud-config ]
+ . /root/freenas-iocage-nextcloud/nextcloud-config
+ JAIL_IP=192.168.0.190
+ DEFAULT_GW_IP=192.168.0.1
+ POOL_PATH=/mnt/tank
+ TIME_ZONE=Asia/Riyadh
+ HOST_NAME=truenas.xxxxx.com
+ STANDALONE_CERT=1
+ CERT_EMAIL=pm@xxxxx.com
+ COUNTRY_CODE=SA
+ INCLUDES_PATH=/root/freenas-iocage-nextcloud/includes
+ openssl rand -base64 12
+ ADMIN_PASSWORD=oA6iyntwQW+I/axU
+ openssl rand -base64 16
+ DB_ROOT_PASSWORD='Pw7mrLjjIp0z3fMCYUh0pA=='
+ openssl rand -base64 16
+ DB_PASSWORD='rE6UnFWSCxf/bk/H7T0mqg=='
+ [ mariadb '=' mariadb ]
+ DB_NAME=MariaDB
+ freebsd-version
+ cut -d - -f -1
+ RELEASE=13.1-RELEASE
+ [ 13.1-RELEASE '=' 13.1-RELEASE ]
+ RELEASE=13.2-RELEASE
+ iocage get -p
+ zfs get -H -o value mountpoint tank/iocage
+ JAILS_MOUNT=/mnt/tank/iocage
+ [ -z 192.168.0.190 ]
+ [ -z '' ]
+ echo 'JAIL_INTERFACES not set, defaulting to: vnet0:bridge0'
JAIL_INTERFACES not set, defaulting to: vnet0:bridge0
+ JAIL_INTERFACES=vnet0:bridge0
+ [ -z 192.168.0.1 ]
+ [ -z /mnt/tank ]
+ [ -z Asia/Riyadh ]
+ [ -z truenas.xxxxxx.com ]
+ [ 1 -eq 0 ]
+ [ 1 -eq 1 ]
+ [ 0 -eq 1 ]
+ [ 0 -eq 1 ]
+ [ 0 -eq 1 ]
+ [ 1 -eq 1 ]
+ [ pm@xxxxxxx.com '=' '' ]
+ [ -z '' ]
+ DB_PATH=/mnt/tank/nextcloud/db
+ [ -z '' ]
+ FILES_PATH=/mnt/tank/nextcloud/files
+ [ -z '' ]
+ CONFIG_PATH=/mnt/tank/nextcloud/config
+ [ -z '' ]
+ THEMES_PATH=/mnt/tank/nextcloud/themes
+ [ -z '' ]
+ PORTS_PATH=/mnt/tank/portsnap
+ [ /mnt/tank/nextcloud/db '=' /mnt/tank/nextcloud/files ]
+ [ /mnt/tank/nextcloud/files '=' /mnt/tank/portsnap ]
+ [ /mnt/tank/portsnap '=' /mnt/tank/nextcloud/db ]
+ [ /mnt/tank/nextcloud/config '=' /mnt/tank/nextcloud/files ]
+ [ /mnt/tank/nextcloud/config '=' /mnt/tank/portsnap ]
+ [ /mnt/tank/nextcloud/config '=' /mnt/tank/nextcloud/db ]
+ [ /mnt/tank/nextcloud/themes '=' /mnt/tank/portsnap ]
+ [ /mnt/tank/nextcloud/themes '=' /mnt/tank/nextcloud/db ]
+ [ /mnt/tank/nextcloud/themes '=' /mnt/tank/nextcloud/config ]
+ [ /mnt/tank/nextcloud/db '=' /mnt/tank ]
+ [ /mnt/tank/nextcloud/files '=' /mnt/tank ]
+ [ /mnt/tank/portsnap '=' /mnt/tank ]
+ [ /mnt/tank/nextcloud/config '=' /mnt/tank ]
+ [ /mnt/tank/nextcloud/themes '=' /mnt/tank ]
+ echo 192.168.0.190
+ cut -f1 -d/
+ IP=192.168.0.190
+ echo 192.168.0.190
+ cut -f2 -d/
+ NETMASK=192.168.0.190
+ [ 192.168.0.190 '=' 192.168.0.190 ]
+ NETMASK=24
+ [ 24 -lt 8 ]
+ [ 24 -gt 30 ]
+ ls -A /mnt/tank/nextcloud/config
+ [ '' ]
+ cat
+ iocage create --name nextcloud -p /tmp/pkg.json -r 13.2-RELEASE 'interfaces=vnet0:bridge0' 'ip4_addr=vnet0|192.168.0.190/24' 'defaultrouter=192.168.0.1' 'boot=on' 'host_hostname=nextcloud' 'vnet=on'
nextcloud successfully created!

Testing Host DNS response to pkg.freebsd.org
Testing nextcloud's SRV response to pkg.freebsd.org
pkg.freebsd.org's SRV record could not be verified.

Testing nextcloud's DNSSEC response to pkg.freebsd.org

Installing pkg...
pkg failed to install, retry #1

pkg failed to install, retry #2
pkg failed to install, retry #3

pkg error:
- pkg-static: http://pkg.freebsd.org/FreeBSD:13:amd64/quarterly/meta.txz: No address record
pkg-static: http://pkg.freebsd.org/FreeBSD:13:amd64/quarterly/packagesite.pkg: No address record
pkg-static: http://pkg.freebsd.org/FreeBSD:13:amd64/quarterly/packagesite.txz: No address record

Please check your network
+ echo ' Failed to create jail '
Failed to create jail
+exit 1
That’s progress.

Looks like maybe a network issue. Is your default gateway and DNS set to 192.168.0.1 on the TrueNAS main config?
 

terrorbye

Dabbler
Joined
Dec 27, 2022
Messages
17
gateway:yes
nameserver was set to:
1.1.1.1
8.8.8.8

will add the 192.168.0.1 to nameserver3 and will test again
 

terrorbye

Dabbler
Joined
Dec 27, 2022
Messages
17
Well no luck saw error here are a few picture that may help
1697565280019.png

1697565301472.png

1697565383157.png


current config file:
JAIL_IP=”192.168.0.190”
DEFAULT_GW_IP="192.168.0.1"
POOL_PATH="/mnt/tank"
TIME_ZONE="Asia/Riyadh"
HOST_NAME=”truenas.XXXXXXXX.com”
STANDALONE_CERT=1
CERT_EMAIL=pm@xxxx.com
COUNTRY_CODE=”SA”
 

victort

Guru
Joined
Dec 31, 2021
Messages
973
It still looks like a network error.

It says the SRV record can’t be verified.
Testing nextcloud's SRV response to pkg.freebsd.org
pkg.freebsd.org's SRV record could not be verified.
Are you sure network connectivity is working like it should? What happens when you manually create a jail and try to do pkg update and pkg upgrade?
 

terrorbye

Dabbler
Joined
Dec 27, 2022
Messages
17
I tried to download nextcloud via the plugins and was suprised to get an error, it didn't happen before
Error: nextcloud2 had a failure Exception: RuntimeError Message: + Acquiring DHCP address: FAILED, address received: 0.0.0.0/8 Stopped nextcloud2 due to DHCP failure Partial plugin destroyed

i wonder if it has to do with the vpn i setup to access the server remotley
 
Last edited:

terrorbye

Dabbler
Joined
Dec 27, 2022
Messages
17
yes google.com and my gateway can be ping,
i remember this happening to me a year ago but unfortunately i don't remember how i solved it. i think there is a problem with i switch that is connected to my truenas as the speed displayed should be 1000 and not 100 also people who use the switch always report connection problem with devices outside the switch, i will change the switch to a better one tomorrow and hopefully it might fix the issues.
 

tassevem

Dabbler
Joined
Oct 14, 2023
Messages
13
Hello, I recently installed nginx proxy manager, now I cannot access nextcloud... If I portforward on the router directly to nextcloud ip is ok and it is certified, but through the proxy manager I get a 502...

Does anyone know what is the solution?

1697988190873.png
 

victort

Guru
Joined
Dec 31, 2021
Messages
973

tassevem

Dabbler
Joined
Oct 14, 2023
Messages
13
Yes, everything is the same. I just added nginx because I need to be able to connect to more systems from outside of my network. If I point my port forwarding in the home router straight to the local IP it works great. I think it must be some caddy configuration.
 

victort

Guru
Joined
Dec 31, 2021
Messages
973
Yes, everything is the same. I just added nginx because I need to be able to connect to more systems from outside of my network. If I point my port forwarding in the home router straight to the local IP it works great. I think it must be some caddy configuration.
Did you add the Nginx IP to Nextcloud trusted proxies?

Also, in the global block of the caddy instance serving your Nextcloud install, you need to add your Nginx as a trusted proxy as well. See https://caddyserver.com/docs/caddyfile/options

The global block would look like this
Code:
{
  servers {
    trusted_proxies static 192.168.x.x
  }
}
 

tassevem

Dabbler
Joined
Oct 14, 2023
Messages
13
Still no good...
 

Attachments

  • caddy config.jpg
    caddy config.jpg
    116.8 KB · Views: 130
  • nextcloud_config.jpg
    nextcloud_config.jpg
    70.2 KB · Views: 139
Top