Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem starting the module mod_vcard_ldap #1410

Closed
jarbelix opened this issue Dec 7, 2016 · 6 comments
Closed

Problem starting the module mod_vcard_ldap #1410

jarbelix opened this issue Dec 7, 2016 · 6 comments
Assignees

Comments

@jarbelix
Copy link

jarbelix commented Dec 7, 2016

What version of ejabberd are you using?

ejabberd-16.12.beta1

What operating system (version) are you using?

Debian 8

How did you install ejabberd (source, package, distribution)?

package

What did not work as expected? Are there error messages in the log? What
was the unexpected behavior? What was the expected result?

My logs:

2016-12-07 09:55:09.560 [critical] <0.39.0>@gen_mod:start_module:162
 Problem starting the module mod_vcard_ldap for host <<"debian-xmpp.prevnet">> 
 options: [{ldap_vcard_map,[{<<"FN">>,[{<<"%s">>,[<<"displayName">>]}]}]},
           {ldap_search_fields,[{<<"Full Name">>,<<"displayName">>}]},
           {ldap_search_reported,[{<<"Full Name">>,<<"FN">>}]}]
 error: undef
[{mod_vcard_ldap,start,
                 [<<"debian-xmpp.prevnet">>,
                  [{ldap_vcard_map,[{<<"FN">>,
                                     [{<<"%s">>,[<<"displayName">>]}]}]},
                   {ldap_search_fields,[{<<"Full Name">>,<<"displayName">>}]},
                   {ldap_search_reported,[{<<"Full Name">>,<<"FN">>}]}]],
                 []},
 {gen_mod,start_module,3,[{file,"src/gen_mod.erl"},{line,154}]},
 {lists,foreach,2,[{file,"lists.erl"},{line,1337}]},
 {ejabberd_app,start,2,[{file,"src/ejabberd_app.erl"},{line,77}]},
 {application_master,start_it_old,4,
                     [{file,"application_master.erl"},{line,273}]}]
2016-12-07 09:55:09.561 [critical] <0.39.0>@gen_mod:maybe_halt_ejabberd:170
 ejabberd initialization was aborted because a module start failed.
@p5n
Copy link

p5n commented Dec 26, 2016

The same issue can be reproduced on 16.12 release. May be it is not related to ldap_vcard modules, because of mod_configure2 fails with the same "error: undef".

@zinid
Copy link
Contributor

zinid commented Jan 9, 2017

@p5n seems like you're right. This is a side effect, but not the main reason of failure.
You better post your config so we can check if everything is ok with it.

@p5n
Copy link

p5n commented Jan 9, 2017

hopefully I cleaned out all private info:

hosts:
  - "domain.com.ru"
  - "domain.com"
  - "domain.ru"
access:
  announce:
    admin: allow
  c2s:
    blocked: deny
    all: allow
  c2s_shaper:
    admin: none
    all: normal
  configure:
    admin: allow
  local:
    local: allow
  muc:
    local: allow
  proxy65_access:
    all: allow
  register:
    all: deny
  s2s_shaper:
    all: fast
  pubsub_createnode:
    local: allow
acl:
  admin:
    user:
      -
        "user1": "domain.com.ru"
      -
        "user2": "domain.com.ru"
  local:
    user_regexp:
      -
        []: "domain.com.ru"
      -
        []: "domain.ru"
      -
        []: "domain.com"
auth_method: external
extauth_program: "/etc/ejabberd/check_pass_ldap_perl.pl"
extauth_instances: 2
extauth_cache: 3600
language: "en"
ldap_base: "dc=root"
ldap_filter: "(memberOf=cn=jabber-group,dc=root)"
ldap_password: "******"
ldap_rootdn: "cn=root,dc=root"
ldap_servers:
  - "127.0.0.1"
ldap_port: 389
ldap_uids:
  "uid": "%u"
listen:
  -
    port: 5222
    module: ejabberd_c2s
    shaper: c2s_shaper
    access: c2s
    starttls: true
    certfile: "/etc/letsencrypt/live/domain.com.ru/full.pem"
  -
    port: 5269
    module: ejabberd_s2s_in
  -
    port: 5347
    module: ejabberd_service
    hosts:
      "aim.domain.com.ru":
        password: "*******"
  -
    port: 5348
    module: ejabberd_service
    hosts:
      "aol.domain.com.ru":
        password: "*******"
  -
    port: 5349
    module: ejabberd_service
    hosts:
      "yahoo.domain.com.ru":
        password: "*******"
  -
    port: 5350
    module: ejabberd_service
    hosts:
      "msn.domain.com.ru":
        password: "*******"
  -
    port: 5351
    module: ejabberd_service
    hosts:
      "rss.domain.com.ru":
        password: "*******"
  -
    port: 5526
    module: ejabberd_service
    hosts:
      "bandersnatch.domain.com.ru":
        password: "*******"
  -
    port: 5280
    module: ejabberd_http
    web_admin: true
    http_bind: true
    http_poll: true
  -
    port: 5060
    module: ejabberd_sip
  -
    port: 5061
    module: ejabberd_sip
    tls: true
    certfile: "/etc/letsencrypt/live/domain.com.ru/full.pem"
  -
    port: 3478
    transport: udp
    use_turn: true
    turn_ip: "x.x.x.x"
    turn_min_port: 58000
    turn_max_port: 58999
    auth_type: user
    module: ejabberd_stun
  -
    port: 3478
    module: ejabberd_stun
  -
    port: 5369
    module: ejabberd_stun
    certfile: "/etc/letsencrypt/live/domain.com.ru/full.pem"
modules:
  mod_sip: []
  mod_roster: []
  mod_privacy: []
  mod_carboncopy: []
  mod_adhoc: []
  mod_configure: []
  mod_configure2: []
  mod_disco: []
  mod_stats: []
  mod_caps: []
  mod_pubsub:
    access_createnode: pubsub_createnode
    ignore_pep_from_offline: true
    ## ignore_pep_from_offline: false
    last_item_cache: false
    plugins:
      - "flat"
      - "hometree"
      - "pep"
  mod_vcard_ldap:
    ldap_vcard_map:
      "NICKNAME": {"%u": []}
      "FN": {"%s": ["displayName"]}
      "FIRST": {"%s": ["givenName"]}
      "LAST": {"%s": ["sn"]}
      "BDAY": {"%s": ["mozillaCustom4"]}
      "PHOTO": {"%s": ["jpegPhoto"]}
      "EMAIL": {"%s": ["mail"]}
      "TEL": {"%s": ["telephoneNumber"]}
      "DESC": {"%s\ntel#: %s\nroom#: %s\n\n%s": ["mozillaCustom3", "telephoneNumber", "mozillaCustom2", "description"]}
  mod_offline: []
  mod_announce:
    access: announce
  mod_echo:
    host: "echo.domain.com.ru"
  mod_private: []
  mod_irc: []
  mod_time: []
  mod_last: []
  mod_muc:
    host: "conference.domain.com.ru"
    access: muc
    access_create: muc
    access_persistent: muc
  mod_muc_log:
    access_log: muc
    cssfile: "../muc-log.css"
    dirtype: plain
    dirname: room_jid
    outdir: "/var/log/ejabberd/muc"
    timezone: universal
    spam_prevention: true
    top_link:
      "https://www.domain.com.ru/": "link"
  mod_shared_roster_ldap:
    ldap_base: "dc=root"
    ldap_rfilter: "(cn=jabber-group)"
    ldap_filter: "(objectClass=*)"
    ldap_gfilter: "(cn=jabber-group)"
    ldap_ufilter: "(&(uid=%u)(memberOf=cn=jabber-group,dc=root))"
    ldap_groupattr: "cn"
    ldap_groupdesc: "description"
    ldap_memberattr: "member"
    ldap_userdesc: "displayName"
    ldap_useruid: "uid"
    ldap_memberattr_format_re: "cn=([\\w\\.\\-]*),ou=.*,dc=root"
  mod_caps: []
  mod_ping:
    send_pings: true
    ping_interval: 60
    timeout_action: none
  mod_proxy65:
    name: "File Transfer Proxy"
    host: "proxy.domain.com.ru"
    ip: "x.x.x.x"
  mod_version: []
  mod_http_bind: []
  mod_service_log:
    loggers:
      - "bandersnatch.domain.com.ru"

sql_type: mysql
sql_server: "localhost"
sql_port: 3306
sql_database: "ejabberd"
sql_username: "ejabberd"
sql_password: "*******"
sql_keepalive_interval: 3600
sql_pool_size: 10
sql_start_interval: 120

outgoing_s2s_port: 5269
s2s_certfile: "/etc/letsencrypt/live/domain.com.ru/full.pem"
s2s_use_starttls: true
shaper:
  normal: 100000
  fast: 5000000

@zinid
Copy link
Contributor

zinid commented Jan 10, 2017

Ah, indeed. The configuration should now look like:

mod_vcard:
  db_type: ldap
  ...

I will add some convertion code so old-style mod_vcard_ldap will be converted to mod_vcard: [{db_type, ldap}] automatically.

@Neustradamus
Copy link
Contributor

Can you update the doc for this?

mod_vcard:
  db_type: ldap
  ...

[warning] <0.65.0>@ejabberd_config:emit_deprecation_warning:1365 Module mod_vcard_ldap is deprecated, use mod_vcard with 'db_type: ldap' instead

Linked to #2665.

@lock
Copy link

lock bot commented Nov 28, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Nov 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants