-
Couldn't load subscription status.
- Fork 1.9k
Closed
Labels
type: bugA code related bug.A code related bug.
Description
Use-Case : Make an http call from the transform.
Since there is no such vector transform which does that, I resorted to using the LUA transform and use lua-http to make the http requests.
Steps:
- Install and run vector
- Install lua rocks via : apt-get install luarocks
- Install lua headers: apt install liblua5.3-dev
- Install lua http (which install all the dependencies compat53, bit32, cqueues, luaossl, basexx, lpeg, lpeg_patterns, binaryheap >= 0.3, fifo : luarocks --tree=/usr/share/lua/5.3/ install http
- Now, when I use lua http from my transform, I get the below stacktrace :
May 03 09:09:14.232 ERROR transform{component_kind="transform" component_name=my_transform_id component_type=lua}: vector::internal_events::lua: Error in lua script; discarding event. error=RuntimeErrorHooksProcess { source: RuntimeError("[string "?"]:4: module 'http.request' not found: no field package.preload['http.request'] no file '/usr/share/lua/5.3/http/request.lua' no file '/usr/local/share/lua/5.3/http/request.lua' no file '/usr/local/share/lua/5.3/http/request/init.lua' no file '/usr/local/lib/lua/5.3/http/request.lua' no file '/usr/local/lib/lua/5.3/http/request/init.lua' no file './http/request.lua' no file './http/request/init.lua' no file '/usr/local/lib/lua/5.3/http/request.so' no file '/usr/local/lib/lua/5.3/loadall.so' no file './http/request.so' no file '/usr/local/lib/lua/5.3/http.so' no file '/usr/local/lib/lua/5.3/loadall.so' no file './http.so' stack traceback: [C]: in ? [C]: in function 'require' [string "?"]:4: in function <[string "?"]:1>") } internal_log_rate_secs=30 - I have a feeling it is something to do with where Vector is looking for the relevant packages and where it is installed but am not able to fix it.
@jszwedko any ideas on why this can be happening ?
My transform config has search_dirs = ["/usr/share/lua/5.3"]
Metadata
Metadata
Assignees
Labels
type: bugA code related bug.A code related bug.