Skip to content

Commit 39de1ba

Browse files
committed
Fix OPC simulator troubleshooting
1 parent 56f6c15 commit 39de1ba

File tree

2 files changed

+5
-21
lines changed

2 files changed

+5
-21
lines changed
78 KB
Loading

articles/iot-operations/troubleshoot/troubleshoot.md

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -164,30 +164,14 @@ An OPC UA server connection fails with a `BadSecurityModeRejected` error if the
164164

165165
### The OPC PLC simulator doesn't send data to the MQTT broker after you create a device for it
166166

167-
To work around this issue, run the following command to set `autoAcceptUntrustedServerCertificates=true` for the device endpoint:
168-
169-
```bash
170-
ENDPOINT_NAME=<name-of-you-endpoint-here>
171-
kubectl patch AssetEndpointProfile $ENDPOINT_NAME \
172-
-n azure-iot-operations \
173-
--type=merge \
174-
-p '{"spec":{"additionalConfiguration":"{\"applicationName\":\"'"$ENDPOINT_NAME"'\",\"security\":{\"autoAcceptUntrustedServerCertificates\":true}}"}}'
175-
```
167+
To work around this issue, update the device inbound endpoint in the operations experience to automatically accept untrusted server certificates:
176168

177-
> [!CAUTION]
178-
> Don't use this configuration in production or preproduction environments. Exposing your cluster to the internet without proper authentication might lead to unauthorized access and even DDOS attacks.
169+
:::image type="content" source="media/troubleshoot/auto-accept-certificate.png" alt-text="Screenshot that shows the option in the operations experience to automatically accept untrusted certificates.":::
179170

180-
You can patch all your devices with the following command:
171+
You can use the the `az iot ops ns device endpoint inbound add opcua` to add endpoints to the device that automatically accept untrusted server certificates.
181172

182-
```bash
183-
ENDPOINTS=$(kubectl get AssetEndpointProfile -n azure-iot-operations --no-headers -o custom-columns=":metadata.name")
184-
for ENDPOINT_NAME in `echo "$ENDPOINTS"`; do \
185-
kubectl patch AssetEndpointProfile $ENDPOINT_NAME \
186-
-n azure-iot-operations \
187-
--type=merge \
188-
-p '{"spec":{"additionalConfiguration":"{\"applicationName\":\"'"$ENDPOINT_NAME"'\",\"security\":{\"autoAcceptUntrustedServerCertificates\":true}}"}}'; \
189-
done
190-
```
173+
> [!CAUTION]
174+
> Don't use this configuration in production or preproduction environments. Exposing your cluster to the internet without proper authentication might lead to unauthorized access and even DDOS attacks.
191175
192176
## Troubleshoot Azure IoT Layered Network Management (preview)
193177

0 commit comments

Comments
 (0)