cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

IoT Hub connector with Thingworx-Exception while initializing stores, not starting partition manager

Participant

IoT Hub connector with Thingworx-Exception while initializing stores, not starting partition manager

Hello, I'm working on a demo that connect an Azure IoT Hub with Thingworx using the connector, but I get two warnings and some erros at the begining of the execution of the azure-iot.bat file. I read that it could be something related to the Event-hub endpoint, but I think I have the azure-iot.conf file in order. The connection between the Azure IoT Hub and the Thingworx platform is stablished and I can import my IoT Device, but I believe those errors don't allow me to see the data I'm sending. Some help will be appreciated. Here are my azure-iot.conf and cxserver.log files:

 

21:58:30.886 [main] WARN c.t.c.p.s.k.impl.StoreServiceImpl - The contents of cache: ThingNameStash will never expire: -1. Consider setting 'default-expire-time' or the cache 'expire-time'.
21:58:31.980 [Thread-11] WARN servicebus.trace - UnHandled exception while processing events in reactor:
java.lang.NullPointerException
org.apache.qpid.proton.engine.impl.EventImpl.dispatch(EventImpl.java:112)
org.apache.qpid.proton.reactor.impl.ReactorImpl.dispatch(ReactorImpl.java:309)
org.apache.qpid.proton.reactor.impl.ReactorImpl.process(ReactorImpl.java:276)
com.microsoft.azure.servicebus.MessagingFactory$RunReactor.run(MessagingFactory.java:375)
java.lang.Thread.run(Unknown Source)Cause: null
java.lang.StringBuilder.<init>(Unknown Source)
org.apache.qpid.proton.reactor.impl.ReactorImpl.getConnectionAddress(ReactorImpl.java:445)
com.microsoft.azure.servicebus.amqp.ConnectionHandler.onConnectionInit(ConnectionHandler.java:43)
org.apache.qpid.proton.engine.BaseHandler.handle(BaseHandler.java:116)
org.apache.qpid.proton.engine.impl.EventImpl.dispatch(EventImpl.java:108)
org.apache.qpid.proton.reactor.impl.ReactorImpl.dispatch(ReactorImpl.java:309)
org.apache.qpid.proton.reactor.impl.ReactorImpl.process(ReactorImpl.java:276)
com.microsoft.azure.servicebus.MessagingFactory$RunReactor.run(MessagingFactory.java:375)
java.lang.Thread.run(Unknown Source)
21:58:31.995 [pool-4-thread-1] ERROR eventprocessorhost.trace - host AzureIot-01832f49-b6f8-440d-92f2-d7003460d8b2: Exception while initializing stores, not starting partition manager
21:58:31.995 [pool-4-thread-1] ERROR eventprocessorhost.trace - host AzureIot-01832f49-b6f8-440d-92f2-d7003460d8b2: Caught com.microsoft.azure.servicebus.IllegalEntityException: Failure getting partition ids for event hub

4 REPLIES 4

Re: IoT Hub connector with Thingworx-Exception while initializing stores, not starting partition man

 

try changing eventHubNamespace to this:

 

eventHubNamespace = "iothub-ns-kepservere-1413800-d6d1c2b2f1"

 Is the Azure connector running on the same machine or in the same network as the ThingWorx server? The ThingWorx server has a 10.x.x.x IP address which is not routable over the public internet

 

I also see the `hubname` and `hubHostName` have different capitalization. The Hub name in Azure must be all lower case letters and numbers only.

 

Can you post a screen shot of this part of your Azure account with part of any access keys hidden

 

event-hub-compatible-name

 

Does the Policy key you are using have the correct permissions?

Re: IoT Hub connector with Thingworx-Exception while initializing stores, not starting partition man

Hi, I verified and the policy key has all the permissions (registry read, registry write, service connect and device connect).

 

My IoT Hub name is "KEPServerEXHub", is that a problem? Because I can connect my KEPServerEX IoT Gateway and send data to the Hub without any problem using the hostname "KEPServerEXHub.azure-devices.net".

 

Here is my communication arquitecture: 

Capture.PNG

 

All is in the Azure Cloude, in the same Region and I can psping and ping my two Virtual Machines without any problem. Using their ip public address and their private address.

 

Capture2.PNG

 

I tried tried to change the eventHubNamespace like you said but now i have this errors:

 

Highlighted

Re: IoT Hub connector with Thingworx-Exception while initializing stores, not starting partition man

The ConnectorVM on the ConnectorSubnet must be able to connect with the ThingWorx IP addresses on the ThingWorxSubnet.

 

Yes, due to a restriction in Azure blob naming the IoT Hub name must be all lowercase

 

https://blogs.msdn.microsoft.com/jmstall/2014/06/12/azure-storage-naming-rules/

 

 

Re: IoT Hub connector with Thingworx-Exception while initializing stores, not starting partition man

Hello again, I already check that my ConnectorVM and ThingworxVm can communicate with each other. 

 

On the other hand, I followed what you said and created all over again my IoT Hub, all with lower case letters. And I'm getting the same error trying to connect.

 

I can import the device I have in the IoT Hub, but I can't see data comming to my Thingworx platform.