Hostname for a jail instance

Status
Not open for further replies.

Mark Stega

Dabbler
Joined
Dec 29, 2014
Messages
24
I am using FreeNAS to host music & video on a home network. I have it setup with a fixed IP at 192.168.1.98; I added a jail to run MySQL 5.6 and gave the jail an IP fixed address of 192.168.1.92. This instance of SQL is functioning.
My problem is that various Kodi (XBMC) clients are resolving the IP of the box to one of the two addresses seemingly in a random fashion. Windows boxes seem to usually get the .98 value, an OpenElec box has gotten both at different times. On Windows I can refer to the shares using "smb://192.168.1.98..." to 'fix' the address. Unfortunately OpenElec doesn't support the numeric form of an smb address.
My issue is that Kodi will scan the video source and if the IP address is not what is stored in the database it will add each video into the catalog, making duplicates.
Long winded way to ask if there is a way to give a different Hostname to the jail instance (or to suppress it from using a Hostname at all).
 
D

dlavigne

Guest
You can't change the hostname without recreating the jail. What are you using for name resolution in the network? e.g. does the DNS server have the IP/hostname pairs of each system? If not, are you adding these to the hosts file of each system?
 

Mark Stega

Dabbler
Joined
Dec 29, 2014
Messages
24
My DNS server that is resolving local names is my Verizon FIOS router. I don't see an option for a hostname for a jail in the options dialog. I could esaily remove the jail & recreate. Oddly, the fixed IP for the jail (192.168.1.92) does not show up in the device list of my router (all other fixed IP addresses such as the main FreeNAS (192.168.1.98) do show up).

So it seems that there are three options if I understand this:

1) Recreate the jail specifying a different hostname. (How?)
2) Relocate the MySQL instance to another server and just remove the jail.
3) Install MySQL directly on the FreeNAS server instance not using a jail.

#1 would be my choice, I just don't see how the hostname is specified for the jail (It would be nice if that was the name of the jail because then I'd have a hostname of MySql.local)
 
D

dlavigne

Guest
#1 would be my choice, I just don't see how the hostname is specified for the jail (It would be nice if that was the name of the jail because then I'd have a hostname of MySql.local)

It is. That is why the jail needs to be recreated to change the hostname as this field is read-only after jail creation.
 

Mark Stega

Dabbler
Joined
Dec 29, 2014
Messages
24
This may well be an issue with how my router is providing DNS resolution on the local net. When I do a tracert to the two IP addresses of the FreeNAS box I am getting the same name, that of the base installation. (.98 is the base IP, .92 is the jail (which is named MySql). Can you think of a way to determine if the jail is properly advertising its name and the router is messing up (or vice versa)?

C:\WINDOWS\system32>tracert 192.168.1.92

Tracing route to BEACHFIELD-NAS [192.168.1.92] over a maximum of 30 hops:

1 1 ms 1 ms 1 ms BEACHFIELD-NAS [192.168.1.92]

Trace complete.

C:\WINDOWS\system32>tracert 192.168.1.98

Tracing route to BEACHFIELD-NAS [192.168.1.98] over a maximum of 30 hops:

1 1 ms 1 ms 1 ms BEACHFIELD-NAS [192.168.1.98]

Trace complete.
 
D

dlavigne

Guest
Does the router allow you to create static reservations? If so, create one for the jail.
 

Mark Stega

Dabbler
Joined
Dec 29, 2014
Messages
24
My router does allow for static reservations. In looking at the interface I had my "Doh.." moment. The issue is that I have a single NIC, therefore one MAC address. The network summary in the FreeNAS shows both the .98 & .92 addresses on the same interface. Somehow the name resolution must be relying on the MAC address,

I will simply remove the jail for now and use another server for MySQL until I can upgrade the hardware of the NAS. (I am running on consumer grade h/w right now in a learning mode. I intend to migrate to a new box with redundant power supplies, ECC memory, dual NIC, more storage, etc. when I have enough experience with FreeNAS and all of the client software).

Thanks for the help, sorry it was my error.
 
D

dlavigne

Guest
In that case, faking the MAC address on the existing jail (there is a field for that) sounds like a workaround in the mean time.
 

Mark Stega

Dabbler
Joined
Dec 29, 2014
Messages
24
Almost perfect - The entry for .92 shows up in the ARP on the router under the fake MAC. The name of the jail does not resolve but that is OK as I refer to it by IP. Totally resolved (as far as I can tell) is the confusion this issue was causing in Kodi (XBMC) on OpenElec and Media Companion on Windows.
 
Status
Not open for further replies.
Top