haproxy not starting



  • haproxy-devel net 0.59_13

    I'm unable to start haproxy after upgrade to pfsense 2.4.4.
    I get this error:

    Oct 26 00:38:55 php-cgi haproxy: startup error output!: Lua init: table index is nil.
    Oct 26 00:38:55 php-cgi haproxy: started new pid:none
    Oct 26 00:38:55 php-cgi haproxy: starting old pid:none

    How to fix this?



  • @fernandoipsec
    Have you added any lua scripts that might contain issues?



  • No custom lua script added.
    Default package with basic configuration.
    This has occur after upgrade to pfsense 2.4.4. It's was working in the 2.4.3.



  • @fernandoipsec
    Can you check if haproxy.cfg contains anything that looks like 'lua' something?



  • My haproxy.cfg
    No lua scripts.

    cat /var/etc/haproxy/haproxy.cfg
    # Automaticaly generated, dont edit manually.
    # Generated on: 2018-10-26 00:38
    global
    	maxconn			5
    	stats socket /tmp/haproxy.socket level admin
    	uid			80
    	gid			80
    	nbproc			1
    	hard-stop-after		15m
    	chroot				/tmp/haproxy_chroot
    	daemon
    	tune.ssl.default-dh-param	2048
    	server-state-file /tmp/haproxy_server_state
    
    listen HAProxyLocalStats
    	bind 127.0.0.1:2200 name localstats
    	mode http
    	stats enable
    	stats refresh 5
    	stats admin if TRUE
    	stats show-legends
    	stats uri /haproxy/haproxy_stats.php?haproxystats=1
    	timeout client 5000
    	timeout connect 5000
    	timeout server 5000
    


  • @fernandoipsec said in haproxy not starting:

    cat /var/etc/haproxy/haproxy.cfg

    can you check the _test config thats used for validating the configuration?
    /var/etc/haproxy_test/haproxy.cfg

    can you run 'haproxy -vv' ?



  • cat /var/etc/haproxy_test/haproxy.cfg
    # Automaticaly generated, dont edit manually.
    # Generated on: 2018-10-26 14:46
    global
    	maxconn			5
    	stats socket /tmp/haproxy.socket level admin
    	uid			80
    	gid			80
    	nbproc			1
    	hard-stop-after		15m
    	chroot				/tmp/haproxy_chroot
    	daemon
    	tune.ssl.default-dh-param	2048
    	server-state-file /tmp/haproxy_server_state
    
    listen HAProxyLocalStats
    	bind 127.0.0.1:2200 name localstats
    	mode http
    	stats enable
    	stats refresh 5
    	stats admin if TRUE
    	stats show-legends
    	stats uri /haproxy/haproxy_stats.php?haproxystats=1
    	timeout client 5000
    	timeout connect 5000
    	timeout server 5000
    
    [2.4.4-RELEASE][admin@fw.mydomain.com]/root: haproxy -vv
    Lua init: table index is nil.
    [2.4.4-RELEASE][admin@fw.mydomain.com]/root:
    


  • @fernandoipsec said in haproxy not starting:

    [2.4.4-RELEASE][admin@fw.mydomain.com]/root: haproxy -vv
    Lua init: table index is nil.

    I've not seen that happen before..

    Can you try and re-install both haproxy and lua?
    pkg delete lua53
    pkg delete haproxy

    Then install it again?



  • same behavior for me, 2.4.4 on SG-1000.
    Although I have one lua-file in HAproxy, for doing the LetsEncrypt-Challenge.

    EDIT: solved by uninstalling and reinstalling the 2 packages, and re-adding the lua-script.