LDAP Configuration "Counting entries. This may take a while" never ends


  • Used Zammad version: 2.8.0-1544012236.272eecf9.jessie
  • Used Zammad installation source: DEB from repository
  • Operating system: Debian 8.11
  • Browser + version: Firefox 52.8.0 ESR (on CentOS 7.5)


After having configured the LDAP integration, Zammad is stuck in counting LDAP entries.

Problem Description:

After having configure LDAP Server/User/Password and the mappings, Zammad enters a “Counting entries” mode which never ends (never = not in 4 hours):


I am quite sure, that the configuration is ok, as Zammad could connect, analyze the structure and get the attributes for the mapping dialogue. The server is an AD server and we do have lots of entries (3000+), but still… (why does Zammad count the enties anyway?).

I haven’t configured any LDAP based roles and I haven’t touched the “Expert Settings”.

I can’t see any obvious error messages in /var/log/zammad/production.log.

Any hint on how to debug or solve this problem is highly appreciated.

I let the counting run for 14 hours. Still not finished.

What happens if you restart your zammad service and try to access the LDAP-Integration page again?

That doesn’t make a difference. Neither does a reboot help

Could you please provide your production log?

The log of yesterday - where I ran an additional LDAP configuration trial - is 14 MB big (gzipped) and I’m not sure how much sensible data it contains. Is there a way to provide the log to you privately?

You can use a private message on this board or support[at]zammad[dot]com.

What is the approximate latency between your Zammad server and your LDAP server? Are they on the same local network?

I can re-produce this issue when I have a ~300 ms latency between my Zammad server and my LDAP server. I want verify that my issue is indeed the same as yours.

Measured with ping -U the latency is 0.4-0.7 ms. Zammad is running in a VM and is not in the same local network as the LDAP server.

Hi there, please try out these two possible solutions and see if it helps you:

  1. The net-ldap gem Zammad uses is quite old. You can update this gem by updating this line to:

gem "net-ldap", :git => "git://github.com/ruby-ldap/ruby-net-ldap.git", :ref => '9daa954'

And then run bundle install to install the latest version of the net-ldap gem. Unfortunately the above instructions aren’t as easy to apply for a Debian package installation of Zammad.

  1. Try restarting both the Zammad server and the LDAP server. My collage found that this sped up the LDAP sync considerably.

I modified the file /opt/zammad/Gemfile according to your instructions, but when running bundle install I get the following error:

$ /opt/zammad/bin/bundle install
/usr/lib/ruby/2.1.0/rubygems.rb:235:in `bin_path': can't find gem bundler (>= 0) (Gem::GemNotFoundException)
	from /opt/zammad/bin/bundle:3:in `<main>'

The same error appears when running /opt/zammad/vendor/bundle/ruby/2.4.0/bin/bundle install. What else could I try? Sorry, Ruby is completely foreign territory for me :wink:

I have no possibility to restart the LDAP server.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.