-
Notifications
You must be signed in to change notification settings - Fork 3
Lua function 'error-page': runtime error #2
Comments
The error also happens following the steps for the docker test. |
I've found an "error". The script "works" on haproxy version 1.6. We use here versions 1.8, 1.9 (because we need to use http v2 and this is only available on these versions). In version 1.6, I still have some trouble, when I access the page, sometimes come to an error and on logs appears: runtime error: /etc/haproxy-persistent/error-page.lua:103: 'close' needs 1 arguments. What can I do about this? And is there any possibility to use this script on version 1.9? OBS: The error I commented that occurs in docker, occurs because the image downloads the latest version of haproxy (haproxy: alphine) Thanks. |
@guimouraumbler @danielvieiravega looking at the log output my first suspicion is the API changes in newer versions of HAProxy. |
It took me a good part of today to figure this out, but I've found out why this breaks in HAProxy 1.9+. Hidden in the HAProxy changelog I found this line:
This is the commit that change relates to. The smoking gun is in the commit message:
This means that for frontends using @pursultani do you know if there is a way to make this script work on HAProxy 1.9+ in |
Nice catch @marceldegraaf! It seems to me that unfortunately there's no way around it. One disgraceful way to do it in to pass every response through the script (in TCP mode) parse it, and act accordingly. But since it's defeats the purpose of being HA it seems to be pointless. |
Hello my friend!
I'm trying to run this project, but i always got the error (when it's match the error code):
proxy_1 | 00000005:http.clireq[0008:ffffffff]: GET /test HTTP/1.1
proxy_1 | 00000005:http.clihdr[0008:ffffffff]: Host: localhost:8080
proxy_1 | 00000005:http.clihdr[0008:ffffffff]: User-Agent: curl/7.61.1
proxy_1 | 00000005:http.clihdr[0008:ffffffff]: Accept: /
proxy_1 | [debug] 008/110813 (11) : lua.error-page: rewrite error page: 404
proxy_1 | [ALERT] 008/110813 (11) : Lua function 'error-page': runtime error: 0 from [C] method 'set', /usr/local/etc/haproxy/scripts/error-page.lua:101 C function line 96.
proxy_1 | 00000005:web.srvrep[0008:adfd]: HTTP/1.1 404 Not Found
proxy_1 | 00000005:web.srvhdr[0008:adfd]: Server: nginx/1.15.8
proxy_1 | 00000005:web.srvhdr[0008:adfd]: Date: Wed, 09 Jan 2019 11:08:13 GMT
proxy_1 | 00000005:web.srvhdr[0008:adfd]: Content-Type: text/html
proxy_1 | 00000005:web.srvhdr[0008:adfd]: Content-Length: 153
proxy_1 | 00000005:web.srvhdr[0008:adfd]: Connection: close
Can you help me?
Thanks.
The text was updated successfully, but these errors were encountered: