Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Fresh install: WAN goes down and 502 Bad Gateway

    Scheduled Pinned Locked Moved General pfSense Questions
    3 Posts 2 Posters 578 Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A Offline
      andresmorago
      last edited by andresmorago

      Hello to all

      Im having some issues with a fresh installation of pfsense. i have tried two different builds:

      2.4.5-RELEASE-p1 (amd64)
      FreeBSD 11.3-STABLE

      2.5.0-RC (amd64)
      built on Wed Feb 10 09:40:34 EST 2021
      FreeBSD 12.2-STABLE

      My device:
      Lenovo m93p Tiny
      480gb SSD (Kingston 480GB A400 SATA 3 SSD SA400S37/480G)
      8gb RAM

      WAN NIC is a TP-Link USB to Ethernet Adapter (UE305)
      LAN NIC is the embedded on the device

      System starts good but out of a sudden, WAN connectivity will go down and i start getting a 502 Bad gateway error when trying to access pfsense web gui. After this, system is unresponsive except for ssh.

      when checking logs i see this:
      dhcpd.log will show some weird stuff

      Feb 11 08:10:52 svr00 dhclient[28884]: PREINIT
      Feb 11 08:10:52 svr00 dhclient[28489]: DHCPREQUEST on ue0 to 255.255.255.255 port 67
      Feb 11 08:10:52 svr00 dhclient[28489]: ip length 328 disagrees with bytes received 332.
      Feb 11 08:10:52 svr00 dhclient[28489]: accepting packet with data after udp payload.
      Feb 11 08:10:52 svr00 dhclient[28489]: DHCPACK from 100.70.133.80
      Feb 11 08:10:52 svr00 dhclient[29937]: REBOOT
      Feb 11 08:10:52 svr00 dhclient[30347]: Starting add_new_address()
      Feb 11 08:10:52 svr00 dhclient[30652]: ifconfig ue0 inet 181.xx.xx.xxx netmask 255.255.252.0 broadcast 181.53.43.255 
      Feb 11 08:10:52 svr00 dhclient[30870]: New IP Address (ue0): 181.xx.xx.xxx
      Feb 11 08:10:52 svr00 dhclient[31148]: New Subnet Mask (ue0): 255.255.252.0
      Feb 11 08:10:52 svr00 dhclient[31418]: New Broadcast Address (ue0): 181.53.43.255
      Feb 11 08:10:52 svr00 dhclient[31643]: New Routers (ue0): 181.53.40.1
      Feb 11 08:10:52 svr00 dhclient[31850]: Adding new routes to interface: ue0
      Feb 11 08:10:52 svr00 dhclient[32689]: /sbin/route add -host 181.53.40.1 -iface ue0
      Feb 11 08:10:52 svr00 dhclient[33116]: /sbin/route add default 181.53.40.1
      Feb 11 08:10:52 svr00 dhclient[33349]: Creating resolv.conf
      Feb 11 08:10:52 svr00 dhclient[28489]: bound to 181.xx.xx.xxx -- renewal in 1966 seconds.
      Feb 11 08:10:55 svr00 dhclient[34658]: ue0 link state up -> down
      Feb 11 08:10:55 svr00 dhclient[34658]: ue0 link state down -> up
      Feb 11 08:10:55 svr00 dhclient[34658]: DHCPREQUEST on ue0 to 255.255.255.255 port 67
      Feb 11 08:10:55 svr00 dhclient[34658]: ue0 link state up -> down
      Feb 11 08:10:55 svr00 dhclient[34658]: ue0 link state down -> up
      Feb 11 08:10:55 svr00 dhclient[34658]: DHCPREQUEST on ue0 to 255.255.255.255 port 67
      Feb 11 08:10:55 svr00 dhclient[34658]: ue0 link state up -> down
      Feb 11 08:10:55 svr00 dhclient[34658]: ue0 link state down -> up
      Feb 11 08:10:55 svr00 dhclient[34658]: DHCPREQUEST on ue0 to 255.255.255.255 port 67
      Feb 11 08:10:55 svr00 dhclient[34658]: ue0 link state up -> down
      Feb 11 08:10:55 svr00 dhclient[34658]: ue0 link state down -> up
      Feb 11 08:10:55 svr00 dhclient[34658]: DHCPREQUEST on ue0 to 255.255.255.255 port 67
      Feb 11 08:10:55 svr00 dhcp6c[46139]: failed to open /usr/local/etc/dhcp6cctlkey: No such file or directory
      Feb 11 08:10:55 svr00 dhcp6c[46139]: failed initialize control message authentication
      Feb 11 08:10:55 svr00 dhcp6c[46139]: skip opening control port
      Feb 11 08:10:55 svr00 dhclient[34658]: ue0 link state up -> down
      Feb 11 08:10:55 svr00 dhclient[34658]: ip length 328 disagrees with bytes received 332.
      Feb 11 08:10:55 svr00 dhclient[34658]: accepting packet with data after udp payload.
      Feb 11 08:10:55 svr00 dhclient[34658]: ue0 link state down -> up
      Feb 11 08:10:55 svr00 dhclient[34658]: DHCPREQUEST on ue0 to 255.255.255.255 port 67
      Feb 11 08:10:55 svr00 dhclient[34658]: ue0 link state up -> down
      Feb 11 08:10:55 svr00 dhclient[34658]: ip length 328 disagrees with bytes received 332.
      Feb 11 08:10:55 svr00 dhclient[34658]: accepting packet with data after udp payload.
      Feb 11 08:10:55 svr00 dhclient[34658]: ip length 328 disagrees with bytes received 332.
      Feb 11 08:10:55 svr00 dhclient[34658]: accepting packet with data after udp payload.
      Feb 11 08:10:55 svr00 dhclient[34658]: ip length 328 disagrees with bytes received 332.
      Feb 11 08:10:55 svr00 dhclient[34658]: accepting packet with data after udp payload.
      Feb 11 08:10:55 svr00 dhclient[34658]: ip length 328 disagrees with bytes received 332.
      Feb 11 08:10:55 svr00 dhclient[34658]: accepting packet with data after udp payload.
      Feb 11 08:10:55 svr00 dhclient[34658]: DHCPACK from 100.70.133.80
      Feb 11 08:10:55 svr00 dhclient[50837]: REBOOT
      Feb 11 08:10:55 svr00 dhclient[51442]: Starting add_new_address()
      Feb 11 08:10:55 svr00 dhclient[51690]: ifconfig ue0 inet 181.xx.xx.xxx netmask 255.255.252.0 broadcast 181.53.43.255 
      Feb 11 08:10:55 svr00 dhclient[52207]: New IP Address (ue0): 181.xx.xx.xxx
      Feb 11 08:10:55 svr00 dhclient[52480]: New Subnet Mask (ue0): 255.255.252.0
      Feb 11 08:10:55 svr00 dhclient[52660]: New Broadcast Address (ue0): 181.53.43.255
      Feb 11 08:10:55 svr00 dhclient[52748]: New Routers (ue0): 181.53.40.1
      Feb 11 08:10:55 svr00 dhclient[52917]: Adding new routes to interface: ue0
      Feb 11 08:10:55 svr00 dhclient[54075]: /sbin/route add -host 181.53.40.1 -iface ue0
      Feb 11 08:10:55 svr00 dhclient[54372]: /sbin/route add default 181.53.40.1
      Feb 11 08:10:55 svr00 dhclient[54619]: Creating resolv.conf
      Feb 11 08:10:55 svr00 dhclient[34658]: bound to 181.xx.xx.xxx -- renewal in 1963 seconds.
      Feb 11 08:10:55 svr00 dhclient[34658]: ue0 link state down -> up
      Feb 11 08:10:55 svr00 dhclient[34658]: DHCPREQUEST on ue0 to 255.255.255.255 port 67
      Feb 11 08:10:55 svr00 dhclient[34658]: ue0 link state up -> down
      Feb 11 08:10:55 svr00 dhclient[34658]: ue0 link state down -> up
      Feb 11 08:10:55 svr00 dhclient[34658]: DHCPREQUEST on ue0 to 255.255.255.255 port 67
      Feb 11 08:10:55 svr00 dhclient[34658]: ue0 link state up -> down
      Feb 11 08:10:55 svr00 dhclient[34658]: ue0 link state down -> up
      Feb 11 08:10:55 svr00 dhclient[34658]: DHCPREQUEST on ue0 to 255.255.255.255 port 67
      Feb 11 08:10:55 svr00 dhclient[34658]: ue0 link state up -> down
      Feb 11 08:10:55 svr00 dhclient[34658]: ue0 link state down -> up
      Feb 11 08:10:55 svr00 dhclient[34658]: DHCPREQUEST on ue0 to 255.255.255.255 port 67
      Feb 11 08:10:55 svr00 dhclient[34658]: ue0 link state up -> down
      Feb 11 08:10:55 svr00 dhclient[34658]: ue0 link state down -> up
      Feb 11 08:10:55 svr00 dhclient[34658]: DHCPREQUEST on ue0 to 255.255.255.255 port 67
      Feb 11 08:10:55 svr00 dhclient[34658]: ue0 link state up -> down
      Feb 11 08:10:55 svr00 dhclient[34658]: ue0 link state down -> up
      Feb 11 08:10:55 svr00 dhclient[34658]: DHCPREQUEST on ue0 to 255.255.255.255 port 67
      Feb 11 08:10:55 svr00 dhclient[34658]: ue0 link state up -> down
      Feb 11 08:10:55 svr00 dhclient[34658]: ue0 link state down -> up
      Feb 11 08:10:55 svr00 dhclient[34658]: DHCPREQUEST on ue0 to 255.255.255.255 port 67
      Feb 11 08:10:55 svr00 dhclient[34658]: ue0 link state up -> down
      Feb 11 08:10:55 svr00 dhclient[34658]: ue0 link state down -> up
      Feb 11 08:10:55 svr00 dhclient[34658]: DHCPREQUEST on ue0 to 255.255.255.255 port 67
      Feb 11 08:10:55 svr00 dhclient[34658]: ue0 link state up -> down
      Feb 11 08:10:55 svr00 dhclient[34658]: ue0 link state down -> up
      Feb 11 08:10:55 svr00 dhclient[34658]: DHCPREQUEST on ue0 to 255.255.255.255 port 67
      Feb 11 08:10:55 svr00 dhclient[34658]: ue0 link state up -> down
      Feb 11 08:10:55 svr00 dhclient[34658]: ue0 link state down -> up
      Feb 11 08:10:55 svr00 dhclient[34658]: DHCPREQUEST on ue0 to 255.255.255.255 port 67
      Feb 11 08:10:55 svr00 dhclient[34658]: ue0 link state up -> down
      Feb 11 08:10:56 svr00 dhclient[29429]: connection closed
      Feb 11 08:10:56 svr00 dhclient[29429]: exiting.
      Feb 11 08:10:56 svr00 dhcp6c[46225]: Sending Solicit
      Feb 11 08:11:00 svr00 dhclient[91722]: Cannot open or create pidfile: No such file or directory
      Feb 11 08:11:00 svr00 dhclient[92008]: PREINIT
      Feb 11 08:11:00 svr00 dhclient[91722]: DHCPREQUEST on ue0 to 255.255.255.255 port 67
      Feb 11 08:11:01 svr00 dhclient[91722]: DHCPREQUEST on ue0 to 255.255.255.255 port 67
      Feb 11 08:11:03 svr00 dhclient[91722]: DHCPREQUEST on ue0 to 255.255.255.255 port 67
      Feb 11 08:11:07 svr00 dhclient[91722]: DHCPREQUEST on ue0 to 255.255.255.255 port 67
      Feb 11 08:11:15 svr00 dhclient[91722]: DHCPDISCOVER on ue0 to 255.255.255.255 port 67 interval 2
      Feb 11 08:11:17 svr00 dhclient[91722]: DHCPDISCOVER on ue0 to 255.255.255.255 port 67 interval 5
      Feb 11 08:11:22 svr00 dhclient[91722]: DHCPDISCOVER on ue0 to 255.255.255.255 port 67 interval 13
      Feb 11 08:11:35 svr00 dhclient[91722]: DHCPDISCOVER on ue0 to 255.255.255.255 port 67 interval 10
      Feb 11 08:11:45 svr00 dhclient[91722]: DHCPDISCOVER on ue0 to 255.255.255.255 port 67 interval 21
      Feb 11 08:12:06 svr00 dhclient[91722]: DHCPDISCOVER on ue0 to 255.255.255.255 port 67 interval 10
      Feb 11 08:12:16 svr00 dhclient[91722]: No DHCPOFFERS received.
      Feb 11 08:12:16 svr00 dhclient[91722]: Trying recorded lease 181.xx.xx.xxx
      
      
      

      system.log will get bombarded with hundreds of these messages

      Feb 11 09:48:56 svr00 check_reload_status[378]: Could not connect to /var/run/php-fpm.socket
      Feb 11 09:48:56 svr00 check_reload_status[378]: Could not connect to /var/run/php-fpm.socket
      Feb 11 09:48:56 svr00 check_reload_status[378]: Could not connect to /var/run/php-fpm.socket
      Feb 11 09:48:56 svr00 check_reload_status[378]: Could not connect to /var/run/php-fpm.socket
      Feb 11 09:48:56 svr00 check_reload_status[378]: Could not connect to /var/run/php-fpm.socket
      Feb 11 09:48:56 svr00 check_reload_status[378]: Could not connect to /var/run/php-fpm.socket
      Feb 11 09:48:56 svr00 check_reload_status[378]: Could not connect to /var/run/php-fpm.socket
      Feb 11 09:48:56 svr00 check_reload_status[378]: Could not connect to /var/run/php-fpm.socket
      

      also these

      Feb 11 10:47:07 svr00 kernel: sonewconn: pcb 0xfffff8000e136e00: Listen queue overflow: 193 already in queue awaiting acceptance (240 occurrences)
      Feb 11 10:47:10 svr00 php-fpm[98511]: /rc.linkup: Default gateway setting Interface WAN_DHCP Gateway as default.
      Feb 11 10:47:10 svr00 php-fpm[98511]: /rc.linkup: Gateway, NONE AVAILABLE
      Feb 11 10:47:13 svr00 php-fpm[52457]: /rc.linkup: DEVD Ethernet detached event for wan
      Feb 11 10:47:14 svr00 check_reload_status[80277]: Reloading filter
      Feb 11 10:47:14 svr00 php-fpm[78146]: /rc.linkup: DEVD Ethernet attached event for wan
      Feb 11 10:47:14 svr00 php-fpm[78146]: /rc.linkup: HOTPLUG: Configuring interface wan
      Feb 11 10:47:27 svr00 nginx: 2021/02/11 10:47:27 [error] 52739#100190: *1723 upstream timed out (60: Operation timed out) while reading response header from upstream, client: 10.0.0.101, server: , request: "POST /widgets/widgets/interfaces.widget.php HTTP/2.0", upstream: "fastcgi://unix:/var/run/php-fpm.socket", host: "10.0.0.100", referrer: "https://10.0.0.100/"
      Feb 11 10:57:23 svr00 kernel: arpresolve: can't allocate llinfo for 181.53.40.1 on ue0
      
      1 Reply Last reply Reply Quote 0
      • stephenw10S Offline
        stephenw10 Netgate Administrator
        last edited by

        USB NICs are generally a bad idea in pfSense.

        What is it connected to? It shows it's repeatedly losing link which triggers a number of scripts in pfSense. It is actually losing link?

        I would be running that as router-on-a-stick with VLANs rather than use a USB NIC if you can.

        Steve

        A 1 Reply Last reply Reply Quote 1
        • A Offline
          andresmorago @stephenw10
          last edited by

          @stephenw10 said in Fresh install: WAN goes down and 502 Bad Gateway:

          running that as router-on-a-stick with VLANs rather than use a USB NIC if you can.
          Steve

          thanks. long story short: it was the usb nic. AX88179 controller is a pita for pfsense

          1 Reply Last reply Reply Quote 1
          • First post
            Last post
          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.