Skip to content

Commit 4a4aca3

Browse files
committed
address comments
1 parent 42d0491 commit 4a4aca3

File tree

1 file changed

+6
-59
lines changed

1 file changed

+6
-59
lines changed

site/content/how-to/monitoring/troubleshooting.md

+6-59
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ The Pod description includes details about the image name, tags, current status,
137137
Containers:
138138
nginx-gateway:
139139
Container ID: containerd://06c97a9de938b35049b7c63e251418395aef65dd1ff996119362212708b79cab
140-
Image: nginx-gateway-fabric:sa.choudhary
140+
Image: nginx-gateway-fabric
141141
Image ID: docker.io/library/import-2024-06-13@sha256:1460d63bd8a352a6e455884d7ebf51ce9c92c512cb43b13e44a1c3e3e6a08918
142142
Ports: 9113/TCP, 8081/TCP
143143
Host Ports: 0/TCP, 0/TCP
@@ -152,7 +152,7 @@ Containers:
152152
POD_NAME: ngf-nginx-gateway-fabric-66dd665756-zh7d7 (v1:metadata.name)
153153
nginx:
154154
Container ID: containerd://c2f3684fd8922e4fac7d5707ab4eb5f49b1f76a48893852c9a812cd6dbaa2f55
155-
Image: nginx-gateway-fabric/nginx:sa.choudhary
155+
Image: nginx-gateway-fabric/nginx
156156
Image ID: docker.io/library/import-2024-06-13@sha256:c9a02cb5665c6218373f8f65fc2c730f018d0ca652ae827cc913a7c6e9db6f45
157157
Ports: 80/TCP, 443/TCP
158158
Host Ports: 0/TCP, 0/TCP
@@ -165,78 +165,25 @@ Events:
165165
Type Reason Age From Message
166166
---- ------ ---- ---- -------
167167
Normal Scheduled 40s default-scheduler Successfully assigned nginx-gateway/ngf-nginx-gateway-fabric-66dd665756-zh7d7 to kind-control-plane
168-
Normal Pulled 40s kubelet Container image "nginx-gateway-fabric:sa.choudhary" already present on machine
168+
Normal Pulled 40s kubelet Container image "nginx-gateway-fabric" already present on machine
169169
Normal Created 40s kubelet Created container nginx-gateway
170170
Normal Started 39s kubelet Started container nginx-gateway
171-
Normal Pulled 39s kubelet Container image "nginx-gateway-fabric/nginx:sa.choudhary" already present on machine
171+
Normal Pulled 39s kubelet Container image "nginx-gateway-fabric/nginx" already present on machine
172172
Normal Created 39s kubelet Created container nginx
173173
Normal Started 39s kubelet Started container nginx
174174
```
175175

176176

177177
### Modify logging levels
178178

179-
To debug NGINX Gateway Fabric, enable verbose logging by editing the `NginxGateway` configuration. This can be done either before or after deploying NGINX Gateway Fabric.
180-
181-
#### Modify log levels before deploying
182-
183-
1. If using manifests, edit `deploy/manifests/nginx-gateway.yaml` to update the logging level for `nginx-gateway-config`:
184-
185-
```yaml
186-
apiVersion: gateway.nginx.org/v1alpha1
187-
kind: NginxGateway
188-
metadata:
189-
name: nginx-gateway-config
190-
namespace: nginx-gateway
191-
labels:
192-
app.kubernetes.io/name: nginx-gateway
193-
app.kubernetes.io/instance: nginx-gateway
194-
app.kubernetes.io/version: "edge"
195-
spec:
196-
logging:
197-
level: debug
198-
```
199-
200-
1. If using helm, add `--set nginxGateway.config.logging.level=<log-level>` to your helm installation command.
201-
202-
#### Modify log levels after deploying
203-
204-
Once you have deployed NGINX Gateway Fabric, you can modify log levels by editing the config for NGINX Gateway as shown below:
205-
206-
```shell
207-
kubectl [-n namespace] edit nginxgateways ngf-config
208-
```
209-
210-
```yaml
211-
apiVersion: gateway.nginx.org/v1alpha1
212-
kind: NginxGateway
213-
metadata:
214-
annotations:
215-
meta.helm.sh/release-name: ngf
216-
meta.helm.sh/release-namespace: nginx-gateway
217-
creationTimestamp: "2024-06-12T18:35:05Z"
218-
generation: 1
219-
labels:
220-
app.kubernetes.io/instance: ngf
221-
app.kubernetes.io/managed-by: Helm
222-
app.kubernetes.io/name: nginx-gateway-fabric
223-
app.kubernetes.io/version: edge
224-
helm.sh/chart: nginx-gateway-fabric-1.3.0
225-
name: ngf-config
226-
namespace: nginx-gateway
227-
resourceVersion: "62293"
228-
uid: fa6d6a12-14e1-4168-95d5-595e7f63b270
229-
spec:
230-
logging:
231-
level: debug
232-
```
179+
To debug NGINX Gateway Fabric, enable verbose logging by editing the `NginxGateway` configuration. This can be done either before or after deploying NGINX Gateway Fabric. Please refer to this [guide](https://docs.nginx.com/nginx-gateway-fabric/how-to/configuration/control-plane-configuration) to do so.
233180

234181
### NGINX fails to reload
235182

236183
#### Description
237184

238185
NGINX reload errors can occur for various reasons, including syntax errors in configuration files, permission issues, and more. To determine if NGINX has failed to reload, check logs for your _nginx-gateway_ and _nginx_ containers.
239-
You will see the following error in the _nginx-gateway_ logs `failed to reload NGINX:` followed by the reason for the failure. Similarly, you will see error logs in the _nginx_ container as `2024/06/12 14:25:11 [emerg] 12345#0: open() "/var/run/nginx.pid" failed (13: Permission denied)`.
186+
You will see the following error in the _nginx-gateway_ logs `failed to reload NGINX:` followed by the reason for the failure. Similarly, error logs in _nginx_ container start with `emerg`. For example, `2024/06/12 14:25:11 [emerg] 12345#0: open() "/var/run/nginx.pid" failed (13: Permission denied)` shows a critical error, such as a permission problem preventing NGINX from accessing necessary files.
240187

241188
To debug why your reload has failed, start with verifying the syntax of your configuration files by opening a shell in the NGINX container following these [steps](#get-shell-access-to-containers) and running `nginx -T`. If there are errors in your configuration file, the reload will fail and specify why it has failed.
242189

0 commit comments

Comments
 (0)