OPNsense Forum

Archive => 19.1 Legacy Series => Topic started by: Mastah on March 24, 2019, 02:05:36 pm

Title: Starting web GUI...failed.
Post by: Mastah on March 24, 2019, 02:05:36 pm
Somehow I wasn't able to connect to the WebUI. Rebooting didn't change the problem, still wasn't able to use WebUI.

Login as SSH was fine, so tried a few things.


First, tried to restart services. Failed.
Code: [Select]
  0) Logout                              7) Ping host
  1) Assign interfaces                   8) Shell
  2) Set interface IP address            9) pfTop
  3) Reset the root password            10) Firewall log
  4) Reset to factory defaults          11) Reload all services
  5) Power off system                   12) Update from console
  6) Reboot system                      13) Restore a backup

Enter an option: 11

Writing firmware setting...done.
Configuring login behaviour...done.
Configuring CRON...done.
Setting timezone...done.
Setting hostname: OPNsense.localdomain
Generating /etc/hosts...done.
Generating /etc/resolv.conf...done.
Configuring loopback interface...done.
Creating wireless clone interfaces...done.
Configuring VLAN interfaces...done.
Configuring WAN interface...done.
Configuring WIFI interface...done.
Configuring LAN interface...done.
Setting up routes...done.
Configuring firewall.......done.
Starting DHCPv4 service...done.
Starting DHCPv6 service...done.
Starting router advertisement service...done.
Starting NTP service...done.
Configuring OpenSSH...done.
Starting Unbound DNS...done.
Starting web GUI...failed.
Generating RRD graphs...done.



Second, tried to restart manually web ui. Failed.
Code: [Select]
/usr/local/sbin/lighttpd -f /var/etc/lighty-webConfigurator.conf
2019-03-24 13:53:46: (network.c.309) can't bind to socket: [2a01:cb08:1cb:xxxx:xxxx:xxxx:xxxx:xxxx]:443 Can't assign requested address



Third, tried to update. Success ?!
Code: [Select]
  0) Logout                              7) Ping host
  1) Assign interfaces                   8) Shell
  2) Set interface IP address            9) pfTop
  3) Reset the root password            10) Firewall log
  4) Reset to factory defaults          11) Reload all services
  5) Power off system                   12) Update from console
  6) Reboot system                      13) Restore a backup

Enter an option: 12

Fetching change log information, please wait... done

This will automatically fetch all available updates, apply them,
and reboot if necessary.

Proceed with this action? [y/N]: y

Updating OPNsense repository catalogue...
OPNsense repository is up to date.
All repositories are up to date.
Updating OPNsense repository catalogue...
OPNsense repository is up to date.
All repositories are up to date.
Checking for upgrades (0 candidates): . done
Processing candidates (0 candidates): . done
Checking integrity... done (0 conflicting)
Your packages are up to date.
Checking integrity... done (0 conflicting)
Nothing to do.
Nothing to do.
Starting web GUI...done.
Generating RRD graphs...done.



Finally, tried to restart all service. Success.
Code: [Select]
  0) Logout                              7) Ping host
  1) Assign interfaces                   8) Shell
  2) Set interface IP address            9) pfTop
  3) Reset the root password            10) Firewall log
  4) Reset to factory defaults          11) Reload all services
  5) Power off system                   12) Update from console
  6) Reboot system                      13) Restore a backup

Enter an option: 11

Writing firmware setting...done.
Configuring login behaviour...done.
Configuring CRON...done.
Setting timezone...done.
Setting hostname: OPNsense.localdomain
Generating /etc/hosts...done.
Generating /etc/resolv.conf...done.
Configuring loopback interface...done.
Creating wireless clone interfaces...done.
Configuring VLAN interfaces...done.
Configuring WAN interface...done.
Configuring WIFI interface...done.
Configuring LAN interface...done.
Setting up routes...done.
Configuring firewall.......done.
Starting DHCPv4 service...done.
Starting DHCPv6 service...done.
Starting router advertisement service...done.
Starting NTP service...done.
Configuring OpenSSH...done.
Starting Unbound DNS...done.
Starting web GUI...done.
Generating RRD graphs...done.


Each time I reboot the server, the WebUI fail to start !



System log

Code: [Select]
Mar 24 14:10:33 OPNsense kernel: em0: link state changed to DOWN
Mar 24 14:10:33 OPNsense sshlockout[67371]: sshlockout/webConfigurator v3.0 starting up
Mar 24 14:10:33 OPNsense kernel: vlan0: changing name to 'em0_vlan832'
Mar 24 14:10:33 OPNsense dhclient[51772]: /var/etc/dhclient_wan.conf line 8: rfc3118-auth: unexpected option name.
Mar 24 14:10:33 OPNsense dhclient[51772]:       request subnet-mask, broadcast-address, dhcp-lease-time, dhcp-renewal-time, dhc
Mar 24 14:10:33 OPNsense dhclient[51772]: ^
Mar 24 14:10:33 OPNsense dhclient[51772]: /var/etc/dhclient_wan.conf line 9: expecting a statement.
Mar 24 14:10:33 OPNsense dhclient[51772]:       send-interface
Mar 24 14:10:33 OPNsense dhclient[51772]:  ^
Mar 24 14:10:33 OPNsense dhclient[51772]: /var/etc/dhclient_wan.conf line 10: semicolon expected.
Mar 24 14:10:33 OPNsense dhclient[51772]:       vlan-id
Mar 24 14:10:33 OPNsense dhclient[51772]:  ^
Mar 24 14:10:36 OPNsense kernel:
Mar 24 14:10:36 OPNsense kernel: em0: link state changed to UP
Mar 24 14:10:36 OPNsense kernel: em0_vlan832: link state changed to UP
Mar 24 14:10:37 OPNsense dhclient: Starting delete_old_states()
Mar 24 14:10:37 OPNsense dhclient[51772]: DHCPDISCOVER on em0_vlan832 to 255.255.255.255 port 67 interval 6
Mar 24 14:10:37 OPNsense dhclient[51772]: DHCPOFFER from 80.xxx.xxx.xxx
Mar 24 14:10:37 OPNsense dhclient[51772]: unknown dhcp option value 0x5a
Mar 24 14:10:37 OPNsense dhclient[51772]: unknown dhcp option value 0x78
Mar 24 14:10:37 OPNsense dhclient[51772]: unknown dhcp option value 0x7d
Mar 24 14:10:39 OPNsense dhclient[51772]: DHCPREQUEST on em0_vlan832 to 255.255.255.255 port 67
Mar 24 14:10:39 OPNsense dhclient[51772]: DHCPACK from 80.xxx.xxx.xxx
Mar 24 14:10:39 OPNsense dhclient[51772]: unknown dhcp option value 0x5a
Mar 24 14:10:39 OPNsense dhclient[51772]: unknown dhcp option value 0x78
Mar 24 14:10:39 OPNsense dhclient[51772]: unknown dhcp option value 0x7d
Mar 24 14:10:39 OPNsense dhclient: Starting delete_old_states()
Mar 24 14:10:39 OPNsense dhclient: New IP Address (em0_vlan832): 86.xxx.xxx.xxx
Mar 24 14:10:39 OPNsense dhclient: New Subnet Mask (em0_vlan832): 255.xxx.xxx.xxx
Mar 24 14:10:39 OPNsense dhclient: New Broadcast Address (em0_vlan832): 86.xxx.xxx.xxx
Mar 24 14:10:39 OPNsense dhclient: New Routers (em0_vlan832): 86.xxx.xxx.xxx
Mar 24 14:10:39 OPNsense dhclient: route add default 86.xxx.xxx.xxx
Mar 24 14:10:39 OPNsense dhclient: Creating resolv.conf
Mar 24 14:10:39 OPNsense opnsense: /usr/local/etc/rc.newwanip: IP renewal deferred during boot on 'em0_vlan832'
Mar 24 14:10:39 OPNsense dhclient[51772]: bound to 86.xxx.xxx.xxx -- renewal in 84573 seconds.
Mar 24 14:10:39 OPNsense opnsense: /usr/local/etc/rc.bootup: Accept router advertisements on interface em0_vlan832
Mar 24 14:10:39 OPNsense dhcp6c[57696]: /var/etc/dhcp6c_wan.conf 3: Got raw option: 6 00:0b:00:xx:xx:xx:xx:xx
Mar 24 14:10:39 OPNsense dhcp6c[57696]: /var/etc/dhcp6c_wan.conf 3: Raw option 6 length 8 stored at 0x3d07cxxxxxx with data at 0x3d07cxxxxxx
Mar 24 14:10:39 OPNsense dhcp6c[57696]: /var/etc/dhcp6c_wan.conf 4: Got raw option: 15 00:2b:46:53:56:44:53:4c:5f:6c:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx
Mar 24 14:10:39 OPNsense dhcp6c[57696]: /var/etc/dhcp6c_wan.conf 4: Raw option 15 length 45 stored at 0x3d07cxxxxxx with data at 0x3d07cxxxxxx
Mar 24 14:10:39 OPNsense dhcp6c[57696]: /var/etc/dhcp6c_wan.conf 5: Got raw option: 16 00:00:04:0e:00:05:73:61:67:65:6d
Mar 24 14:10:39 OPNsense dhcp6c[57696]: /var/etc/dhcp6c_wan.conf 5: Raw option 16 length 11 stored at 0x3d07cxxxxxx with data at 0x3d07cxxxxxx
Mar 24 14:10:39 OPNsense dhcp6c[57696]: /var/etc/dhcp6c_wan.conf 6: Got raw option: 11 00:00:00:00:00:00:00:00:00:00:00:1a:09:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx
Mar 24 14:10:39 OPNsense dhcp6c[57696]: /var/etc/dhcp6c_wan.conf 6: Raw option 11 length 70 stored at 0x3d07cxxxxxx with data at 0x3d07cxxxxxx
Mar 24 14:10:39 OPNsense dhcp6c[57696]:     freeing op data at 0x3d07cxxxxxx
Mar 24 14:10:39 OPNsense dhcp6c[57696]:     freeing op data at 0x3d07cxxxxxx
Mar 24 14:10:39 OPNsense dhcp6c[57696]:     freeing op data at 0x3d07cxxxxxx
Mar 24 14:10:39 OPNsense dhcp6c[57696]:     freeing op data at 0x3d07cxxxxxx
Mar 24 14:10:39 OPNsense kernel: em2: link state changed to DOWN
Mar 24 14:10:39 OPNsense kernel:
Mar 24 14:10:39 OPNsense kernel: em1: link state changed to DOWN
Mar 24 14:10:40 OPNsense dhcp6c[78781]: Sending Solicit
Mar 24 14:10:40 OPNsense dhcp6c[78781]:     freeing op data at 0x3d07cxxxxxx
Mar 24 14:10:40 OPNsense dhcp6c[78781]:     freeing op data at 0x3d07cxxxxxx
Mar 24 14:10:40 OPNsense dhcp6c[78781]:     freeing op data at 0x3d07cxxxxxx
Mar 24 14:10:40 OPNsense dhcp6c[78781]:     freeing op data at 0x3d07cxxxxxx
Mar 24 14:10:40 OPNsense dhcp6c[78781]: Sending Request
Mar 24 14:10:40 OPNsense dhcp6c[78781]:     freeing op data at 0x3d07cxxxxxx
Mar 24 14:10:40 OPNsense dhcp6c[78781]:     freeing op data at 0x3d07cxxxxxx
Mar 24 14:10:40 OPNsense dhcp6c[78781]:     freeing op data at 0x3d07cxxxxxx
Mar 24 14:10:40 OPNsense dhcp6c[78781]:     freeing op data at 0x3d07cxxxxxx
Mar 24 14:10:40 OPNsense kernel: pflog0: promiscuous mode enabled
Mar 24 14:10:40 OPNsense dhcp6c[78781]: Received REPLY for REQUEST
Mar 24 14:10:40 OPNsense dhcp6c[78781]: add an address 2a01:cb08:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx/64 on em1
Mar 24 14:10:40 OPNsense dhcp6c: dhcp6c REQUEST on em0_vlan832
Mar 24 14:10:40 OPNsense dhcp6c: dhcp6c REQUEST on em0_vlan832 - running newipv6
Mar 24 14:10:40 OPNsense opnsense: /usr/local/etc/rc.newwanipv6: IP renewal deferred during boot on 'em0_vlan832'
Mar 24 14:10:40 OPNsense kernel: ...
Mar 24 14:10:40 OPNsense kernel: done.
Mar 24 14:10:40 OPNsense kernel: done.
Mar 24 14:10:40 OPNsense sshd[67550]: Server listening on ::1 port 22.
Mar 24 14:10:40 OPNsense sshd[67550]: Server listening on 127.0.0.1 port 22.
Mar 24 14:10:40 OPNsense sshd[67550]: error: Bind to port 22 on 2a01:cb08:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx failed: Can't assign requested address.
Mar 24 14:10:40 OPNsense sshd[67550]: error: Bind to port 22 on 2a01:cb08:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx failed: Can't assign requested address.
Mar 24 14:10:40 OPNsense sshd[67550]: Server listening on 192.168.1.1 port 22.
Mar 24 14:10:41 OPNsense opnsense: /usr/local/etc/rc.bootup: The command '/usr/local/sbin/lighttpd -f /var/etc/lighty-webConfigurator.conf' returned exit code '255', the output was '2019-03-24 14:10:41: (network.c.309) can't bind to socket: [2a01:cb08:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx]:443 Can't assign requested address'
Mar 24 14:10:41 OPNsense kernel: failed.
Mar 24 14:10:41 OPNsense opnsense: /usr/local/etc/rc.bootup: ROUTING: entering configure using defaults
Mar 24 14:10:41 OPNsense kernel: done.
Mar 24 14:10:41 OPNsense opnsense: /usr/local/etc/rc.bootup: ROUTING: no IPv4 default gateway set, assuming wan
Mar 24 14:10:41 OPNsense opnsense: /usr/local/etc/rc.bootup: ROUTING: no IPv6 default gateway set, assuming wan
Mar 24 14:10:41 OPNsense opnsense: /usr/local/etc/rc.bootup: ROUTING: setting IPv4 default route to 86.252.184.1
Mar 24 14:10:41 OPNsense opnsense: /usr/local/etc/rc.bootup: ROUTING: keeping current default gateway '86.252.184.1'
Mar 24 14:10:41 OPNsense opnsense: /usr/local/etc/rc.bootup: ROUTING: skipping IPv6 default route
Mar 24 14:10:41 OPNsense kernel: done.
Mar 24 14:10:41 OPNsense kernel: done.
Mar 24 14:10:41 OPNsense kernel: done.
Mar 24 14:10:41 OPNsense kernel: done.
Mar 24 14:10:41 OPNsense kernel: done.
Title: Re: Starting web GUI...failed.
Post by: franco on March 25, 2019, 07:46:24 am
You've set "Listen Interfaces" under System: Settings: Administration despite the warning.

Since it doesn't work for you, I would strongly advice you to heed the advice of the warning message and not use strict listen interfaces for the web GUI. It is a debatable security measure and can more easily and robustly carried out with a firewall block rule on interfaces that are not supposed to contact the GUI.


Cheers,
Franco
Title: Re: Starting web GUI...failed.
Post by: Mastah on March 25, 2019, 07:54:52 pm
You've set "Listen Interfaces" under System: Settings: Administration despite the warning.

I just simply upgraded to 19.x some week ago and seen this error recently. No change in configuration since about a year ago.
Title: Re: Starting web GUI...failed.
Post by: fabian on March 25, 2019, 09:25:00 pm
do you have the nginx plugin installed? if yes, you can use it instead of lighttpd to temprary serve the web interface by removing the '#' from this line in the config (https://github.com/opnsense/plugins/blob/master/www/nginx/src/opnsense/service/templates/OPNsense/Nginx/http.conf#L48) and restarting the service (service nginx restart). If not, you have to edit the /conf/config.xml using vim (pkg install vim-lite) by hand. Please note that this may break your installation so make sure you make a copy of the config.xml before you edit it.