mozilla-services / heka

DEPRECATED: Data collection and processing made easy.
http://hekad.readthedocs.org/
Other
3.39k stars 528 forks source link

circular_buffer.so fails to load in 0.9.1 on OS X #1424

Open blalor opened 9 years ago

blalor commented 9 years ago

config:

[stat_graph]
type = "SandboxFilter"
filename = "lua_filters/stat_graph.lua"

error output when starting hekad:

2015/03/19 06:50:14 Error making runner for stat_graph: Initialization failed for 'stat_graph': Init() error loading module 'circular_buffer' from file '/Users/blalor/tmp/heka/share/heka/lua_modules/circular_buffer.so':
    dlopen(/Users/blalor/tmp/heka/share/heka/lua_modules/circular_buffer.so, 2): Library not loaded: /Users/rob/golang/heka/build/ep_base/Bui
trink commented 9 years ago

Please provide the full configuration and the directory listing for the configured module directory.

philbooth commented 8 years ago

Fwiw, I also ran into this issue and tried to get past it by using install_name_tool to update the lib path to my local build:

install_name_tool -change \
    /Users/rob/golang/heka/build/ep_base/Build/lua_sandbox/src/libluasandbox.dylib \
    /Users/pbooth/code/heka/build/ep_base/Build/lua_sandbox/src/libluasandbox.dylib \
    /usr/share/heka/lua_modules/circular_buffer.so

That changed the error to complain about _luaL_register being not found:

2015/12/24 16:50:18 Error making runner for FxaContentSignupMetricsCategorized: Initialization failed for 'FxaContentSignupMetricsCategorized': Init() error loading module 'circular_buffer' from file '/usr/share/heka/lua_modules/circular_buffer.so':
    dlopen(/usr/share/heka/lua_modules/circular_buffer.so, 2): Symbol not found: _luaL_register
  Referenced from: /usr/share/heka/lua_modules/circular_buffer.

This is my config (I started off with the example from the docs, then modified it to add the filter that I'm testing):

[hekad]
maxprocs = 4

[LogstreamerInput]
log_directory = "/Users/pbooth/code/heka"
file_match = 'pb\.log'

[PayloadEncoder]
append_newlines = false

[LogOutput]
message_matcher = "TRUE"
encoder = "PayloadEncoder"

[FxaContentSignupMetricsCategorized]
type = "SandboxFilter"
script_type = "lua"
filename = "/Users/pbooth/code/heka/fxa_content_signup_metrics_categorized.lua"
ticker_interval = 60
preserve_data = true
message_matcher = "TRUE"

    [FxaContentSignupMetricsCategorized.config.services]
    marketplace = "0a42ac8a73be8762"
    hello = "a8b39c2b1cab722e"
    pocket = "749818d3f2e7857f"

The filter is fxa_content_signup_metrics_categorized.lua from this PR.

This is the directory listing for my module directory:

total 552
-rw-r--r--  1 pbooth  staff   3.0K 21 Feb  2015 alert.lua
-rw-r--r--  1 pbooth  staff   4.5K 21 Feb  2015 annotation.lua
-rw-r--r--  1 pbooth  staff    16K 21 Feb  2015 anomaly.lua
-rw-r--r--  1 pbooth  staff    19K 13 Mar  2015 bloom_filter.so
-rw-r--r--  1 pbooth  staff   1.4K 13 Mar  2015 cbufd.lua
-rw-r--r--  1 pbooth  staff    29K 24 Dec 16:47 circular_buffer.so
-rw-r--r--  1 pbooth  staff    29K 13 Mar  2015 cjson.so
-rw-r--r--  1 pbooth  staff    15K 13 Mar  2015 common_log_format.lua
-rw-r--r--  1 pbooth  staff   9.5K 13 Mar  2015 date_time.lua
-rw-r--r--  1 pbooth  staff   3.9K 21 Feb  2015 elasticsearch.lua
-rw-r--r--  1 pbooth  staff    19K 13 Mar  2015 hyperloglog.so
-rw-r--r--  1 pbooth  staff   1.1K 13 Mar  2015 ip_address.lua
-rw-r--r--  1 pbooth  staff    50K 13 Mar  2015 lpeg.so
-rw-r--r--  1 pbooth  staff   3.1K 13 Mar  2015 mysql.lua
-rw-r--r--  1 pbooth  staff   6.1K 13 Mar  2015 re.lua
-rw-r--r--  1 pbooth  staff   1.8K 13 Mar  2015 sfl4j.lua
-rw-r--r--  1 pbooth  staff    18K 13 Mar  2015 struct.so
-rw-r--r--  1 pbooth  staff   8.6K 13 Mar  2015 syslog.lua
-rw-r--r--  1 pbooth  staff   875B 13 Mar  2015 util.lua

Any ideas what's up?