haproxytech/haproxy-lua-oauth

Unable to load lua in haproxy config

manishambashta opened this issue · 1 comments

haproxy -v
HA-Proxy version 1.6.0 2015/10/13
Copyright 2000-2015 Willy Tarreau willy@haproxy.org

lua -v
Lua 5.3.3 Copyright (C) 1994-2016 Lua.org, PUC-Rio

whereis lua
lua: /usr/bin/lua /usr/lib64/lua /usr/local/bin/lua /usr/local/lib/lua /usr/share/lua /usr/share/man/man1/lua.1.gz
echo $LUA_PATH
/usr/local/bin/lua;;

echo $LUA_CPATH
./?.so;/usr/local/lib/lua/5.3/?.so;/usr/local/share/lua/5.3/?.so;/usr/local/bin/lua

haproxy -c -f haproxy1.cfg
[ALERT] 112/115434 (1758) : parsing [haproxy1.cfg:3] : lua runtime error: error loading module 'json' from file '/usr/local/bin/lua':
/usr/local/bin/lua:1: unexpected symbol near '<\127>'

[ALERT] 112/115434 (1758) : parsing [haproxy1.cfg:7] : unknown keyword 'setenv' in 'global' section
[ALERT] 112/115434 (1758) : parsing [haproxy1.cfg:10] : unknown keyword 'setenv' in 'global' section
[ALERT] 112/115434 (1758) : parsing [haproxy1.cfg:13] : unknown keyword 'setenv' in 'global' section
[ALERT] 112/115434 (1758) : parsing [haproxy1.cfg:30]: 'http-request' expects 'allow', 'deny', 'auth', 'redirect', 'tarpit', 'add-header', 'set-header', 'replace-header', 'replace-value', 'set-nice', 'set-tos', 'set-mark', 'set-log-level', 'add-acl', 'del-acl', 'del-map', 'set-map', 'set-src', 'sc-inc-gpc0()', 'sc-set-gpt0()', 'capture', 'set-method', 'set-path', 'set-query', 'set-uri', 'silent-drop', 'use-service', 'set-var(*)', but got 'lua.jwtverify'.
[ALERT] 112/115434 (1758) : Error(s) found in configuration file : haproxy1.cfg

haproxy1.cfg is the same file the haproxy-example.cfg of the repository.
I am trying to install this on Amzon linux

The same configuration is working on CentOS.