Network misconfigured

Status
Not open for further replies.

claystuckey

Cadet
Joined
Oct 25, 2012
Messages
4
Through a series of unfortunate mistakes, we have broken networking on our freenas server. I am able to console into the host. When I reboot, I get the following error message:

ifconfig: create: bad value

This error message prints more times than I could count. I was able to hit <ctrl> C a bunch of times and log in to the shell. I am not able to get to the freenas console to reconfigure the network. Any help is GREATLY appreciated!


From my minimal understanding, I will need to launch the freenas software in order to make any changes that persist reboots.
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,681
If you were able to log into the shell via the FreeNAS console setup menu, there are also options on that menu to configure network interfaces, which is probably what you need to do.

If the system is up but it's just the networking that's broken, you can also use "ifconfig" to temporarily configure networking. "ifconfig -a" will show the interface configuration. If you have an "em0" device, then you do "ifconfig em0 inet 10.1.1.2 netmask 0xffffff00" or whatever's right in your environment, and your FreeNAS server should hopefully appear at that address. There are potentially other hurdles beyond this; if you can use the console setup menu, your life will tend to be easier.
 

claystuckey

Cadet
Joined
Oct 25, 2012
Messages
4
I can get in via single user mode. I can ifconfig. While the IP appears to take and other hosts can ping it, all ports are blocked. I can 't get the console menu to come up. If I execute /etc/rc.d/netif start, I get into the loop of errors again. I believe the network has to some up natively for me to be able to access the web interface to reconfigure the network. The /etc/rc.conf has no network config. The broken config is in freenas itself.
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,681
Right, well, that's uglier. What specific version of FreeNAS?
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,681
Here's what I'd try, which I haven't tried, so some handwaving.

Go to singleuser.

Do a "mount -a"

"cd /data"

See if it contains your configurations, like

-rw-r--r-- 1 www www 162816 Oct 13 2011 factory-v1.db
-rw-r--r-- 1 root www 185344 Oct 26 11:12 freenas-v1.db
-rw-r--r-- 1 root www 163840 Nov 8 2011 freenas-v1.db.bak
-rw-r--r-- 1 root www 2150510 Oct 26 11:00 rrd_dir.tar.bz2

If so - suggest copying "freenas-v1.db" to a differently-named backup file, pronto, like "freenas-v1.db.bad"

Then wade on in:

% sqlite3 /data/freenas-v1.db
sqlite> select * from network_interfaces;

and report back on what that says, and also report what you actually have in the system (as reported by ifconfig -a).
 

JaimieV

Guru
Joined
Oct 12, 2012
Messages
742
Depending on the complexity of claystuckey's setup (and whether he's got a config backup from before the trouble) it might be quicker and easier to create a new FreeNAS USB stick and configure that up?

(I'd probably then pop the old USB stick into a VM host and work out what the issue was)
 
Status
Not open for further replies.
Top