# Error connecting to Cumulocity IOT Subtenant

**URL:** <https://community.cumulocity.com/t/error-connecting-to-cumulocity-iot-subtenant/776>\
**Category:** Forum\
**Tags:** Streaming-Analytics-Apama\
**Created:** [June 13, 2018, 9:58am UTC](https://community.cumulocity.com/t/error-connecting-to-cumulocity-iot-subtenant/776 "2018-06-13T09:58:32Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fernando\_Medina](https://avatars.discourse-cdn.com/v4/letter/f/8baadc/32.png) [@Fernando\_Medina](https://community.cumulocity.com/u/Fernando_Medina)\
**Post date:** [June 13, 2018, 9:58am UTC](https://community.cumulocity.com/t/error-connecting-to-cumulocity-iot-subtenant/776/1 "2018-06-13T09:58:32Z")

</div>

Hello.  
I have created a subtenant in Cumulocity (https://esfeme\_sub.cumulocity.com), and when I try to access using Apama Connectivity For Cumulocity IoT (10.1), I obtain that error:

…  
2018-06-13 09:49:48.130 INFO [16652] - Connectivity plug-ins: Chain CumulocityIoT is handling hostReady call  
2018-06-13 09:49:49.492 WARN [2764] - \<connectivity.chain.CumulocityIoT\> Ignoring exception from calling hostReady on ApamaConnectivityForCumulocityIoT: com.cumulocity.sdk.client.SDKException: unable to connect to server

This EPL Codes runs well in a ordinary tenant ([https://esfeme.cumulocity.com](https://esfeme.cumulocity.com)):

// TODO: Monitors and event definitions here  
monitor EnvironmentalManager {

```
action onload() {
	
	monitor.subscribe(DeviceOperation.CHANNEL);
	monitor.subscribe(Measurement.CHANNEL);
	//monitor.subscribe(Event.CHANNEL);
	
	on all Device() as D{
		print "Device: " + D.toString();
	}
	
	on all Measurement() as M{
		print "Measurement: " + M.toString();

```

…  
It seems sth related to subtenants in Cumulocity…

Any suggestions?  
Thanks in advance…  
Fernando.

---

<div class="post-metadata">

**Author:** ![Sandeep\_Komarneni](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/sandeep_komarneni/32/18273_2.png) [@Sandeep\_Komarneni](https://community.cumulocity.com/u/Sandeep_Komarneni)\
**Post date:** [June 13, 2018, 11:09am UTC](https://community.cumulocity.com/t/error-connecting-to-cumulocity-iot-subtenant/776/2 "2018-06-13T11:09:33Z")

</div>

Hi,

can you confirm if you are able to login to the ui using the same credentials?

Also can you check if your application (appKey provided in the credentials file) is subscribed to the subtenant?

Regards,  
Sandeep

---

<div class="post-metadata">

**Author:** ![Fernando\_Medina](https://avatars.discourse-cdn.com/v4/letter/f/8baadc/32.png) [@Fernando\_Medina](https://community.cumulocity.com/u/Fernando_Medina)\
**Post date:** [June 13, 2018, 12:30pm UTC](https://community.cumulocity.com/t/error-connecting-to-cumulocity-iot-subtenant/776/3 "2018-06-13T12:30:31Z")

</div>

I am doublechecking…

Yes, I can login with the same credential “[fernando.medina@softwareag.com](mailto:fernando.medina@softwareag.com)”…

Yes, I have registered the application “testConnectivity”…

Fernando.

---

<div class="post-metadata">

**Author:** ![Fernando\_Medina](https://avatars.discourse-cdn.com/v4/letter/f/8baadc/32.png) [@Fernando\_Medina](https://community.cumulocity.com/u/Fernando_Medina)\
**Post date:** [June 13, 2018, 4:58pm UTC](https://community.cumulocity.com/t/error-connecting-to-cumulocity-iot-subtenant/776/4 "2018-06-13T16:58:08Z")

</div>

Sandeep was working with me in the solution.  
The problem was that Cumulocity SDK doesn’t support a “\_” in the URL of the tenant.  
So, solution was to change the URL to “[esfemesub.cumulocity.com](http://esfemesub.cumulocity.com)” and it worked.  
Thanks Sandeep.  
Fernando.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/system/32/31990_2.png) [@system](https://community.cumulocity.com/u/system)\
**Post date:** [April 2, 2021, 3:40pm UTC](https://community.cumulocity.com/t/error-connecting-to-cumulocity-iot-subtenant/776/5 "2021-04-02T15:40:50Z")

</div>


