We are currently in the process of connecting our Raspberry Pi to our Cumulocity tenant using the steps outlined in the documentation: Connecting to Cumulocity IoT | Thin-edge documentation.
So far, everything has proceeded smoothly until we reached the command:
sudo tedge connect c8y
However, the execution of this command is being canceled, and we are encountering the following error:
We have followed the certificate creation process diligently, and it completed without any issues. Despite this, the connection check is failing, and the certificate appears to be the source of the problem.
Do any of you have insights into why we might be facing this issue? We would appreciate any assistance or guidance you can provide to help us resolve this matter.
did you double check if the certificate has been uploaded to your tenant successfully?
You can check that in {{YourTenantURL}}/apps/devicemanagement/index.html#/trusted-certificates
Which deviceID do you use to create the device certificate?
You can also activate more detailed debugging information using the modified connect command:
RUST_LOG=trace tedge connect c8y
The output will be very verbose, but it should help to identify which certificate it is having a problem with (e.g. server certificate or the device’s certificate).
And generally detailing which thin-edge.io version would also be helpful.
and additionally is there anything different we need to do if we have an advanced tenant with a custom domain configured and our own wildcard SSL certificate for the domain? Because we are not making the call directly to cumulocity.com but rather to customertenant.wains.info
If you’re using a custom domain, then the custom domain is only valid for the HTTP traffic and not MQTT.
Instead of calling tedge config set c8y.url, you need to configure two separate configuration items to let thin-edge.io know which endpoints should be used for the HTTP and MQTT communication:
Set the c8y.http using your custom domain name
sudo tedge config set c8y.http "mycustom.domain.com"
Set the c8y.mqtt endpoint to the “real” Cumulocity IoT Endpoint for your tenant
sudo tedge config set c8y.mqtt "mytenant.eu-latest.cumulocity.com"
Retry the connect
sudo tedge reconnect c8y
I’ll also create a ticket to add this instructions to the official doc page.
But checking it should be easy, because you should still be able to open up the underlying Cumulocity IoT url in a web browser to check that it is really reachable, though I haven’t used the custom domain feature too often, so I might be wrong there.