Failed to connect Cumulocity cloud

I ran this command:

“sudo tedge connect c8y”

after installing “thin-edge” and uploading the required certificate but I got this error message:

What should I do ?

The error means that can’t resolve the c8y.url address that you have configured. This could be for different reasons, but mostly the most common causes are just some operating system level misconfiguration.

Try the following commands to at least gather more information

Can curl reach the c8y.url?


# If the above fails, try google

Can you ping the c8y.url?


# If the above fails, try google

If the addresses don’t work, then you definitely have a network issue (connectivity or configuration).

it works

Though you have to use the urls that you configured :wink: Those urls were for my tenant.

This can be easily done using some bash commands which will read your c8y.url settings using convenient tedge cli commands.

C8Y_URL="$(tedge config get c8y.url)"
curl "https://$C8Y_URL"
ping "$C8Y_URL"

The above is doing the following:

  1. Get the c8y.url settings from the tedge config and storing the value in a variable
  2. Curl against the url (using the c8y.url from step 1, and adding https:// prefix)
  3. Ping against the url (from step 1 as well)

I dont understand this variable “$(tedge config get c8y.url)”
can you give me an example

You just need to run the code as is. Did you try running it?

Using $(tedge config get c8y.url) just uses the tedge cli command to lookup what you have configured as the c8y.url property with and assigns the value to a bash variable (C8Y_URL). The bash variable is then referenced in the follow up curl and ping commands.

I did and this what I get:

You seem to have misspelled your url, it is cumulocity (not cumolocity)

So try correcting the setting via:

sudo tedge config set c8y.url

You’ve got ‘cumolocity’ - should be ‘cumulocity’ configured.

1 Like

I got this

I suspect your misspelled url is still in the mosquitto bridge configuration, so you will need to disconnect then connect again using the following commands:

sudo tedge disconnect c8y
sudo tedge connect c8y

I did but still failed to connect

Can you please print out what your settings are (using code blocks please, not screenshots, see 💻 </> How to format code in posts and articles):

1. Check the mosquitto bridge settings

sudo cat /etc/tedge/mosquitto-conf/c8y-bridge.conf

2. Check the tedge settings

sudo tedge config list

For the first command I’ve got this

file or directory not found

but for the second one I’ve got this list
c8y.topics=[“tedge/measurements”, “tedge/measurements/+”, “tedge/alarms/+/+”, “tedge/alarms/+/+/+”, “tedge/events/+”, “tedge/events/+/+”, “tedge/health/+”, “tedge/health/+/+”]
az.topics=[“tedge/measurements”, “tedge/measurements/+”, “tedge/health/+”, “tedge/health/+/+”]
aws.topics=[“tedge/measurements”, “tedge/measurements/+”, “tedge/alarms/+/+”, “tedge/alarms/+/+/+”, “tedge/events/+”, “tedge/events/+/+”, “tedge/health/+”, “tedge/health/+/+”]

Though can you check the following additional steps:

fyi, you can create a code block using the following (triple backticks), as you previous post contained quoted blocks.

example code

1. Check if openssl is able to reach the url

Though could you just check if openssl is able to reach the Cumulocity IoT url (because if openssl has a problem then tedge will most likely also have a problem), or do you have the VPN still connected, maybe the traffic is being route

yes | openssl s_client -connect

2. Did you upload the cert using the tedge cli?

Did you upload the certificate using the following command (note: the user will have to be your user). Because I’m kind of surprised that uploading the cert worked, but the connection to c8y doesn’t…or did you manually upload the certificate…if so they why? As this would point to a general connectivity problem with your device.

tedge cert upload c8y --user

If everything else fails

If this still fails then it possible that the device has some custom networking (e.g. using a proxy, or a VPN which is interfering), you might have some success talking with your network admin if this is the case.

Wait one sec…I just saw that you have some incorrect settings (it was a bit hard to spot because you used a quoted block instead of a code block)…

The tedge config list output shows that you have two “weird” entries, which I’m not sure where they came from…

It looks like you have accidentally set some invalid settings…can post the contents of the following commands?

env | grep "TEDGE"
cat /etc/tedge/tedge.toml

Another user uploaded the certificate

you have right there are wrong entries

pi@IWILR2-5:~ $ env | grep "TEDGE"
pi@IWILR2-5:~ $ cat /etc/tedge/tedge.toml
version = "2"

url = ""
http = ""
mqtt = ""

the other user have the admin rights so he uploaded the certificate, can I do it as well or what

It is always worth while reading the output before posting it, as the output shows that your configuration still has the typo in the urls.

Since you are just using the default Cumulocity IoT endpoints, you can actually just delete the http and mqtt keys under the c8y section, so afterwards your /etc/tedge/tedge.toml should look like this:

version = "2"

url = ""