After upgrade from Zammad 2.5 to 2.6, LDAP sync no longer works

Infos:

Important:
If you are a Zammad Support or hosted customer and experience a technical issue, please refer to: support@zammad.com using your zammad-hostname / or company contract.

  • Used Zammad version: 2.6
  • Used Zammad installation source: (source, package, …) Zammad repo
  • Operating system: CentOS 7
  • Browser + version:

Expected behavior:

  • After an upgrade from Zammad 2.5 to 2.6, LDAP sync reports successful sync.

Actual behavior:

  • LDAP sync throws an error:
    An error occurred: undefined method `with_indifferent_access’ for nil:NilClass

Steps to reproduce the behavior:

I admit I didn’t stop zammad’s services before an upgrade. I’ve already tried this: #1245 to no avail. I restarted the server etc. and the problem persists.

Same issue here on the same build as above.

LDAP sync error: An error occurred: undefined method `with_indifferent_access’ for nil:NilClass

Monitoring shows Current Status as no issues.

I too didn’t stop services before upgrading but in the past it hadn’t been a problem. I’ll try clearing cache in rails when I can get a maintenance window.

Tried #1245, no luck.

I don’t think the migration to 2.6 is complete, I didn’t get the typical Zammad instructions after updating and I didn’t have to point back to my ssl config. I’ll give #2190 a shot.

Looks like that fixed me up in my test environment:

systemctl stop zammad
zammad run rails r ‘Cache.clear’
zammad run rake db:migrate
systemctl start zammad

Here’s the output of zammad run rake db:migrate

== 20180518100316 EmailForwardPrefixSettingIssue1730: migrating ===============
== 20180518100316 EmailForwardPrefixSettingIssue1730: migrated (0.0834s) ======

== 20180611070839 AddUxFlowNextUpToMacros: migrating ==========================
– add_column(:macros, :ux_flow_next_up, :string, {:default=>“none”, :null=>false})
-> 0.4308s
== 20180611070839 AddUxFlowNextUpToMacros: migrated (0.4749s) =================

== 20180622140531 SequencerLogLevelSetting: migrating =========================
== 20180622140531 SequencerLogLevelSetting: migrated (0.0165s) ================

== 20180709020509 AddGroupDirectionToOverviews: migrating =====================
– add_column(:overviews, :group_direction, :string, {:limit=>250, :null=>true})
-> 0.0105s
== 20180709020509 AddGroupDirectionToOverviews: migrated (0.0115s) ============

== 20180711080554 Issue2100Utf8EncodeHttpLogs: migrating ======================
== 20180711080554 Issue2100Utf8EncodeHttpLogs: migrated (143.9203s) ===========

== 20180716060129 Issue2019FixDoubleDomainLinksInTriggerEmails: migrating =====
== 20180716060129 Issue2019FixDoubleDomainLinksInTriggerEmails: migrated (1.4091s)

== 20180719033247 AddConfidentialToDoorkeeperApplication: migrating ===========
– add_column(:oauth_applications, :confidential, :boolean, {:null=>false, :default=>true})
-> 1.7060s
== 20180719033247 AddConfidentialToDoorkeeperApplication: migrated (1.7320s) ==

== 20180809000001 CtiGenericApi: migrating ====================================
– add_column(:cti_logs, :queue, :string, {:limit=>250, :null=>true})
-> 0.0273s
– add_column(:cti_logs, :initialized_at, :string, {:limit=>250, :null=>true})
-> 0.0007s
– add_column(:cti_logs, :duration_waiting_time, :integer, {:null=>true})
-> 0.0005s
– add_column(:cti_logs, :duration_talking_time, :integer, {:null=>true})
-> 0.0005s
– rename_column(:cti_logs, :start, :start_at)
-> 1.3557s
– rename_column(:cti_logs, :end, :end_at)
-> 0.0042s
== 20180809000001 CtiGenericApi: migrated (1.3945s) ===========================

This has fixed the issue for me! Thanks :v:

1 Like

Thanks for testing and letting us know! :slight_smile:

zammad run rake db:migrate

brings this output, problem persists.

+++

rake aborted!

ActiveRecord::DuplicateMigrationNameError:

Multiple migrations have the name AddConfidentialToDoorkeeperApplication.

/opt/zammad/vendor/bundle/ruby/2.4.0/gems/activerecord-5.1.5/lib/active_record/migration.rb:1254:in `validate’

/opt/zammad/vendor/bundle/ruby/2.4.0/gems/activerecord-5.1.5/lib/active_record/migration.rb:1123:in `initialize’

/opt/zammad/vendor/bundle/ruby/2.4.0/gems/activerecord-5.1.5/lib/active_record/migration.rb:1007:in `new’

/opt/zammad/vendor/bundle/ruby/2.4.0/gems/activerecord-5.1.5/lib/active_record/migration.rb:1007:in `up’

/opt/zammad/vendor/bundle/ruby/2.4.0/gems/activerecord-5.1.5/lib/active_record/migration.rb:985:in `migrate’

/opt/zammad/vendor/bundle/ruby/2.4.0/gems/activerecord-5.1.5/lib/active_record/tasks/database_tasks.rb:171:in `migrate’

/opt/zammad/vendor/bundle/ruby/2.4.0/gems/activerecord-5.1.5/lib/active_record/railties/databases.rake:58:in `block (2 levels) in <top (required)>’

/opt/zammad/vendor/bundle/ruby/2.4.0/gems/rake-12.3.1/exe/rake:27:in `<top (required)>’

/opt/zammad/vendor/bundle/ruby/2.4.0/gems/bundler-1.15.2/lib/bundler/cli/exec.rb:74:in `load’

/opt/zammad/vendor/bundle/ruby/2.4.0/gems/bundler-1.15.2/lib/bundler/cli/exec.rb:74:in `kernel_load’

/opt/zammad/vendor/bundle/ruby/2.4.0/gems/bundler-1.15.2/lib/bundler/cli/exec.rb:27:in `run’

/opt/zammad/vendor/bundle/ruby/2.4.0/gems/bundler-1.15.2/lib/bundler/cli.rb:360:in `exec’

/opt/zammad/vendor/bundle/ruby/2.4.0/gems/bundler-1.15.2/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run’

/opt/zammad/vendor/bundle/ruby/2.4.0/gems/bundler-1.15.2/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command’

/opt/zammad/vendor/bundle/ruby/2.4.0/gems/bundler-1.15.2/lib/bundler/vendor/thor/lib/thor.rb:369:in `dispatch’

/opt/zammad/vendor/bundle/ruby/2.4.0/gems/bundler-1.15.2/lib/bundler/cli.rb:20:in `dispatch’

/opt/zammad/vendor/bundle/ruby/2.4.0/gems/bundler-1.15.2/lib/bundler/vendor/thor/lib/thor/base.rb:444:in `start’

/opt/zammad/vendor/bundle/ruby/2.4.0/gems/bundler-1.15.2/lib/bundler/cli.rb:10:in `start’

/opt/zammad/vendor/bundle/ruby/2.4.0/gems/bundler-1.15.2/exe/bundle:30:in `block in <top (required)>’

/opt/zammad/vendor/bundle/ruby/2.4.0/gems/bundler-1.15.2/lib/bundler/friendly_errors.rb:121:in `with_friendly_errors’

/opt/zammad/vendor/bundle/ruby/2.4.0/gems/bundler-1.15.2/exe/bundle:22:in `<top (required)>’

/opt/zammad/bin/bundle:3:in `load’

/opt/zammad/bin/bundle:3:in `<main>’

Tasks: TOP => db:migrate

(See full trace by running task with --trace)

This has fixed the issue for me! Thanks

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