LDAP Sync hangs / stucks at analysing

Infos:

  • Used Zammad version: 6.3.1
  • Used Zammad installation type: Debian package
  • Operating system: Debian
  • Browser + version: Edge/Chrome

Expected behavior:

  • on Creating new LDAP Source the analysing of structure should finish
  • start LDAP sync with existing Source should start the sync

Actual behavior:

  • on Creating new LDAP Source the analysing of structure hangs at about 70%
  • when I start the LDAP Sync with existing Source the sync doesn’t start

Steps to reproduce the behavior:

  • create new LDAP Source
  • start LDAP sync

I added updated an existing LDAP Source to use SSL. Analysis of structure started and at about 70% it stucks. After waiting one hour I closed and tried again. Now the analysis Popup always show 70% and the LDAP sync isn’t working any more.

One person had this problem, too: Ldap Stuck on Analyzing - Technical assistance - Zammad - Community

I tried to update Zammad by package, restart zammad, restart Server, clear cache, rebuild search index. Nothing helps.

Is the progress of the analysis task somewhere stored in database?

Which Zammad version do you use?
6.1?
Try it with the latest version 6.3.1, please. Some code changes are made in this releases.

After that? Test it again. If the error occurs: production.log posten

I have the same problem here, but nobody knows the solution.

There are import job commands that you have to reset it via Rails Console, but I have not found the right one.

With these two following commands you can start the import jobs via Rails Console, you have to execute them one after the other. But it only works once, when it’s done you can’t start the job via web interface again.

1: job = ImportJob.create(name: 'Import::Ldap', payload: Setting.get('ldap_config'))

2: job.delay.start

Hi Dennis,

sorry, my version is wrong. I already use version 6.3.1.

Thanks,

that will solve my problem with the sync task. But my problem with adding a new source is still there. I am not able to add a new AD Source, because it stucks at analysis.

yes that’s right, I also have the same problem. As I said with upper commands you can only sync once but whenever you go under integration/ldap, the “restart” button doesn’t work and when you click on source this bar hangs.

When I click on start sync this is production.log:

I, [2024-08-27T08:49:03.180667#20379-2196540] INFO – : Started GET “/api/v1/integration/ldap/job_start?=1724734615864" for 172.30.0.2 at 2024-08-27 08:49:03 +0200
I, [2024-08-27T08:49:03.187706#20379-2196540] INFO – : Processing by Integration::LdapController#job_start_index as JSON
I, [2024-08-27T08:49:03.187755#20379-2196540] INFO – : Parameters: {"
”=>“1724734615864”}
I, [2024-08-27T08:49:03.212048#20379-2196540] INFO – : Completed 200 OK in 24ms (Views: 0.3ms | ActiveRecord: 17.7ms | Allocations: 6417)
I, [2024-08-27T08:49:03.545165#20379-2196480] INFO – : Started POST “/api/v1/integration/ldap/job_start” for 172.30.0.2 at 2024-08-27 08:49:03 +0200
I, [2024-08-27T08:49:03.548275#20379-2196480] INFO – : Processing by Integration::LdapController#job_start_create as JSON
I, [2024-08-27T08:49:03.563720#20379-2196480] INFO – : Completed 200 OK in 15ms (Views: 0.2ms | ActiveRecord: 7.7ms | Allocations:
5625)
I, [2024-08-27T08:49:03.570206#20377-2378320] INFO – : Started GET “/api/v1/integration/ldap/job_start?=1724734615865" for 172.30.0.2 at 2024-08-27 08:49:03 +0200
I, [2024-08-27T08:49:03.573160#20377-2378320] INFO – : Processing by Integration::LdapController#job_start_index as JSON
I, [2024-08-27T08:49:03.573198#20377-2378320] INFO – : Parameters: {"
”=>“1724734615865”}
I, [2024-08-27T08:49:03.592992#20377-2378320] INFO – : Completed 200 OK in 20ms (Views: 0.4ms | ActiveRecord: 13.5ms | Allocations: 6409)
I, [2024-08-27T08:49:05.409936#20377-2348900] INFO – : Started POST “/api/v1/integration/ldap/job_start” for 172.30.0.2 at 2024-08-27 08:49:05 +0200
I, [2024-08-27T08:49:05.412966#20377-2348900] INFO – : Processing by Integration::LdapController#job_start_create as JSON
I, [2024-08-27T08:49:05.426261#20377-2348900] INFO – : Completed 200 OK in 13ms (Views: 0.1ms | ActiveRecord: 7.6ms | Allocations:
5625)

what is the output of this following command on Rails console ? probably 1 ?

ImportJob.where(name: 'Import::Ldap', finished_at: nil).update_all(finished_at: Time.zone.now)

Yes output was 1. When I do it again, now output is 0.

Thank you, this command was the solution. Now its working

Please note that this command should be run into absolutely emergency situations only (like stuck imports due to software issues).

It should not be run at a regular basis and might cause issues if done otherwise.


I’ll just leave this here for copy cats for safety. :slight_smile:

2 Likes

try the following carefully, everything on your own responsibility and make a backup beforehand

ImportJob.last.destroy

if

ImportJob.where(name: 'Import::Ldap', finished_at: nil).update_all(finished_at: Time.zone.now)

is

0

then

ImportJob.create(name: 'Import::Ldap').delay.start

That was actually just an output query, for me it was solved as in my penultimate post, otherwise the bar always comes back.

Good Luck

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