Skip to content

SigSci Haproxy Lua module troubleshooting guide

Introduction

This troubleshooting guide is helpful to support engineers for diagnosing Haproxy Lua module issues reported by the customers.

Haproxy versions supported

SigSci module supported to run on Haproxy v1.8, v2.0, v2.2 and v2.4. There are known performance issues with v1.8 and v2.0. Customers are recommended to use Haproxy v2.2 and above.

Verify the module configuration

  • Verify that the customer installed the latest version of the module.

  • Verify that Haproxy configuration file has the following line in global section.

    lua-load /usr/local/lib/lua/5.3/sigsci/SignalSciences.lua
    
  • Verify that http request, response actions configured in frontend section.

    http-request lua.sigsci_prerequest
    http-response lua.sigsci_postrequest
    

Review Haproxy error logs

  • Error message no file './sigsci/MessagePack.so'

Haproxy can't find the MessagePack.lua file required by the SignalSciences.lua. Haproxy logs the error if it was built with non-default Lua path. Add lua-prepend-path to the global section to resolve the error.

    global
      lua-prepend-path /usr/local/lib/lua/5.3/?.lua
      lua-load /usr/local/lib/lua/5.3/sigsci/SignalSciences.lua

Agent online but module isn't registered or undetected

  • Verify the module configuration

  • If Haproxy global configuration contains chroot <path>, module's sigsci.agenthost should be set to /sigsci.sock in override.lua and agent's rpc-address should be set to <path>/sigsci.sock

Example haproxy.cfg

    global
      chroot /var/lib/haproxy

override.lua

    sigsci.agenthost = "/sigsci.sock"

sigsci.conf

    rpc-address=/var/lib/haproxy/sigsci.sock

Request data not uploaded to the cloud or requests not found

Review the http-request action ACLs in Haproxy configuration

http-request deny and http-request redirect location actions prevent the module calling the updateRequest. There is no fix available at this time.

Too may connections in CLOSE_WAIT state in ss/netstat -tnp output

Haproxy v2.0 and above can accept decimal value for socket timeout, set sigsci.timeout to 0.1 in override.lua file.

override.lua

-- Fail open timeout 100 milliseconds or 0.1 second
sigsci.timeout=0.1

Known issues

Haproxy v1.8

  • High CPU usage. Haproxy runs Lua GC after closing the agent RPC socket.

    Lua GC

All Haproxy versions

  • Haproxy limits the POST body buffer size to 16K. So Haproxy may send partial POST body to SigSci agent.

    Buffer request
    Tune bufsize
    [ML msg] (https://www.mail-archive.com/haproxy@formilux.org/msg23074.html)

Escalating issues to engineering.

Add the output of the following commands to the JIRA ticket along with haproxy.cfg file

$haproxy -vv
$uname -a
$cat /etc/os-release