Can't access webGUI
-
After a change to my WAN port, I am no longer to access the webGUI. Everything else seems to be working - DNS assigning addresses, internet connection active, console accessible. But I cannot get any connection at the webGUI address.
When I try to restart the webconfigurator from the console, I get the following message:
Restarting webConfigurator...
Message from syslogd@ark at Nov 14 18:13:15 ...
nginx: 2021/11/14 18:13:15 [emerg] 61928#100494: bind() to 0.0.0.0:443 failed (48: Address already in use)Any way to fix this?
-
Use the console access, option 8.
Kill all 'nginx' instances manually.
Find them using :ps ax | grep 'nginx'
Go back to the menu and restart the Web configurator.
@pfguy2018 said in Can't access webGUI:
After a change to my WAN por
What change ?
How do you access the GUI ? using a device on LAN, connecting to the pfSense LAN IP, right ? Not working on a WAN is actually a good thing, as that is would be a security risk.
-
The change was from a cable modem connection in bridge mode (WAN interface set to IPv4, DHCP) to a fiber connection via PPPOE. As soon as this was done and the router rebooted, all services work fine, but access to the webGUI is lost (and yes, I am trying to access the webGUI from inside my network, not over the WAN). When I try to restart the webGUI from the console, I get a bunch of messages like the one I noted above.
I found this other thread https://forum.netgate.com/topic/151830/webgui-over-https-not-working-after-restoring-backup/5 where the same issue seems to be the problem. But I am not sure I understand how to fix it. Can you help?
-
@pfguy2018 @Gertjan pointed you in the direction.
Get on the console, if serial selection option 8 Shell. That gives you a shell as root on the pfSense device.
Then manually kill all the nginx instances that are running:
ps ax | grep nginx
that will give you a list of running processes:344 - S 0:21.57 php-fpm: pool nginx (php-fpm) 345 - S 0:26.21 php-fpm: pool nginx (php-fpm) 5373 - S 0:27.66 php-fpm: pool nginx (php-fpm) 10908 - S 0:00.00 sh -c ps ax | grep nginx 2>&1 11281 - S 0:00.00 grep nginx 86904 - S 0:02.72 php-fpm: pool nginx (php-fpm) 97727 - Is 0:00.00 nginx: master process /usr/local/sbin/nginx -c /var/ 97888 - S 0:00.12 nginx: worker process (nginx) 97969 - S 0:01.37 nginx: worker process (nginx)code_text
See the last three? Those are the ones you need to kill. First column is the PID, so kill them all:
kill PID where you put the number from the first column in.Then exit the shell (exit or ctrl-D) you should be back at the menu. Then select the "restart webconfigurator" option.
-
Thanks for that.
I was able to stop the openVPN server using the instructions in this thread https://forum.netgate.com/topic/131539/how-to-restart-openvpn-in-a-script/8
and then restart the webgui from the console. So I have access to the webgui now. But as noted in this thread https://forum.netgate.com/topic/151830/webgui-over-https-not-working-after-restoring-backup/5 , the problem will likely recur if I have to reboot. How can I fix this so that I don't lose webgui access with every restart?Also - when I restarted, there were two almost identical PHP errors:
PHP ERROR: Type: 64, File: /usr/local/sbin/pfSsh.php(374) : eval()'d code, Line: 29, Message: Cannot redeclare usage() (previously declared in /usr/local/sbin/pfSsh.php(374) : eval()'d code:30) @ 2021-11-15 09:39:09 -
@pfguy2018 The PHP errors are outside my knowledge, if the configuration is actually valid, I don't think the webgui should have a problem starting after boot (I personally have not experienced that).
When you restored the configuration, was it for this device? It's possible that something is confused because you say WAN went from a cable modem in bridge mode to fiber with PPOE, so maybe that affected the configuration.
If you can access the web gui now, I would go double check everything and make a backup. Sometimes GUIs (in general) may not update things correctly on restore if you've changed something.
That's all I have, hopefully someone with more knowledge can help.
-
@mer
It was not a restore - I just changed the configuration of the WAN interface from DHCP IPV4 to PPPOE, entered my credentials for the PPPOE connection. Then I added a new gateway using the WAN interface, made it the default, and deleted the old gateway. Then rebooted and ran into the webgui access problem. -
@pfguy2018 Ahh my mistake. The "restore from backup" I got from the thread URL you posted.
-
@pfguy2018 said in Can't access webGUI:
Then I added a new gateway using the WAN interface, made it the default, and deleted the old gateway.
A PPPoE connection should have added it's own gateway automatically. You should not need to anything but set that as default. The old dhcp gateway would usually be dynamic also and should have disappeared. It might have required a reboot or config reload to see that.
It seems likely you had manually added a gateway that was no longer valid or was somehow conflicting. A 0.0.0.0 IP like that is almost always as DHCP interface that has not yet received a lease. So I would suggest the dhcp WAN was still at least partially active and nginx was trying to listen on it. Rebooting should have resolved that though.Steve
-
@stephenw10
Hmm. And yet, when I rebooted again (with everything working), I lost webgui access again until I killed the OpenVPN server and restarted the webgui from console. Not sure what to do here. -
Problem now sorted. There was a port conflict between webgui and an OpenVPN server instance.
-
Ah, that would do it!