So, I had a JupyterHub 0.9.0 that worked great; snippet of configuration (this will not work external to our network, but it did work for me, internally which means this is the correct address and the DNS is correctly resolving it):
auth:
admin:
users:
- hc7
ldap:
dn:
templates:
- uid={username},ou=people,dc=sanger,dc=ac,dc=uk
server:
address: ldap-ro.internal.sanger.ac.uk
type: ldap
I thought to upgrade to 0.11.1, on the same k8s cluster, it said I needed to update my config so it is now
hub:
config:
JupyterHub:
authenticator_class: ldapauthenticator.LDAPAuthenticator
LDAPAuthenticator:
bind_dn_template:
- uid={username},ou=people,dc=sanger,dc=ac,dc=uk
server_address: ldap-ro.internal.sanger.ac.uk
user_search_base: ou=people,dc=sanger,dc=ac,dc=uk
(this ought to be the SAME server, although I am unsure where to put admin users in this config)
The install appeared to work. I went to my hub website and it gave a login page, I provided my LDAP credentials (as previously working) and got 500: Internal server error. In the hub pod logs:
[E 2021-01-20 10:20:19.204 JupyterHub web:1789] Uncaught exception POST /hub/login?next= (192.168.199.234)
HTTPServerRequest(protocol='https', host='hc7-demo.internal.sanger.ac.uk', method='POST', uri='/hub/login?next=', version='HTTP/1.1', remote_ip='192.168.199.234')
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/tornado/web.py", line 1704, in _execute
    result = await result
  File "/usr/local/lib/python3.8/dist-packages/jupyterhub/handlers/login.py", line 144, in post
    user = await self.login_user(data)
  File "/usr/local/lib/python3.8/dist-packages/jupyterhub/handlers/base.py", line 749, in login_user
    authenticated = await self.authenticate(data)
  File "/usr/local/lib/python3.8/dist-packages/jupyterhub/auth.py", line 462, in get_authenticated_user
    authenticated = await maybe_future(self.authenticate(handler, data))
  File "/usr/local/lib/python3.8/dist-packages/ldapauthenticator/ldapauthenticator.py", line 382, in authenticate
    conn = self.get_connection(userdn, password)
  File "/usr/local/lib/python3.8/dist-packages/ldapauthenticator/ldapauthenticator.py", line 314, in get_connection
    conn = ldap3.Connection(
  File "/usr/local/lib/python3.8/dist-packages/ldap3/core/connection.py", line 356, in __init__
    self._do_auto_bind()
  File "/usr/local/lib/python3.8/dist-packages/ldap3/core/connection.py", line 380, in _do_auto_bind
    self.open(read_server_info=False)
  File "/usr/local/lib/python3.8/dist-packages/ldap3/strategy/sync.py", line 56, in open
    BaseStrategy.open(self, reset_usage, read_server_info)
  File "/usr/local/lib/python3.8/dist-packages/ldap3/strategy/base.py", line 153, in open
    raise LDAPSocketOpenError('invalid server address')
ldap3.core.exceptions.LDAPSocketOpenError: invalid server address
I do net believe it is the wrong address, although I may have provided it in the wrong format, I tried to obey the documentation. Unsure how to proceed