Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crashes due to invalid URL when Nodeport is pointing at pod #457

Open
capnajax opened this issue Aug 1, 2020 · 2 comments
Open

Crashes due to invalid URL when Nodeport is pointing at pod #457

capnajax opened this issue Aug 1, 2020 · 2 comments

Comments

@capnajax
Copy link

capnajax commented Aug 1, 2020

This is on Kubernetes

  1. Create a pod (I used a deployment in my test) that runs this container and expose port 389. Pod runs ok.
  2. Create a NodePort service to access this container and expose 389 as 30389. Pod still running ok
  3. Restart the pod. It crashes shortly after startup
*** /container/run/process/slapd/run started as PID 520
5f24e641 @(#) $OpenLDAP: slapd 2.4.50+dfsg-1~bpo10+1 (May  4 2020 05:25:06) $
	Debian OpenLDAP Maintainers <[email protected]>
5f24e641 daemon: listen URL "ldap://ldap-565f78fdb8-9x8nn:tcp://10.108.253.216:389" parse error=5
5f24e641 slapd stopped.
5f24e641 connections_destroy: nothing to destroy.
*** /container/run/process/slapd/run exited with status 1
*** Run commands before finish...
*** Killing all processes...

Note the URL is ldap://<pod name>:tcp:<container IP>:389 -- looks like there should have been a space in there.

@zerkms
Copy link

zerkms commented Aug 3, 2020

It happens because you named your service LDAP and kubernetes automatically creates LDAP_PORT and number of other environment variables.

And LDAP_PORT collides with this docker image conventions.

@SerialVelocity
Copy link

SerialVelocity commented Nov 1, 2020

Ugh, this is because of #403. This will probably affect quite a lot of people when upgrading.

For Kubernetes you can set enableServiceLinks: false in the pod spec to get around this. Much better than trying to rename the service and updating all applications using ldap.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants