Unable to send messages to offline users

I've tried to google and stackoverflow and tried different suggestions, but nothing seem to work. It doesn't matter whether user is registered in jabber or not, as well as whether recipiet is in user's roster and vice-versa.

Below is a snippet from gajim log:

<message xmlns="jabber:client" to="54b7550a88a41b0003861426@chat.server.com" type="chat" id="102"><body>hello</body><thread>IaWHbVNKjcqRHWLKDimRbBgPqlLChwnS</thread></message>

<message xml:lang='en' to='567c19b12e1d93000c4dea02@chat.server.com/Gajim' from='54b7550a88a41b0003861426@chat.server.com' type='error' id='102'><error code='503' type='cancel'><service-unavailable xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/></error><body>sf</body><thread>IaWHbVNKjcqRHWLKDimRbBgPqlLChwnS</thread></message>

There are no logs entry in ejabberd itself.

Below is my config file stripped of comments:

loglevel: 4
log_rotate_size: 10485760
log_rotate_date: ""
log_rotate_count: 1
log_rate_limit: 100
hosts:
  - "localhost"
  - "chat.server.com"
listen:
  -
    port: 5222
    module: ejabberd_c2s
    certfile: "/opt/ejabberd-16.12.beta1/conf/server.pem"
    starttls: true
    protocol_options:
      - "no_sslv3"
    max_stanza_size: 65536
    shaper: c2s_shaper
    access: c2s
    resend_on_timeout: true
    stream_management: true
  -
    port: 5280
    module: ejabberd_http
    request_handlers:
      "/websocket": ejabberd_http_ws
    http_bind: true
    captcha: false
  -
    port: 5281
    module: ejabberd_http
    request_handlers:
      "/api": mod_http_api
    web_admin: true
    http_bind: true
    captcha: false
commands_admin_access: api
commands:
  - add_commands:
    - status
    - registered_users
    - register
    - unregister
    - create_room
    - create_room_with_opts
    - connected_users
    - delete_rosteritem
    - add_rosteritem
    - destroy_room
    - get_last
    - get_offline_count
    - get_room_affiliations
    - get_room_occupants_number
    - get_room_options
    - get_subscribers
    - get_user_rooms
    - kick_session
    - kick_user
    - muc_online_rooms
    - num_active_users
    - process_rosteritems
    - reload_config
    - rooms_unused_destroy
    - rooms_unused_list
    - rotate_log
    - send_direct_invitation
    - send_message
    - send_stanza
    - send_stanza_c2s
    - set_last
    - set_presense
    - set_room_affiliation
    - set_vcard
    - set_vcard2
    - stats
    - subscribe_room
    - unsubscribe_room
auth_method: external
extauth_program: "/opt/ejabberd-16.12.beta1/conf/auth.py"
shaper:
  normal: 1000
  fast: 50000
max_fsm_queue: 1000
acl:
  admin:
    user:
      - "admin@ip-10-10-5-108"
  local:
    user_regexp: ""
  loopback:
    ip:
      - "127.0.0.0/8"
shaper_rules:
  max_user_sessions: 10
  max_user_offline_messages:
    - 5000: admin
    - 100
  c2s_shaper:
    - none: admin
    - normal
  s2s_shaper: fast
access_rules:
  local:
    - allow: local
  c2s:
    - deny: blocked
    - allow
  announce:
    - allow: admin
  configure:
    - allow: admin
  muc_create:
    - allow: local
  pubsub_createnode:
    - allow: local
  register:
    - allow
  trusted_network:
    - allow: loopback
language: "en"
modules:
  mod_adhoc: {}
  mod_admin_extra: {}
  mod_announce: # recommends mod_adhoc
    access: announce
  mod_blocking: {} # requires mod_privacy
  mod_caps: {}
  mod_carboncopy: {}
  mod_client_state: {}
  mod_configure: {} # requires mod_adhoc
  mod_disco: {}
  mod_http_bind: {}
  mod_last: {}
  mod_mam: {}
  mod_muc:
    access:
      - allow
    access_admin:
      - allow: admin
    access_create: muc_create
    access_persistent: muc_create
  mod_muc_admin: {}
  mod_offline:
    access_max_user_messages: max_user_offline_messages
  mod_ping: {}
  mod_privacy: {}
  mod_private: {}
  mod_pubsub:
    access_createnode: pubsub_createnode
    ignore_pep_from_offline: true
    last_item_cache: false
    plugins:
      - "flat"
      - "pep" # pep requires mod_caps
  mod_register:
    welcome_message:
      subject: "Welcome!"
      body: |-
        Hi.
        Welcome to this XMPP server.
    ip_access: trusted_network
    access: register
  mod_roster: {}
  mod_shared_roster: {}
  mod_vcard:
    search: false
  mod_version: {}
allow_contrib_modules: true

r

That probably happens because

That probably happens because the authentication script says that account 54b7550a88a41b0003861426@chat.server.com does not exist.

To continue your investigation of the problem, try using internal auth. Also try using the example dummy extauth script included in ejabberd/examples/extauth/check_pass_null.pl

Yes. That appeared to be

Yes. That appeared to be missing "isuser" command in extauth script.

Wonder if there is any way to determine what caused the issue (other than by just knowing how it should work) - logs or something... Because i wasn't able to find any meaningful info in jabber logs.

If you saw nothing relevant

If you saw nothing relevant in the logs, increase the log verbosity (see loglevel option in the ejabberd configuration file).

Syndicate content