Jail id changes after every reboot since I changed jail's netmask

Status
Not open for further replies.

saurav

Contributor
Joined
Jul 29, 2012
Messages
139
I have a single jail on a 8.3.1-RELEASE-p2-x64 system. To reconfigure my network for a new router, I had to change the jail's netmask from /24 to /16 (didn't change the IP). I stopped the Plugins service, changed the netmask and tried to start the Plugins service back. It wouldn't start, so I rebooted. After that, the jail id was 3 (it had always been 1 earlier).

I guess because of this, the plugins don't appear in the left side treeview of freenas gui anymore, even though they are running and I can access their gui at the jail's IP address. Also, they all appear "Off" under Services -> Plugins section. I also see this in the console log (jail ip: 192.168.1.250, freenas host ip: 192.168.1.144):
Code:
Jul 15 13:22:20 freenas manage.py: [freeadmin.navtree:416] Couldn't retrieve http://192.168.1.144/plugins/minidlna/_s/treemenu: HTTP Error 502: Bad Gateway


Correspondingly, in nginx-error.log:
Code:
2013/07/15 13:22:20 [error] 68128#0: *4222 kevent() reported about an closed connection (61: Connection refused) while reading response header from upstream, client: 192.168.1.144, server: localhost, request: "GET /plugins/minidlna/_s/treemenu HTTP/1.1", upstream: "fastcgi://192.168.1.250:12346", host: "192.168.1.144"


I tried adding a gateway for the jail in the gui amd specified the WebGUI Address explicitly. It didn't seem to help, and after rebooting again, the jail id became 6!

Both the freenas host and the jail are ping'able from each other. There is nothing else trying to use the jail's IP. I can access the internet from the jail, and the volumes mounted inside the jail are also available. It seems all the software inside the jail is running fine, but

1. The WebGUI is not able to contact/manage those software
2. The jail id changes on reboot

I have searched this forum and some folks have experienced similar issues, but I didn't see anything that can help me fix my problem (other than rebooting). Any advice? I can dig in more if I get some pointers as to where/what to look at.

Thanks,
Saurav.

ifconfig -a on the freenas host
Code:
bge0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
    options=c0099<RXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,VLAN_HWTSO,LINKSTATE>
    ether 68:b5:99:72:b6:5f
    inet 192.168.1.144 netmask 0xffff0000 broadcast 192.168.255.255
    media: Ethernet autoselect (1000baseT <full-duplex,flowcontrol,rxpause,txpause>)
    status: active
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
    options=3<RXCSUM,TXCSUM>
    inet6 fe80::1%lo0 prefixlen 64 scopeid 0x8
    inet6 ::1 prefixlen 128
    inet 127.0.0.1 netmask 0xff000000
    nd6 options=3<PERFORMNUD,ACCEPT_RTADV>
bridge0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
    ether 02:5e:ee:2d:95:00
    id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15
    maxage 20 holdcnt 6 proto rstp maxaddr 100 timeout 1200
    root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0
    member: bge0 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
            ifmaxaddr 0 port 1 priority 128 path cost 20000
    member: epair0a flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
            ifmaxaddr 0 port 10 priority 128 path cost 2000
epair0a: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
    options=8<VLAN_MTU>
    ether 02:a5:07:00:0a:0a
    media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>)
    status: active


ifconfig -a in the jail
Code:
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
        options=3<RXCSUM,TXCSUM>
        inet 127.0.0.1 netmask 0xff000000
        inet6 ::1 prefixlen 128
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
        nd6 options=3<PERFORMNUD,ACCEPT_RTADV>
epair0b: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=8<VLAN_MTU>
        ether 02:a5:07:00:0b:0b
        inet 192.168.1.250 netmask 0xffff0000 broadcast 192.168.255.255
        inet6 fe80::a5:7ff:fe00:b0b%epair0b prefixlen 64 scopeid 0x2
        nd6 options=3<PERFORMNUD,ACCEPT_RTADV>
        media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>)
        status: active
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
I'm not completely familiar with your exact issue as I never used jails in 8.x, but 9.x has a redesigned jail that is much more thoroughly integrated with the GUI and for most people "works properly". If you can, I'd recommend you upgrade to 9.x.
 

grendel69

Dabbler
Joined
Jul 20, 2013
Messages
20
In 9.x the jail id changes if you restart the jail, however reboot will reset it, this is a pain when you have cron jobs on a jail and temperamental plugins.:confused:
 

Dusan

Guru
Joined
Jan 29, 2013
Messages
1,165
In 9.x the jail id changes if you restart the jail, however reboot will reset it, this is a pain when you have cron jobs on a jail and temperamental plugins.:confused:
Why is that a problem? You can use jail names instead of jail ids with jexec. Or, you can use the cron that runs inside the jail.
 

grendel69

Dabbler
Joined
Jul 20, 2013
Messages
20
I wasn't aware that you could use the jail name and I can't see an option in the GUI for cron in the jail.

What you are saying is i can do something like:

jexec transmission_1 /usr/local/bin/transmission-remote 192.168.0.150:9091 -n "user:pwd" -t all -s

Is that the idea? it would solve a lot of problems.
 

grendel69

Dabbler
Joined
Jul 20, 2013
Messages
20
using the jail name solved my issue but that doesn't help the op. I was merely commenting that the same problem exists in 9.x as well.
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
...irrelevant as jail ID's are not supposed to be predictable. It is like complaining that your processes get assigned different process ID's every time you run a new one.
 

grendel69

Dabbler
Joined
Jul 20, 2013
Messages
20
Obviously it is relevant for some of us, that's why there's so many requests for a static jail ID and the ability to set it on jail creation has been added. A jail is quite different to a process, if I RESTART it I expect it to keep the ID, one point of a jail I feel is to enable a problematic program to be kept separate and if necessary restart it without having to reboot the whole system. My actual point was to the op that an upgrade to 9.x will not solve the issue as suggested earlier, though his problem is not the same as mine and could involve a lot of work to get everything working.

Unless of course you meant that it was irrelevant to the op's actual problem.
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
I suggest naming it if you require a persistent reference tag of some sort. The numbering mechanism was not designed to do what you seek. Trying to fit a square peg in a round hole can be made to work with sufficient effort, but sometimes it is better to use a system as designed and intended.
 

grendel69

Dabbler
Joined
Jul 20, 2013
Messages
20
Got that and as i said it works for my crons. On re-reading the op it is unclear what is being rebooted. If it was the whole system then the ID problem does not occur (for me anyway) in 9.x. It only happens when a jail is restarted. Thing is, is the jail ID changing what's causing the op's problem and would an upgrade to 9.x fix it?
 
Status
Not open for further replies.
Top