Skip to content

Commit ffe828b

Browse files
committed
add common connection error due to VPN error
Signed-off-by: reubenmiller <reuben.d.miller@gmail.com>
1 parent f4ee98b commit ffe828b

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

docs/src/start/connect-c8y.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,38 @@ sudo tedge cert upload c8y --user "$C8Y_USER"
190190

191191
Below shows some common errors that can be experienced when trying to upload the device certificate.
192192

193+
#### Connection closed by peer {#common-errors-closed-by-peer}
194+
195+
If you're using a VPN it is possible that it is blocking the outgoing Cumulocity MQTT port that %%te%% uses, and sometimes it is not so obvious that the communication is being blocked by the VPN or firewall as tools like netcat (`nc`) might show that the port is available, however this does not show what responded to the request (so it could be the VPN responding and not Cumulocity).
196+
197+
Use the following command to check if the Cumulocity URL and MQTT Port are reachable from the device.
198+
199+
```sh
200+
openssl s_client -connect "$(tedge config get c8y.mqtt)" < /dev/null
201+
```
202+
203+
The output of the command should print the information about the certificates of the URL and port that you are trying to connect to. If you don't see any information about the certificates (e.g. the `Certificate chain` section is missing), then it is likely that the VPN's configuration or firewall is routing or blocking the communication, so try the same command with the VPN switched off.
204+
205+
Below shows an example of what is expected when communicating with the `eu-latest.cumulocity.com` Cumulocity instance, not that the `CN=*.eu-latest.cumulocity.com` matches the URL that was being checked against.
206+
207+
```text title="Output"
208+
Connecting to 172.65.163.117
209+
CONNECTED(00000005)
210+
depth=2 C=US, ST=Arizona, L=Scottsdale, O=GoDaddy.com, Inc., CN=Go Daddy Root Certificate Authority - G2
211+
verify return:1
212+
depth=1 C=US, ST=Arizona, L=Scottsdale, O=GoDaddy.com, Inc., OU=http://certs.godaddy.com/repository/, CN=Go Daddy Secure Certificate Authority - G2
213+
verify return:1
214+
depth=0 CN=*.eu-latest.cumulocity.com
215+
verify return:1
216+
---
217+
Certificate chain
218+
0 s:CN=*.eu-latest.cumulocity.com
219+
i:C=US, ST=Arizona, L=Scottsdale, O=GoDaddy.com, Inc., OU=http://certs.godaddy.com/repository/, CN=Go Daddy Secure Certificate Authority - G2
220+
a:PKEY: rsaEncryption, 2048 (bit); sigalg: RSA-SHA256
221+
v:NotBefore: Dec 24 16:12:09 2024 GMT; NotAfter: Jan 25 16:12:09 2026 GMT
222+
# ...
223+
```
224+
193225
#### InvalidCertificate(NotValidForName) {#common-errors-invalid-certificate}
194226

195227
If you receive the following error, then you are most likely using the [custom domain feature](https://cumulocity.com/docs/enterprise-tenant/customization/#domain-name), and should see the [custom domain instructions](#custom-domain) to configure the correct HTTP and MQTT endpoints.

0 commit comments

Comments
 (0)