Cannot save settings for LDAP

Details of my installation:

  1. Version of metabase : 0.41.0 (same issue with 0.40, 0.39) - Tried with both jar and docker
  2. OS: Ubuntu 20.04.2 LTS
  3. Java:

openjdk version "11.0.11" 2021-04-20
OpenJDK Runtime Environment (build 11.0.11+9-Ubuntu-0ubuntu2.20.04)
OpenJDK 64-Bit Server VM (build 11.0.11+9-Ubuntu-0ubuntu2.20.04, mixed mode, sharing)

  1. clojure -version: Clojure CLI version 1.10.3.986

Details of my problem/issue:
I am trying to setup LDAP with metabase. The settings page for LDAP allows to enter for the first time and save it. However if I modify anything in the page and try to save, it errors out with

Don't know how to create ISeq from: java.lang.Integer

Error from the back end:

2021-10-08 14:43:51,239 ERROR middleware.log :: PUT /api/ldap/settings 500 929.4 ┬Ás (0 DB calls)
{:via
 [{:type java.lang.IllegalArgumentException,
   :message "Don't know how to create ISeq from: java.lang.Integer",
   :at [clojure.lang.RT seqFrom "RT.java" 557]}],
 :trace
 [[clojure.lang.RT seqFrom "RT.java" 557]
  [clojure.lang.RT seq "RT.java" 537]
  [clojure.core$seq__5419 invokeStatic "core.clj" 139]
  [clojure.core$not_empty invokeStatic "core.clj" 5530]
  [clojure.core$not_empty invoke "core.clj" 5526]
  [metabase.api.ldap$fn__79405 invokeStatic "ldap.clj" 95]
  [metabase.api.ldap$fn__79405 invoke "ldap.clj" 88]
  [compojure.core$wrap_response$fn__32047 invoke "core.clj" 160]
  [compojure.core$wrap_route_middleware$fn__32031 invoke "core.clj" 132]
  [compojure.core$wrap_route_info$fn__32036 invoke "core.clj" 139]
  [compojure.core$wrap_route_matches$fn__32040 invoke "core.clj" 151]
  [compojure.core$routes$fn__32059$f__32060 invoke "core.clj" 198]
  [compojure.core$routes$fn__32059 invoke "core.clj" 200]
  [metabase.server.middleware.auth$enforce_authentication$fn__70236 invoke "auth.clj" 14]
  [compojure.core$routes$fn__32059$f__32060 invoke "core.clj" 198]
  [compojure.core$routes$fn__32059 invoke "core.clj" 200]
  [compojure.core$make_context$handler__32087 invoke "core.clj" 289]
  [compojure.core$make_context$fn__32091 invoke "core.clj" 299]
  [compojure.core$routes$fn__32059$f__32060 invoke "core.clj" 198]
  [compojure.core$routes$fn__32059$f__32060$respond_SINGLEQUOTE___32061 invoke "core.clj" 197]
  [compojure.core$make_context$fn__32091 invoke "core.clj" 300]
  [compojure.core$routes$fn__32059$f__32060 invoke "core.clj" 198]
  [compojure.core$routes$fn__32059$f__32060$respond_SINGLEQUOTE___32061 invoke "core.clj" 197]
  [compojure.core$make_context$fn__32091 invoke "core.clj" 300]
  [compojure.core$routes$fn__32059$f__32060 invoke "core.clj" 198]
  [compojure.core$routes$fn__32059$f__32060$respond_SINGLEQUOTE___32061 invoke "core.clj" 197]
  [compojure.core$make_context$fn__32091 invoke "core.clj" 300]
  [compojure.core$routes$fn__32059$f__32060 invoke "core.clj" 198]
  [compojure.core$routes$fn__32059$f__32060$respond_SINGLEQUOTE___32061 invoke "core.clj" 197]
  [compojure.core$make_context$fn__32091 invoke "core.clj" 300]
  [compojure.core$routes$fn__32059$f__32060 invoke "core.clj" 198]
  [compojure.core$routes$fn__32059$f__32060$respond_SINGLEQUOTE___32061 invoke "core.clj" 197]
  [compojure.core$make_context$fn__32091 invoke "core.clj" 300]
  [compojure.core$routes$fn__32059$f__32060 invoke "core.clj" 198]
  [compojure.core$routes$fn__32059$f__32060$respond_SINGLEQUOTE___32061 invoke "core.clj" 197]
  [compojure.core$make_context$fn__32091 invoke "core.clj" 300]
  [compojure.core$routes$fn__32059$f__32060 invoke "core.clj" 198]
  [compojure.core$routes$fn__32059$f__32060$respond_SINGLEQUOTE___32061 invoke "core.clj" 197]
  [compojure.core$make_context$fn__32091 invoke "core.clj" 300]
  [compojure.core$routes$fn__32059$f__32060 invoke "core.clj" 198]
  [compojure.core$routes$fn__32059$f__32060$respond_SINGLEQUOTE___32061 invoke "core.clj" 197]
  [compojure.core$make_context$fn__32091 invoke "core.clj" 300]
  [compojure.core$routes$fn__32059$f__32060 invoke "core.clj" 198]
  [compojure.core$routes$fn__32059$f__32060$respond_SINGLEQUOTE___32061 invoke "core.clj" 197]
  [compojure.core$make_context$fn__32091 invoke "core.clj" 300]
  [compojure.core$routes$fn__32059$f__32060 invoke "core.clj" 198]
  [compojure.core$routes$fn__32059$f__32060$respond_SINGLEQUOTE___32061 invoke "core.clj" 197]
  [compojure.core$make_context$fn__32091 invoke "core.clj" 300]
  [compojure.core$routes$fn__32059$f__32060 invoke "core.clj" 198]
  [compojure.core$routes$fn__32059$f__32060$respond_SINGLEQUOTE___32061 invoke "core.clj" 197]
  [compojure.core$make_context$fn__32091 invoke "core.clj" 300]
  [compojure.core$routes$fn__32059$f__32060 invoke "core.clj" 198]
  [compojure.core$routes$fn__32059$f__32060$respond_SINGLEQUOTE___32061 invoke "core.clj" 197]
  [compojure.core$make_context$fn__32091 invoke "core.clj" 300]
  [compojure.core$routes$fn__32059$f__32060 invoke "core.clj" 198]
  [compojure.core$routes$fn__32059$f__32060$respond_SINGLEQUOTE___32061 invoke "core.clj" 197]
  [metabase.api.routes$fn__79711$fn__79714 invoke "routes.clj" 56]
  [compojure.core$routes$fn__32059$f__32060 invoke "core.clj" 198]
  [compojure.core$routes$fn__32059 invoke "core.clj" 200]
  [clojure.lang.AFn applyToHelper "AFn.java" 160]
  [clojure.lang.AFn applyTo "AFn.java" 144]
  [clojure.core$apply invokeStatic "core.clj" 667]
  [clojure.core$apply invoke "core.clj" 662]
  [metabase.server.routes$fn__79856$fn__79857 doInvoke "routes.clj" 57]
  [clojure.lang.RestFn invoke "RestFn.java" 436]
  [compojure.core$routes$fn__32059$f__32060 invoke "core.clj" 198]
  [compojure.core$routes$fn__32059 invoke "core.clj" 200]
  [compojure.core$make_context$handler__32087 invoke "core.clj" 289]
  [compojure.core$make_context$fn__32091 invoke "core.clj" 299]
  [compojure.core$routes$fn__32059$f__32060 invoke "core.clj" 198]
  [compojure.core$routes$fn__32059$f__32060$respond_SINGLEQUOTE___32061 invoke "core.clj" 197]
  [compojure.core$wrap_route_matches$fn__32040 invoke "core.clj" 153]
  [compojure.core$routes$fn__32059$f__32060 invoke "core.clj" 198]
  [compojure.core$routes$fn__32059$f__32060$respond_SINGLEQUOTE___32061 invoke "core.clj" 197]
  [compojure.core$wrap_route_matches$fn__32040 invoke "core.clj" 153]
  [compojure.core$routes$fn__32059$f__32060 invoke "core.clj" 198]
  [compojure.core$routes$fn__32059$f__32060$respond_SINGLEQUOTE___32061 invoke "core.clj" 197]
  [compojure.core$wrap_route_matches$fn__32040 invoke "core.clj" 153]
  [compojure.core$routes$fn__32059$f__32060 invoke "core.clj" 198]
  [compojure.core$routes$fn__32059$f__32060$respond_SINGLEQUOTE___32061 invoke "core.clj" 197]
  [metabase.server.routes$fn__79844$fn__79846 invoke "routes.clj" 41]
  [compojure.core$routes$fn__32059$f__32060 invoke "core.clj" 198]
  [compojure.core$routes$fn__32059 invoke "core.clj" 200]
  [metabase.server.middleware.exceptions$catch_uncaught_exceptions$fn__77318 invoke "exceptions.clj" 98]
  [metabase.server.middleware.exceptions$catch_api_exceptions$fn__77315 invoke "exceptions.clj" 86]
  [metabase.server.middleware.log$log_api_call$fn__80311$fn__80312$fn__80313 invoke "log.clj" 209]
  [metabase.driver.sql_jdbc.execute.diagnostic$do_with_diagnostic_info invokeStatic "diagnostic.clj" 15]
  [metabase.driver.sql_jdbc.execute.diagnostic$do_with_diagnostic_info invoke "diagnostic.clj" 9]
  [metabase.server.middleware.log$log_api_call$fn__80311$fn__80312 invoke "log.clj" 201]
  [toucan.db$_do_with_call_counting invokeStatic "db.clj" 216]
  [toucan.db$_do_with_call_counting invoke "db.clj" 209]
  [metabase.server.middleware.log$log_api_call$fn__80311 invoke "log.clj" 200]
  [metabase.server.middleware.browser_cookie$ensure_browser_id_cookie$fn__83524 invoke "browser_cookie.clj" 30]
  [metabase.server.middleware.security$add_security_headers$fn__59173 invoke "security.clj" 144]
  [metabase.server.middleware.json$wrap_json_body$fn__82668 invoke "json.clj" 62]
  [metabase.server.middleware.json$wrap_streamed_json_response$fn__82686 invoke "json.clj" 98]
  [metabase.server.middleware.offset_paging$handle_paging$fn__59197 invoke "offset_paging.clj" 42]
  [ring.middleware.keyword_params$wrap_keyword_params$fn__83791 invoke "keyword_params.clj" 55]
  [ring.middleware.params$wrap_params$fn__83807 invoke "params.clj" 69]
  [metabase.server.middleware.misc$maybe_set_site_url$fn__34057 invoke "misc.clj" 59]
  [metabase.server.middleware.session$bind_current_user$fn__44959$fn__44960 invoke "session.clj" 257]
  [metabase.server.middleware.session$do_with_current_user invokeStatic "session.clj" 238]
  [metabase.server.middleware.session$do_with_current_user invoke "session.clj" 230]
  [metabase.server.middleware.session$bind_current_user$fn__44959 invoke "session.clj" 256]
  [metabase.server.middleware.session$wrap_current_user_info$fn__44946 invoke "session.clj" 216]
  [metabase.server.middleware.session$wrap_session_id$fn__44932 invoke "session.clj" 162]
  [metabase.server.middleware.auth$wrap_api_key$fn__70244 invoke "auth.clj" 27]
  [ring.middleware.cookies$wrap_cookies$fn__83711 invoke "cookies.clj" 216]
  [metabase.server.middleware.misc$add_content_type$fn__34040 invoke "misc.clj" 27]
  [metabase.server.middleware.misc$disable_streaming_buffering$fn__34065 invoke "misc.clj" 76]
  [ring.middleware.gzip$wrap_gzip$fn__83753 invoke "gzip.clj" 86]
  [metabase.server.middleware.misc$bind_request$fn__34068 invoke "misc.clj" 93]
  [metabase.server.middleware.ssl$redirect_to_https_middleware$fn__83540 invoke "ssl.clj" 38]
  [metabase.server$async_proxy_handler$fn__80084 invoke "server.clj" 71]
  [metabase.server.proxy$org.eclipse.jetty.server.handler.AbstractHandler$ff19274a handle nil -1]
  [org.eclipse.jetty.server.handler.HandlerWrapper handle "HandlerWrapper.java" 127]
  [org.eclipse.jetty.server.Server handle "Server.java" 516]
  [org.eclipse.jetty.server.HttpChannel lambda$handle$1 "HttpChannel.java" 388]
  [org.eclipse.jetty.server.HttpChannel dispatch "HttpChannel.java" 633]
  [org.eclipse.jetty.server.HttpChannel handle "HttpChannel.java" 380]
  [org.eclipse.jetty.server.HttpConnection onFillable "HttpConnection.java" 277]
  [org.eclipse.jetty.io.AbstractConnection$ReadCallback succeeded "AbstractConnection.java" 311]
  [org.eclipse.jetty.io.FillInterest fillable "FillInterest.java" 105]
  [org.eclipse.jetty.io.ChannelEndPoint$1 run "ChannelEndPoint.java" 104]
  [org.eclipse.jetty.util.thread.strategy.EatWhatYouKill runTask "EatWhatYouKill.java" 338]
  [org.eclipse.jetty.util.thread.strategy.EatWhatYouKill doProduce "EatWhatYouKill.java" 315]
  [org.eclipse.jetty.util.thread.strategy.EatWhatYouKill tryProduce "EatWhatYouKill.java" 173]
  [org.eclipse.jetty.util.thread.strategy.EatWhatYouKill run "EatWhatYouKill.java" 131]
  [org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread run "ReservedThreadExecutor.java" 386]
  [org.eclipse.jetty.util.thread.QueuedThreadPool runJob "QueuedThreadPool.java" 883]
  [org.eclipse.jetty.util.thread.QueuedThreadPool$Runner run "QueuedThreadPool.java" 1034]
  [java.lang.Thread run "Thread.java" 829]],
 :cause "Don't know how to create ISeq from: java.lang.Integer",
 :message "Don't know how to create ISeq from: java.lang.Integer"}

Hi @pillar-pawan
Sounds like you're seeing this issue:
https://github.com/metabase/metabase/issues/16708 - upvote by clicking :+1: on the first post
I have no idea why you're getting the other error. Perhaps try looking into the difference between the two PUT requests between save and update.

Hi @flamber,

Thank you - I tried that workaround but still not working (i.e typing password again).

However I have upvoted the issue.

-Pawan

@pillar-pawan Okay, then you'll need to figure out what's wrong with your setup, since there are many installations using LDAP on 0.39 and 0.40 already.

We're having the exact same issue. We can't change any of our LDAP settings :frowning: