Reputation: 20872
I've got an AWS EKS environment that i'm just setting up and I'm getting 400 bad request.
Below is my config and I wanted to ask if anyone saw anything I should change.
I can see the requests are getting through the aws NLB as it reaches the nginx ingress controller but I can't see any decent information in the ingress controller logs. will add some below.
I'm terminating 443 at the NLB so sending http/80 to controller...
W0408 01:06:35.428413 7 controller.go:1094] Service "dating/photoapi-prod" does not have any active Endpoint.
W0408 01:06:35.428682 7 controller.go:1094] Service "dating/photoapi-test" does not have any active Endpoint.
192.168.119.209 - - [08/Apr/2022:01:50:55 +0000] "\x00" 400 150 "-" "-" 0 0.000 [] [] - - - - 1d65f0090db1addb14e870d877977bfc
192.168.119.209 - - [08/Apr/2022:01:50:59 +0000] "\x00" 400 150 "-" "-" 0 0.000 [] [] - - - - b853574052dfd56745839f72a6fc5ed1
192.168.90.222 - - [08/Apr/2022:01:50:59 +0000] "\x00" 400 150 "-" "-" 0 0.000 [] [] - - - - c38d59e8ffcb008cf01ab4bb3ea4cd39
192.168.90.222 - - [08/Apr/2022:01:51:00 +0000] "\x00" 400 150 "-" "-" 0 0.000 [] [] - - - - 3ca1bfdbb1f35c7b89d213636a12e864
192.168.119.209 - - [08/Apr/2022:01:51:05 +0000] "\x00" 400 150 "-" "-" 0 0.000 [] [] - - - - 338a2445058641d71c32e9acdf467118
Upvotes: 0
Views: 2055
Reputation: 441
I got the same error 404 bad reqeust for my nginx ingress controller.
10.0.17.37 - - [09/Aug/2024:17:47:14 +0000] "\x00" 400 150 "-" "-" 0 0.001 [] [] - - - - d580402013394e6cef08f0d02c35ebab
10.0.4.132 - - [09/Aug/2024:17:47:16 +0000] "\x00" 400 150 "-" "-" 0 0.000 [] [] - - - - 1090267681cee836546aa4ae100c0d29
...
10.0.4.132 - - [09/Aug/2024:17:47:26 +0000] "\x00" 400 150 "-" "-" 0 0.001 [] [] - - - - 0f7c0adf89302341e8aa9a21823f4911
Later, I realize I should change my nginx ingress controller service
and configmap
setting since my deployment is using backend protocol http
and use proxy protocol
At the beginning when I got 404 bad request, my nginx ingress controller service
setting:
apiVersion: v1
kind: Service
metadata:
annotations:
service.beta.kubernetes.io/aws-load-balancer-backend-protocol: "tcp"
service.beta.kubernetes.io/aws-load-balancer-proxy-protocol: "*"
Then I change my nginx ingress controller service
setting and add one line use-proxy-protocol: "true"
to my nginx ingress controllerconfigmap
.
apiVersion: v1
kind: Service
metadata:
annotations:
service.beta.kubernetes.io/aws-load-balancer-backend-protocol: "http"
service.beta.kubernetes.io/aws-load-balancer-proxy-protocol: "*"
and
apiVersion: v1
data:
allow-snippet-annotations: "false"
use-proxy-protocol: "true"
kind: ConfigMap
You may have some different setup for your deployment. However, i hope this can give you some insight for your troubleshooting.
Upvotes: 0
Reputation: 37
in my case, it fixed after remove unused listening port in LB. I thinks it occured by health check.
Upvotes: 0
Reputation: 374
As per error it says the service behind the ingress controller doesn’t have active container running behind it.
Do you have container running behind the services mentioned in error?
Upvotes: -1