Mistyped a tunable. WebUI, SMB share, & SSH are now inaccessible.

Windows7ge

Contributor
Joined
Sep 26, 2017
Messages
124
I was typing out a tunable when I mistyped a letter. I didn't realize my mistake until I already submitted it. I deleted the tunable and recreated it correctly but immediately after that I received 2 error messages and everything became inaccessible. Going into the CLI this is what it has been reporting:
Screenshot_2.png

The tunable I messed up was one of the following. I can't remember exactly which one:
Screenshot_3.png


If I can avoid having to reinstall FreeNAS that'd be great but it won't be catastrophic if that's my only option.
 

kdragon75

Wizard
Joined
Aug 7, 2016
Messages
2,457
On the console select option 9 for a shell then set the sysctl net.inet.tcp.xyz=value.

You may want to look up freeFre sysctl to double check the syntax but it should be that easy. One you can connect, set the correct value in the GUI.
 

Windows7ge

Contributor
Joined
Sep 26, 2017
Messages
124
On the console select option 9 for a shell then set the sysctl net.inet.tcp.xyz=value.

You may want to look up freeFre sysctl to double check the syntax but it should be that easy. One you can connect, set the correct value in the GUI.
The syntax as you wrote it worked. The problem began not with a wrong number but a wrong tunable. In one of those net.inet.tcp.recv- entries I forgot the "v" after deleting that tunable and rewriting it with the "v" everything stopped working.

I did go ahead and run those values over the command you mentioned but the output showed that their value was the same to begin with. Is there an "=default" command? I could run it over whichever I had mistakenly set.
 

kdragon75

Wizard
Joined
Aug 7, 2016
Messages
2,457
Nope but mine are the default:
net.inet.tcp.recvbuf_max: 2097152
net.inet.tcp.recvbuf_inc: 16384
net.inet.tcp.recvspace: 65536
 

8-bit Yoda

Explorer
Joined
Jun 16, 2018
Messages
68
I have these same values
Code:
[root@freenas] ~# sysctl -a | grep net.inet.tcp.rec
net.inet.tcp.recvspace: 65536
net.inet.tcp.recvbuf_max: 2097152
net.inet.tcp.recvbuf_inc: 16384
net.inet.tcp.recvbuf_auto: 1
 

Windows7ge

Contributor
Joined
Sep 26, 2017
Messages
124
Nope but mine are the default:
net.inet.tcp.recvbuf_max: 2097152
net.inet.tcp.recvbuf_inc: 16384
net.inet.tcp.recvspace: 65536
I have these same values
Code:
[root@freenas] ~# sysctl -a | grep net.inet.tcp.rec
net.inet.tcp.recvspace: 65536
net.inet.tcp.recvbuf_max: 2097152
net.inet.tcp.recvbuf_inc: 16384
net.inet.tcp.recvbuf_auto: 1
I changed all the settings to what you've both stated which did stop the buffer/samba related error messages however the WebUI is still inaccessible.
So I figured maybe I need to restart the interface. I went back to the menu and clicked 1, then reset the interface. It gave me this output:
Resetting interface configuration: Ok
Restarting network: Failed
Ok
Restarting routing: ok
...


Then where it's suppose to show you the IP's to access the WebUI:
The web interface could not be accessed.
Please check network configuration.
 

kdragon75

Wizard
Joined
Aug 7, 2016
Messages
2,457
If you can get to the GUI just remove all network tunables and reboot. Y may have to re setup your interface with an IP from the console menu.
 

Windows7ge

Contributor
Joined
Sep 26, 2017
Messages
124
If you can get to the GUI just remove all network tunables and reboot. Y may have to re setup your interface with an IP from the console menu.
Reconfigurating the interface and navigating to the IP brings me to this error screen:
Screenshot_1.png

This was the first thing I saw when the WebUI initially stopped working.
 

kdragon75

Wizard
Joined
Aug 7, 2016
Messages
2,457
And the only place you modifed anything was the UI with the exception of the commads we provided? Can you get back to the web UI and take a screenshot for the tunables page?
 

Windows7ge

Contributor
Joined
Sep 26, 2017
Messages
124
And the only place you modifed anything was the UI with the exception of the commads we provided? Can you get back to the web UI and take a screenshot for the tunables page?
Yes and I cannot. Trying to access the WebUI yields the before mentioned error page.
What I should have done before screwing around was create a known good copy of the sysconfig file and save it on the dataset. With that I could just reload the system to it's last good config even without the WebUI.

I went ahead and just factory reset FreeNAS cp /data/factory-v1.db /data/freenas-v1.db && reboot
From now on I'll keep an on & off system backup of the config file before screwing around.
 

SMnasMAN

Contributor
Joined
Dec 2, 2018
Messages
177
im in the same exact boat here. There has to be a way to edit or disable a tunable when you cant get to the web gui. In FN 8.3 you could use the loader option at the very first FN boot screen (the one with the ascii logo), but the loader option is gone now.

if i fix the tunable via shell, and then via shell service openssh restart, then i can ssh in (same goes for restarting nginx), however ig et the same an error has occured web page. (so clearly there is something else that i need to service xyz restart , so that auth begins working again via web, so i can get to the tunables page).

anyone know?

fwiw, im almost positive this was the tunable i enabled , from the 10g primer thread, that killed networking and services ability to startup properly:
net.inet.tcp.sendspace=2097152

(i only had 2x tuanbles in total, that above and this:
net.inet.tcp.sendbuf_inc=32768 )

(it must be impossible that post FN 8.3 there is no way to disable a tunable, short of wiping/reset you entire FN config- this is on a test system im messing with, so i would be really scared if this was a real fn sys).

if no recourse on bad tuanbles post FN 8.3, then tunables are a dead function. (as you need to reboot to test some of them, but if you reboot you may be screwed. OR if you just use sysctl xyz= from ssh/cli, then it doesnt apply at reboot , which some tunables require a reboot- see the logic problem here)

tks
 

SMnasMAN

Contributor
Joined
Dec 2, 2018
Messages
177
Top