Re: undefined symbol: lua_getmetatable in using luasocket
Hi, Le 19/07/2016 à 10:10, Sachin Shetty a écrit : Thankyou Cyril. I could not get it work with 5.3 either, I am now trying to use built in sockets with core.tcp(). You should recheck your installation and verify that you are still not loading some 5.1 libraries. After a quick test on my laptop, I don't see any issue, everything works well. On 7/19/16, 4:00 AM, "Cyril Bonté"wrote: Hi Sachin, Le 18/07/2016 à 16:16, Sachin Shetty a écrit : (...) However when starting haproxy, I get this error: [ALERT] 199/063903 (7106) : parsing [/home/egnyte/haproxy/conf/haproxy.conf:9] : lua runtime error: error loading module 'socket.core' from file '/usr/local/lib/lua/5.1/socket/core.so': /usr/local/lib/lua/5.1/socket/core.so: undefined symbol: lua_getmetatable From this previous line, it's not a haproxy issue. It looks like you are using a lua library for the wrong lua version. Try to use the library for lua 5.3. Standalone lua scripts is fine with the require ³socket² line and I do see the output, but it fails to load within haproxy. Thanks Sachin -- Cyril Bonté -- Cyril Bonté
Re: undefined symbol: lua_getmetatable in using luasocket
Thankyou Cyril. I could not get it work with 5.3 either, I am now trying to use built in sockets with core.tcp(). On 7/19/16, 4:00 AM, "Cyril Bonté"wrote: >Hi Sachin, > >Le 18/07/2016 à 16:16, Sachin Shetty a écrit : >> (...) >> However when starting haproxy, I get this error: >> >> [ALERT] 199/063903 (7106) : parsing >> [/home/egnyte/haproxy/conf/haproxy.conf:9] : lua runtime error: error >> loading module 'socket.core' from file >> '/usr/local/lib/lua/5.1/socket/core.so': >> >> /usr/local/lib/lua/5.1/socket/core.so: undefined symbol: >>lua_getmetatable > > From this previous line, it's not a haproxy issue. It looks like you >are using a lua library for the wrong lua version. >Try to use the library for lua 5.3. > >> >> >> Standalone lua scripts is fine with the require ³socket² line and I do >> see the output, but it fails to load within haproxy. >> >> >> Thanks >> >> Sachin >> >> >> >> >> > > >-- >Cyril Bonté
Re: undefined symbol: lua_getmetatable in using luasocket
Hi Sachin, Le 18/07/2016 à 16:16, Sachin Shetty a écrit : (...) However when starting haproxy, I get this error: [ALERT] 199/063903 (7106) : parsing [/home/egnyte/haproxy/conf/haproxy.conf:9] : lua runtime error: error loading module 'socket.core' from file '/usr/local/lib/lua/5.1/socket/core.so': /usr/local/lib/lua/5.1/socket/core.so: undefined symbol: lua_getmetatable From this previous line, it's not a haproxy issue. It looks like you are using a lua library for the wrong lua version. Try to use the library for lua 5.3. Standalone lua scripts is fine with the require “socket” line and I do see the output, but it fails to load within haproxy. Thanks Sachin -- Cyril Bonté
undefined symbol: lua_getmetatable in using luasocket
Hi, I am trying to load a luasocket script which would make a rest call to a upstream service to determine the backend The script is as follows: ³²" http = require ³socket.http" function choose_backend(txn, arg1) core.log(core.info, "Getting Info:" .. arg1) result, statuscode, content = http.request("http://localhost:6280/eos/rest/private/gds/l1/1.0/domain/; .. arg1) return result end core.register_fetches("choose_backend", choose_backend) ³²" However when starting haproxy, I get this error: [ALERT] 199/063903 (7106) : parsing [/home/egnyte/haproxy/conf/haproxy.conf:9] : lua runtime error: error loading module 'socket.core' from file '/usr/local/lib/lua/5.1/socket/core.so': /usr/local/lib/lua/5.1/socket/core.so: undefined symbol: lua_getmetatable Standalone lua scripts is fine with the require ³socket² line and I do see the output, but it fails to load within haproxy. Thanks Sachin