Skip to content

mod_event_pusher returns error when pushing notifications to muc_light rooms #3407

@apontini

Description

@apontini

MongooseIM version: 5.0.0
Installed from: Docker
Erlang/OTP version: 23.1-1

As the title states, when I send a message to a muc light room, the following log string is printed and no notification is sent.

when=2021-11-18T09:34:39.234571+00:00 level=error what=hook_failed reason="{badarg,[{ets,lookup_element,['mod_event_pusher_muclight.localhost',backends,2],[{error_info,#{cause => id,module => erl_stdlib_errors}}]},{mod_event_pusher,push_event,3,[{file,\"/home/circleci/app/src/event_pusher/mod_event_pusher.erl\"},{line,52}]},{mod_event_pusher_hook_translator,filter_local_packet,1,[{file,\"/home/circleci/app/src/event_pusher/mod_event_pusher_hook_translator.erl\"},{line,62}]},{ejabberd_hooks,gen_hook_fn_wrapper,3,[{file,\"/home/circleci/app/src/ejabberd_hooks.erl\"},{line,109}]},{safely,apply,2,[{file,\"/home/circleci/app/src/safely.erl\"},{line,42}]},{gen_hook,run_hook,4,[{file,\"/home/circleci/app/src/gen_hook.erl\"},{line,203}]},{mongoose_hooks,run_fold,4,[{file,\"/home/circleci/app/src/mongoose_hooks.erl\"},{line,1473}]},{mongoose_local_delivery,do_route,5,[{file,\"/home/circleci/app/src/mongoose_local_delivery.erl\"},{line,40}]}]}" pid=<0.1099.0> at=gen_hook:log_error_running_hook/5:227 text="Error running hook" params_args= key="{filter_local_packet,<<\"localhost\">>}" handler="{hook_handler,90,fun ejabberd_hooks:gen_hook_fn_wrapper/3,#{function => filter_local_packet,hook_name => filter_local_packet,hook_tag => <<\"localhost\">>,host_type => <<\"localhost\">>,module => mod_event_pusher_hook_translator}}"

My configuration is the following

[general]
  loglevel = "info"
  hosts = ["localhost"]
  default_server_domain = "localhost"
  language = "en"
[auth]
  methods = ["rdbms"]
  password.format = "plain"
[outgoing_pools.rdbms.default]
  scope = "global"
  workers = 5

  [outgoing_pools.rdbms.default.connection]
    driver = "pgsql"
    host = "172.17.0.2"
    database = "mongooseim"
    username = "admin"
    password = "password"

[outgoing_pools.http.push_pool]
  scope = "global"
  workers = 50
  
  [outgoing_pools.http.push_pool.connection]
    host = "http://172.17.0.4:1080"
    path_prefix = "/push"
    
[listen]
  [[listen.c2s]]
    port = 5222

  [[listen.http]]
    port = 5280
    transport.num_acceptors = 10
    transport.max_connections = 1024

    [[listen.http.handlers.mod_bosh]]
      host = "_"
      path = "/http-bind"

    [[listen.http.handlers.mod_websockets]]
      host = "_"
      path = "/ws-xmpp"
      ping_rate = 30_000

    [[listen.http.handlers.mongoose_api_admin]]
      host = "_"
      path = "/admin"

[modules.mod_muc]
  backend = "rdbms"
[modules.mod_muc_light]
  #legacy_mode = true
  backend = "rdbms"
  host = "muclight.@HOST@"
[modules.mod_disco]
[modules.mod_mam_meta]
  backend = "rdbms"
  archive_chat_markers = true
  pm.backend = "rdbms"
  muc.backend = "rdbms"
  muc.host = "muclight.@HOST@"
  rdbms_message_format = "simple"

[modules.mod_mam_meta.muc]
[modules.mod_commands]
[modules.mod_muc_commands]
[modules.mod_muc_light_commands]
[modules.mod_inbox]
  reset_markers = ["displayed"]
  groupchat = ["muclight"]
[modules.mod_last]
  backend = "rdbms"
[modules.mod_offline_stub]
[modules.mod_roster]
  backend = "rdbms"
[modules.mod_carboncopy]
[modules.mod_event_pusher.backend.http]
  pool_name = "push_pool"
  path = "/notifications"
  callback_module = "mod_event_pusher_http_defaults"

I'll add more information if needed

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions