You are here

Navigating to /cgi-bin/setup gives 502 Bad Gateway status code

7 posts / 0 new
Last post
n7get
Navigating to /cgi-bin/setup gives 502 Bad Gateway status code
I've recently upgraded from 3.20.? to 3.22.6.  Now when I try to navigate to /cgi-bin/setup (after entering user+password) I'm getting a Bad Gateway status code.  About the only thing I've been able to figure out so far is if I execute a 'lua setup' from the command line I'm getting the following instead of HTML:
ping: sendto: Network unreachable
lua: setup:398: attempt to perform arithmetic on global 'dmz_dhcp_end' (a string value)
stack traceback:
        setup:398: in main chunk
        [C]: ?

(I guess it's time to get my head around lia...)

I've attached a supportdata file.

HTH, Robert N7GET
Support File Attachment: 
n7get
FWIW, it looks to me that the
FWIW, it looks to me that the setup script is failing when dmz_mode == 0 (NAT mode).

HTH, Robert N7GET
AB7PA
Can you use Direct Mode for now?

Thanks for the support data -- very helpful.  We see the issue and are working on some fixes for NAT Mode.  Is there a reason you cannot use Direct Mode for now?

KI6TSF
Navigating to /cgi-bin/setup gives 502 Bad Gateway status code

I have the exact same issue: navigating to /cgi-bin/setup gives 502 Bad Gateway status code no matter what.  Restarting the node to free some RAM did not help.  It used to work fine before the last upgrade.  I can still access the other pages and also SSH into the node but don't know how to solve this issue.

The node is a Ubiquiti LiteBeam M5.  The supportdata.tgz file is attached.  Does someone know how to solve this issue?

73, Bernard KI6TSF

Support File Attachments: 
KI6TSF
Navigating to /cgi-bin/setup gives 502 Bad Gateway status code

There is a bug at line 398.  It looks like dmz_dhcp_end wasn't set properly.  Commenting it out works, but I don't know what's the impact.

parms.dmz_dhcp_limit = dmz_dhcp_end - dmz_dhcp_start + 1


Sun Jul 31 16:58:39 2022 daemon.err uhttpd[947]: /usr/bin/lua: /www/cgi-bin/setup:398: attempt to perform arithmetic on global 'dmz_dhcp_end' (a string value)

Sun Jul 31 16:58:39 2022 daemon.err uhttpd[947]: stack traceback:

Sun Jul 31 16:58:39 2022 daemon.err uhttpd[947]:        /www/cgi-bin/setup:398: in main chunk

Sun Jul 31 16:58:39 2022 daemon.err uhttpd[947]:        [C]: ?

KI6TSF
Navigating to /cgi-bin/setup gives 502 Bad Gateway status code
In version 3.22.12.0 for LiteBeam, this bug moved to line 418 in /www/cgi-bin/setup

Comment out this line and save the file, no need to reboot.

Bernard KI6TSF
KN6PLV
KN6PLV's picture
Previous I've seen this when
Previous I've seen this when the /etc/config.mesh/_setup file is missing this value, which should equal dmz_dhcp_start + dmz_dhcp_limit - 1 if you want to fix it by hand.

Tim - KN6PLV

Theme by Danetsoft and Danang Probo Sayekti inspired by Maksimer