-
Notifications
You must be signed in to change notification settings - Fork 148
Closed
Labels
area/nginx-configurationRelates to nginx configurationRelates to nginx configurationbugSomething isn't workingSomething isn't workingrefinedRequirements are refined and the issue is ready to be implemented.Requirements are refined and the issue is ready to be implemented.
Milestone
Description
Describe the bug
Nginx fails to reload with the following error message:
nginx: [emerg] could not build server_names_hash, you should increase server_names_hash_bucket_size: 64
To Reproduce
Steps to reproduce the behavior:
- Deploy NKG
- Create the cafe app:
- Apply the following manifest:
apiVersion: gateway.networking.k8s.io/v1beta1
kind: Gateway
metadata:
name: gateway
labels:
domain: k8s-gateway.nginx.org
spec:
gatewayClassName: nginx
listeners:
- name: http
port: 80
protocol: HTTP
---
apiVersion: gateway.networking.k8s.io/v1beta1
kind: HTTPRoute
metadata:
name: coffee
spec:
parentRefs:
- name: gateway
sectionName: http
hostnames:
- "abcdefghijklmn.too.long.server.name.example.org" // 47 characters seems to be the limit
rules:
- matches:
- path:
type: PathPrefix
value: /coffee
backendRefs:
- name: coffee
port: 80
- Get the logs of the nginx container:
kubectl logs -n nginx-gateway <nginx-gateway-pod> -c nginx -- nginx -T
Look for the following error message:
2023/05/09 15:22:56 [emerg] 41#41: could not build server_names_hash, you should increase server_names_hash_bucket_size: 64
Expected behavior
Nginx should reload successfully and the route should be configured.
Your environment
- Version of the NGINX Kubernetes Gateway: main, commit: d62cf56
- Version of Kubernetes: 1.26
- Kubernetes platform (e.g. Mini-kube or GCP): kind
saiyam1814
Metadata
Metadata
Assignees
Labels
area/nginx-configurationRelates to nginx configurationRelates to nginx configurationbugSomething isn't workingSomething isn't workingrefinedRequirements are refined and the issue is ready to be implemented.Requirements are refined and the issue is ready to be implemented.