OpenWrt Forum Archive

Topic: 500 Internal server error on Firewall Edit page

The content of this topic has been archived on 25 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

In Firewall page in luci, instead of getting the add button, I am getting the below error.

500 Internal Server Error
Sorry, the server encountered an unexpected error.

/usr/lib/lua/luci/dispatcher.lua:448: Failed to execute function dispatcher target for entry '/admin/network/firewall'.
The called action terminated with an exception:
/usr/lib/lua/luci/dispatcher.lua:448: Failed to execute arcombine dispatcher target for entry '/admin/network/firewall/zones'.
The called action terminated with an exception:
/usr/lib/lua/luci/template.lua:104: Failed to execute template 'cbi/map'.
A runtime error occured: /usr/lib/lua/luci/template.lua:104: Failed to execute template 'cbi/tblsection'.
A runtime error occured: /usr/lib/lua/luci/template.lua:104: Failed to execute template 'cbi/firewall_zoneforwards'.
A runtime error occured: /usr/lib/lua/luci/model/firewall.lua:99: bad argument #2 to 'get' (string expected, got nil)
stack traceback:
    [C]: in function 'assert'
    /usr/lib/lua/luci/dispatcher.lua:448: in function 'dispatch'
    /usr/lib/lua/luci/dispatcher.lua:195: in function 

Tried un-installing completely by running the following command

opkg remove --autoremove luci

and installing again but no luck

opkg install luci

Screenshot: https://i.imgur.com/0BW3ZPq.png

OpenWRT version: 14.07

Fixed the issue.

For anyone else facing the same error, check the below file for any errors.

/etc/config/firewall

In my case there was a empty config zone  section which was causing the 500 internal server error.

The discussion might have continued from here.