Reset to HTTP

JimInNeavitt

Cadet
Joined
Oct 8, 2021
Messages
5
I made another newbie mistake. I set the HTTP -> HTTPS redirect checkbox on, without having set up any certificates first. After I did that, I can no longer access the GUI client. It also appears that I can't access the machine via SSH. I assume I must have forgotten to set something in the GUI to enable SSH prior to me making the other mistake. Is there a file or way to change the configuration back so it accepts HTTP via the command line?
Thanks,
Jim
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
From the console shell, try midclt call system.general.update "ui_httpsredirect":false.
 

JimInNeavitt

Cadet
Joined
Oct 8, 2021
Messages
5
Samuel,
I get an error when running this: "A dict was expected". I am enclosing a picture of the traceback.
Thanks,
Jim
 

Attachments

  • https_error.jpg
    https_error.jpg
    314.9 KB · Views: 383

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
Yeah, looks like you'll have to reinstall.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
without having set up any certificates first.
The system should have a default certificate. It would give you errors, naturally, as it isn't a trusted cert, but you should still be able to access the web GUI. What happens when you try?
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
Assuming the default cert is still there, try from the console shell: curl --basic -u root -k -X PUT "https://<your FreeNAS IP>/api/v2.0/system/general" -H "accept: */*" -H "Content-Type: application/json" -d '{"ui_httpsredirect":false}' .
 

JimInNeavitt

Cadet
Joined
Oct 8, 2021
Messages
5
Ok, the curl command fixed it. I did reboot after running the command as it didn't seem to work at first, but after the reboot, I can get in now via HTTP.

When I try to get in through HTTPS, I get these errors:
In Firefox, I get the following:
SSL received an unexpected Application Data record. Error code: SSL_ERROR_RX_UNEXPECTED_APPLICATION_DATA

In both chrome and Edge, I get the following:
The connection for this site is not secure
192.168.0.77 sent an invalid response.
ERR_SSL_PROTOCOL_ERROR

I will check out the information for getting https to work, but will use http in the mean time. Thanks for the help.
Regards,
Jim
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
I will check out the information for getting https to work
It's always good if you can use a trusted cert. I have some information on that:
 

calperin

Cadet
Joined
Jan 5, 2013
Messages
5
Finally this works for me:

sudo curl --basic -u root -k -X PUT "https://<Your TrueNAS IP/api/v2.0/system/general" -H "accept: */*" -H "Content-Type: application/json" -d '{"ui_httpsredirect":false}'

and Reboot the unit
 
Top