Uploaded image for project: 'Apache Airflow'
  1. Apache Airflow
  2. AIRFLOW-3013

LDAPInvalidPortError: port must be an integer

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Invalid
    • Affects Version/s: 1.10.0
    • Fix Version/s: 1.10.0
    • Component/s: authentication
    • Labels:
      None
    • Environment:
      debian stretch, kubernetes, docker

      Description

      I am receiving the following error when attempting to login to airflow through it's webui after configuring ldap.

      Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1982, in wsgi_app response = self.full_dispatch_request() File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1614, in full_dispatch_request rv = self.handle_user_exception(e) File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1517, in handle_user_exception reraise(exc_type, exc_value, tb) File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1612, in full_dispatch_request rv = self.dispatch_request() File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1598, in dispatch_request return self.view_functions[rule.endpoint](**req.view_args) File "/usr/local/lib/python2.7/dist-packages/flask_admin/base.py", line 69, in inner return self._run_view(f, *args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/flask_admin/base.py", line 368, in _run_view return fn(self, *args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/airflow/www/views.py", line 735, in login return airflow.login.login(self, request) File "/usr/local/lib/python2.7/dist-packages/airflow/utils/db.py", line 74, in wrapper return func(*args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/airflow/contrib/auth/backends/ldap_auth.py", line 296, in login LdapUser.try_login(username, password) File "/usr/local/lib/python2.7/dist-packages/airflow/contrib/auth/backends/ldap_auth.py", line 187, in try_login configuration.conf.get("ldap", "bind_password")) File "/usr/local/lib/python2.7/dist-packages/airflow/contrib/auth/backends/ldap_auth.py", line 68, in get_ldap_connection server = Server(configuration.conf.get("ldap", "uri"), use_ssl, tls_configuration) File "/usr/local/lib/python2.7/dist-packages/ldap3/core/server.py", line 118, in __init__ raise LDAPInvalidPortError('port must be an integer') LDAPInvalidPortError: port must be an integer

      My airflow.cfg looks as such:

      [ webserver ]
      authenticate = True
      auth_backend = airflow.contrib.auth.backends.ldap_auth
      
      [ldap]
      uri = ldaps://ldap.jumpcloud.com:636
      user_filter = objectClass=*
      user_name_attr = uid
      group_member_attr = memberOf
      bind_user = uid=airflowldapservice,ou=Users,o=ORGANIZATION,dc=jumpcloud,dc=com
      bind_password = PASSWORD
      basedn = ou=Users,o=ORGANIZATION,dc=jumpcloud,dc=com
      cacert = /etc/ca/ldap_ca.crt
      search_scope = LEVEL

      My pip packages

      adal==1.0.2
      alabaster==0.7.11
      alembic==0.8.10
      amqp==2.3.2
      analytics-python==1.2.9
      apache-airflow==1.10.0
      asn1crypto==0.24.0
      atlasclient==0.1.2
      awscli==1.16.1
      azure-common==1.1.14
      azure-datalake-store==0.0.19
      azure-mgmt-datalake-nspkg==2.0.0
      azure-mgmt-datalake-store==0.4.0
      azure-mgmt-nspkg==2.0.0
      azure-mgmt-resource==1.2.2
      azure-nspkg==2.0.0
      azure-storage==0.36.0
      Babel==2.6.0
      backports-abc==0.5
      backports.ssl-match-hostname==3.5.0.1
      bcrypt==3.1.4
      billiard==3.5.0.4
      bleach==2.1.2
      boto==2.49.0
      boto3==1.8.5
      botocore==1.11.1
      cachetools==2.1.0
      cassandra-driver==3.15.0
      celery==4.2.1
      certifi==2018.8.24
      cffi==1.11.5
      chardet==3.0.4
      click==6.7
      cloudant==0.5.10
      colorama==0.3.9
      configparser==3.5.0
      cookies==2.2.1
      croniter==0.3.25
      cryptography==2.3.1
      cx-Oracle==6.4.1
      datadog==0.22.0
      decorator==4.3.0
      defusedxml==0.5.0
      dicttoxml==1.7.4
      dill==0.2.8.2
      docker==3.5.0
      docker-pycreds==0.3.0
      docopt==0.6.2
      docutils==0.14
      elasticsearch==5.5.3
      elasticsearch-dsl==5.4.0
      entrypoints==0.2.3
      enum34==1.1.6
      fastavro==0.9.6
      Flask==0.12.4
      Flask-Admin==1.4.1
      Flask-AppBuilder==1.11.1
      Flask-Babel==0.11.1
      Flask-Bcrypt==0.7.1
      Flask-Caching==1.3.3
      Flask-Login==0.2.11
      Flask-OpenID==1.2.5
      Flask-SQLAlchemy==2.1
      flask-swagger==0.2.13
      Flask-WTF==0.14.2
      flower==0.9.2
      freezegun==0.3.10
      funcsigs==1.0.0
      future==0.16.0
      future-fstrings==0.4.4
      futures==3.2.0
      gitdb2==2.0.4
      GitPython==2.1.11
      google-api-core==1.3.0
      google-api-python-client==1.7.4
      google-auth==1.5.1
      google-auth-httplib2==0.0.3
      google-auth-oauthlib==0.2.0
      google-cloud-bigquery==1.5.0
      google-cloud-container==0.1.1
      google-cloud-core==0.28.1
      google-resumable-media==0.3.1
      googleapis-common-protos==1.5.3
      grpcio==1.14.2
      gunicorn==19.9.0
      hdfs==2.1.0
      hmsclient==0.1.1
      html5lib==1.0.1
      httplib2==0.11.3
      idna==2.7
      ijson==2.3
      imagesize==1.1.0
      inflection==0.3.1
      ipaddress==1.0.22
      iso8601==0.1.12
      isodate==0.6.0
      itsdangerous==0.24
      JayDeBeApi==1.1.1
      Jinja2==2.8.1
      jira==2.0.0
      jmespath==0.9.3
      JPype1==0.6.3
      keyring==13.2.1
      kombu==4.2.1
      kubernetes==7.0.0
      ldap3==2.4.1
      lockfile==0.12.2
      lxml==3.8.0
      Mako==1.0.7
      Markdown==2.6.11
      MarkupSafe==1.0
      mock==2.0.0
      mongomock==3.11.1
      monotonic==1.5
      moto==1.1.19
      msrest==0.4.29
      msrestazure==0.4.34
      multi-key-dict==2.0.3
      mysqlclient==1.3.13
      ndg-httpsclient==0.5.1
      nose==1.3.7
      nose-ignore-docstring==0.2
      nose-timer==0.7.3
      ntlm-auth==1.2.0
      numpy==1.15.1
      oauthlib==2.1.0
      ordereddict==1.1
      packaging==17.1
      pandas==0.23.4
      pandas-gbq==0.6.1
      parameterized==0.6.1
      paramiko==2.4.1
      pathlib2==2.3.2
      pbr==4.2.0
      pendulum==1.4.4
      pinotdb==0.1.1
      protobuf==3.6.1
      psutil==4.4.2
      psycopg2==2.7.5
      psycopg2-binary==2.7.5
      pyaml==17.12.1
      pyasn1==0.4.4
      pyasn1-modules==0.2.2
      pycparser==2.18
      pycryptodomex==3.6.6
      pydruid==0.4.5
      Pygments==2.2.0
      PyHive==0.6.0
      PyJWT==1.6.4
      pykerberos==1.2.1
      pymongo==3.7.1
      pymssql==2.1.4
      PyNaCl==1.2.1
      pyOpenSSL==18.0.0
      pyparsing==2.2.0
      pysftp==0.2.9
      PySmbClient==0.1.5
      python-daemon==2.1.2
      python-dateutil==2.7.3
      python-editor==1.0.3
      python-http-client==3.1.0
      python-jenkins==1.2.1
      python-nvd3==0.15.0
      python-openid==2.2.5
      python-slugify==1.2.5
      pytz==2015.7
      pytzdata==2018.5
      pywinrm==0.3.0
      PyYAML==3.13
      qds-sdk==1.9.9
      redis==2.10.6
      rednose==1.3.0
      requests==2.19.1
      requests-futures==0.9.4
      requests-kerberos==0.12.0
      requests-mock==1.5.2
      requests-ntlm==1.1.0
      requests-oauthlib==1.0.0
      requests-toolbelt==0.8.0
      rsa==3.4.2
      ruamel.ordereddict==0.4.13
      ruamel.yaml==0.15.64
      s3transfer==0.1.13
      sasl==0.2.1
      scandir==1.9.0
      SecretStorage==2.3.1
      sendgrid==5.6.0
      sentinels==1.0.0
      setproctitle==1.1.10
      simplejson==3.16.0
      singledispatch==3.4.0.3
      six==1.11.0
      slackclient==1.2.1
      smmap2==2.0.4
      snakebite==2.11.0
      snowballstemmer==1.2.1
      snowflake-connector-python==1.6.8
      snowflake-sqlalchemy==1.1.2
      Sphinx==1.7.8
      sphinx-argparse==0.2.2
      Sphinx-PyPI-upload==0.2.1
      sphinx-rtd-theme==0.4.1
      sphinxcontrib-websupport==1.1.0
      SQLAlchemy==1.1.18
      tabulate==0.7.7
      tenacity==4.8.0
      termstyle==0.1.11
      text-unidecode==1.2
      thrift==0.11.0
      thrift-sasl==0.3.0
      tokenize-rt==2.0.1
      tornado==5.1
      typing==3.6.6
      tzlocal==1.5.1
      unicodecsv==0.14.1
      uritemplate==3.0.0
      urllib3==1.23
      vertica-python==0.7.4
      vine==1.1.4
      webencodings==0.5.1
      websocket-client==0.51.0
      Werkzeug==0.14.1
      WTForms==2.2.1
      xmltodict==0.11.0
      zdesk==2.7.1
      zope.deprecation==4.3.0

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              sebastianwth sebastianwth
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: