Accidentally installed apache24 in freenas console

Status
Not open for further replies.

twsps

Contributor
Joined
Jul 10, 2018
Messages
113
Hi everyone,
While I was installing nextcloud on freenas, I accidentally installed apache24 in freenas console instead of jail console. Now my freenas.local turns to It works! instead of my web gui.
However, using freenas.local/ui is able to access new web gui and freenasip is able to access old gui.
How am I able to remove apache24 installation on my freenas?

Thanks.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
It may be as simple as reboot. (unless you did mount -uw / first, the changes you made to the host would not be permanent)

It should not have been possible to make that error as pkg is not configured on the host, only in jails.
 

twsps

Contributor
Joined
Jul 10, 2018
Messages
113
It may be as simple as reboot. (unless you did mount -uw / first, the changes you made to the host would not be permanent)

It should not have been possible to make that error as pkg is not configured on the host, only in jails.
It seems like freenas.local is linked to my jail's ip, so it's showing it works and nextcloud web interface when using freenas.local/nextcloud
How should I fix this?
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
It seems like freenas.local is linked to my jail's IP
So if you use the IP of your host to connect to the GUI?

If that works, it seems it would just be a case of having your jail not register the same dns name as the host.
 

twsps

Contributor
Joined
Jul 10, 2018
Messages
113
So if you use the IP of your host to connect to the GUI?

If that works, it seems it would just be a case of having your jail not register the same dns name as the host.
Yes, using FreeNAS' IP address (192.168.0.134) will get into old web GUI.

So if it's like this, how can I solve this?

Sent from my Mate 9 using Tapatalk
 

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,977

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,977
Then you didn't install it on the base system. That means you have a jail configuration issue to work out.
 

twsps

Contributor
Joined
Jul 10, 2018
Messages
113
Then you didn't install it on the base system. That means you have a jail configuration issue to work out.
My nextcloud iocage doesn't use vnet, when I enable vnet on nextcloud13, I'm not able to open nextcloud web gui after freenas restart. So how would I solve this?
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
My nextcloud iocage doesn't use vnet, when I enable vnet on nextcloud13, I'm not able to open nextcloud web gui after freenas restart. So how would I solve this?
Assuming that the problem is that the bridge for the vnet is not containing your NIC, you could create a tunable to add it.

Test first with ifconfig bridge0 addm igb0 up

I assume your NIC is igb0 in that example.
 

twsps

Contributor
Joined
Jul 10, 2018
Messages
113
Assuming that the problem is that the bridge for the vnet is not containing your NIC, you could create a tunable to add it.

Test first with ifconfig bridge0 addm igb0 up

I assume your NIC is igb0 in that example.
When I stop my Nextcloud iocage, then freenas.local will work fine and direct me to freenas web gui. So your estimation might be true.
This is what I found in Nextcloud iocage jail:
Code:
root@nextcloud:/ # ifconfig

re0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500

	options=82099<RXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_MAGIC,LINKSTATE>

	ether xx:xx:xx:xx:xx:xx

	hwaddr xx:xx:xx:xx:xx:xx

	inet 192.168.2.76 netmask 0xffffff00 broadcast 192.168.2.255 

	media: Ethernet autoselect (1000baseT <full-duplex>)

	status: active

lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384

	options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>

	groups: lo 

bridge0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500

	ether xx:xx:xx:xx:xx:xx

	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: epair1a flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>

			ifmaxaddr 0 port 5 priority 128 path cost 2000

	member: epair0a flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>

			ifmaxaddr 0 port 4 priority 128 path cost 2000

	member: re0 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>

			ifmaxaddr 0 port 1 priority 128 path cost 20000

epair0a: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500

	options=8<VLAN_MTU>

	ether xx:xx:xx:xx:xx:xx

	hwaddr xx:xx:xx:xx:xx:xx

	media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>)

	status: active

	groups: epair 

epair1a: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500

	options=8<VLAN_MTU>

	ether xx:xx:xx:xx:xx:xx

	hwaddr xx:xx:xx:xx:xx:xx

	media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>)

	status: active

	groups: epair


How can I fix?
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
If you run sysrc -a in the jail, do you see a host name defined?
 

twsps

Contributor
Joined
Jul 10, 2018
Messages
113
If you run sysrc -a in the jail, do you see a host name defined?
Code:
root@nextcloud:/ # sysrc -a

apache24_enable: yes

cron_flags:  -J 15

host_hostname: nextcloud

ipv6_activate_all_interfaces: YES

mysql_enable: YES

redis_enable: yes

sendmail_enable: NONE

sendmail_msp_queue_enable: NO

sendmail_outbound_enable: NO

sendmail_submit_enable: NO

syslogd_flags: -c -ss

 

twsps

Contributor
Joined
Jul 10, 2018
Messages
113
Code:
root@freenas:~ # ifconfig

re0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500

	options=82099<RXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_MAGIC,LINKSTATE>

	ether xx:xx:xx:xx:xx:xx

	hwaddr xx:xx:xx:xx:xx:xx

	inet 192.168.2.134 netmask 0xffffff00 broadcast 192.168.2.255 

	inet 192.168.2.76 netmask 0xffffff00 broadcast 192.168.2.255 

	nd6 options=9<PERFORMNUD,IFDISABLED>

	media: Ethernet autoselect (1000baseT <full-duplex>)

	status: active


I believe the underlined part is the issue. It directs me to the jail's ip
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
inet 192.168.2.134 netmask 0xffffff00 broadcast 192.168.2.255
inet 192.168.2.76 netmask 0xffffff00 broadcast 192.168.2.255
So I think what you're saying is that you have a second IP address defined on re0 on your FreeNAS host which is the same as your jail IP?

Under Network Interfaces in the GUI, what do you see? Have you added aliases to your main interface?
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
Also, do you have allow_raw_sockets in your jail (are we iocage here?... maybe try iocage get -a nextcloud)?
 

twsps

Contributor
Joined
Jul 10, 2018
Messages
113
So I think what you're saying is that you have a second IP address defined on re0 on your FreeNAS host which is the same as your jail IP?

Under Network Interfaces in the GUI, what do you see? Have you added aliases to your main interface?
Yes, image attached to what you're referring
 

Attachments

  • Screen Shot 2018-08-11 at 8.15.03 PM.png
    Screen Shot 2018-08-11 at 8.15.03 PM.png
    279.6 KB · Views: 309

twsps

Contributor
Joined
Jul 10, 2018
Messages
113
Also, do you have allow_raw_sockets in your jail (are we iocage here?... maybe try iocage get -a nextcloud)?
Yes, allow_raw_sockets=1 when setting iocage
Code:
allow_raw_sockets:1
ip4_addr:mynetworkinterface|jailip/24
vnet:off
vnet0_mac:xxxxxx,xxxxxxx
 
Status
Not open for further replies.
Top