kubernetes / ingress-nginx

Ingress NGINX Controller for Kubernetes
https://kubernetes.github.io/ingress-nginx/
Apache License 2.0
17.58k stars 8.27k forks source link

Service does not have an endpoint issue for helm ingress nginx k8s jdk11 springboot #6887

Closed SubashL closed 3 years ago

SubashL commented 3 years ago

Hi,

We have springboot application (2.0.4) and using jdk11. When the code is deploed on a k8s cluster using a helm chart which has service ingress using nginx, somehow the ingress URL is not resolving.

getting 502 bad gatewa issue.

Also when I exec into pod (pods run fine) and curl some of the backend API URLs using service URL instead of ingress URL it works fine. somehow the issue is with only ingress URL

And the weird thing is the same setup works fine if I deplo same code compiled using jdk8

We suspect it should be a tls issue as that is the only thing in terms of ingress I can check among jdk8 and jdk11 as jdk 8 uses 1.2 default and jdk11 uses 1.3 tls default.

Please assist me in solving this.

SubashL commented 3 years ago

I0219 17:13:09.509144 7 event.go:282] Event(v1.ObjectReference{Kind:"Ingress", Namespace:"ipaas-central-np", Name:"ipaas-central-backend-controller", UID:"c7103b34-4fb3-4227-a755-03d4826dea36", APIVersion:"networking.k8s.io/v1beta1", ResourceVersion:"308285019", FieldPath:""}): type: 'Normal' reason: 'Sync' Scheduled for sync W0219 17:13:09.509838 7 endpoints.go:71] Error obtaining Endpoints for Service "ipaas-central-np/ipaas-central-backend-controller": no object matching key "ipaas-central-np/ipaas-central-backend-controller" in local store W0219 17:13:09.558640 7 controller.go:950] Service "ipaas-central-np/ipaas-central-backend-controller" does not have any active Endpoint. I0219 17:13:09.562402 7 controller.go:144] "Configuration changes detected, backend reload required"

Getting this error while deploying helm

SubashL commented 3 years ago

2021/02/19 18:32:17 [error] 813#813: *5568493 upstream prematurely closed connection while reading response header from upstream, client: 10.50.93.41, server: np-central.ipaas.corp.adobe.com, request:

nic-6443 commented 3 years ago
W0219 17:13:09.558640 7 controller.go:950] Service "ipaas-central-np/ipaas-central-backend-controller" does not have any active Endpoint.

From above log message, you can check this Endpoint object by kubectl get endpoints -n ipaas-central-np ipaas-central-backend-controller -oyaml. If Endpoint contains notReadyAddresses, you can check corresponding pod status by kubectl get pod xx -oyaml. If pod is not healthy, you can check pod liveness & readiness probe result.

fejta-bot commented 3 years ago

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale. Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale

fejta-bot commented 3 years ago

Stale issues rot after 30d of inactivity. Mark the issue as fresh with /remove-lifecycle rotten. Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten

iamNoah1 commented 3 years ago

/remove-kind bug /kind support

iamNoah1 commented 3 years ago

Hi @SubashL did you solve your issue?

SubashL commented 3 years ago

Yes sir. Please close the issue.

Get Outlook for Androidhttps://aka.ms/AAb9ysg


From: Noah Ispas @.> Sent: Tuesday, June 29, 2021 2:00:29 PM To: kubernetes/ingress-nginx @.> Cc: Subash Lingareddy @.>; Mention @.> Subject: [External] Re: [kubernetes/ingress-nginx] Service does not have an endpoint issue for helm ingress nginx k8s jdk11 springboot (#6887)

Hi @SubashLhttps://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FSubashL&data=04%7C01%7Clingared%40adobe.com%7Ca6342147408b488dd43c08d93ad82711%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637605522305366720%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=Ue2KErISoF8CDVBMcVFjKzh%2Bcc2YK9UGYzNkBJ01CBo%3D&reserved=0 did you solve your issue?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fkubernetes%2Fingress-nginx%2Fissues%2F6887%23issuecomment-870391993&data=04%7C01%7Clingared%40adobe.com%7Ca6342147408b488dd43c08d93ad82711%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637605522305376718%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=HUHy1XTNcpiBik0Y%2FwtOvxLy3Yu4QyWvb4UUXX3szTY%3D&reserved=0, or unsubscribehttps://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAS5ETWPZWSXOUQW5RGPXT3LTVGACLANCNFSM4X4K3BBQ&data=04%7C01%7Clingared%40adobe.com%7Ca6342147408b488dd43c08d93ad82711%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637605522305376718%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=G%2FKDJgdLR4XIFwd%2BDXzoNnJDTKvRufPoRoo0dy5s1G8%3D&reserved=0.

iamNoah1 commented 3 years ago

/close

k8s-ci-robot commented 3 years ago

@iamNoah1: Closing this issue.

In response to [this](https://github.com/kubernetes/ingress-nginx/issues/6887#issuecomment-874582526): >/close Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.