Skip to main content
1-Visitor
October 14, 2016
Question

Very important! Connection server and IoT hub connector with two important ERROR. Don't work correctly!

  • October 14, 2016
  • 2 replies
  • 10059 views

Hi,

I Installed connction server and iothub connector.

The web socket opening right in both case, but in logs are 2 big problems which cause the inability to read data from azure IoThub (with iothub connector).

Error:

CONNECTION SERVER:


1) Unable to dispatch [ uri = /Things/AlwaysOn-cxserver-a6536aa4-dbbe-4d15-bb0b-ad2b768c1e4d/Services/GetMetadata/]: Entity AlwaysOn-cxserver-a6536aa4-dbbe-4d15-bb0b-ad2b768c1e4d does not exist or is not yet associated with a Thing


2) error executing APIRequest Message: Entity AlwaysOn-cxserver-a6536aa4-dbbe-4d15-bb0b-ad2b768c1e4d does not exist or is not yet associated with a Thing, sending ERROR ResponseMessage to caller!



AZURE IOT HUB CONNECTOR

1) Unable to dispatch [ uri = /Things/iothub-ehub-iotesttw-72157-cf300d5f35/Properties/partitionTable/]: Entity iothub-ehub-iotesttw-72157-cf300d5f35 does not exist or is not yet associated with a Thing

2) error executing APIRequest Message: Entity iothub-ehub-iotesttw-72157-cf300d5f35 does not exist or is not yet associated with a Thing, sending ERROR ResponseMessage to caller!



​Thingworx 7.2.

Help me!! is Very important !

2 replies

5-Regular Member
October 14, 2016

What is this "iothub-ehub-iotesttw-72157-cf300d5f35​" that it says does not exist? Can you find this in the system? I wonder what this is supposed to do...

Is there some additional library or extension you are supposed to also import? Are there any installation steps that require running services which may generate these things which you might have missed?

mvolanti1-VisitorAuthor
1-Visitor
October 17, 2016

Hi,

I correct 2  problem that i mentioned up, I have a issue in the .conf  file.

So..

The azure iot connector opening web socket corectly. I'm able to create, delete, import, device from IoThub.

BUT I can't read messages/values from that device !! I'm using the demo( in the documentation of setup iot connector) to create random values.

My configuration is:

cx-server {

    protocol {

        port=8081

        // You can find the configuration parameters for your IoT Hub by logging into portal.azure.com and following the hints below.

        // If necessary, create a new IoT Hub: https://azure.microsoft.com/en-us/documentation/articles/iot-hub-java-java-getstarted/

        // A policy name that is related to a key specified below.  This policy is typically a built in, pre defined policy called "service",

        // but it is possible to use a custom policy if you add it to your hub.

        // All resources > your-hub > Settings > Shared access policies > service (or custom service with "service connect" permission

        consumerPolicyName = "service"

        // A key that supplies credentials to access services specified in the related policy.

        // All resources > your-hub > Settings  > Shared access policies > {consumerPolicyName} > Primary (or Secondary) key

        consumerPolicyKey = "t3/l93hMmHKQMKLFFH3q9qVGMTcucpRGbwu+QZgmQSA="

        // A name that defines the IoT Hub related to this adapter, which manages your things and their related messages.

        // Hubs can be scaled via hub units at different price tiers per unit.  Hubs are related to a resource group, which is

        // related to a subscription Id and a cloud Location.

        hubName = "Myhub"

        // The Event Hub-compatible name utilized by SDKs and integrations that expect to read from Event Hubs.  An Event Hub is an internal

        // component of an IoT Hub that handles device to cloud events for related things. In many cases the IoT Hub name and

        // Event Hub-compatible name are the same, so default to the IoT Hub name.

        // All resources > your-hub > Settings  > Messaging > Event Hub-compatible name

        eventHubName = ${cx-server.protocol.hubName}

        // An endpoint utilized by SDKs and integrations that expect to read from Event Hubs.

        // All resources > your-hub > Settings  > Messaging > Event Hub-compatible endpoint (hostname without ".servicebus.windows.net")

        eventHubNamespace = "ihsuproddbres045dednamespace"

        // The number of partitions that handle device to cloud events.

        // All resources > your-hub > Settings > Message > Partitions

        hubPartitions = 2

        // A consumer group name is required to pull data from the IoT Hub.

        // All resources > your-hub > Settings > Message > Consumer groups

        // null means to use the $Default consumer group

        consumerGroup = null

        // IoT Hubs have a hostname that is defined by the hubName, plus a domain name of Azure's choosing, normally azure-devices.net.

        // All resources > your-hub > Essentials section > Hostname

        hubHostname = ${cx-server.protocol.hubName}".azure-devices.net"

        // Settings for Azure blob storage.  Used for device-export for an Azure IoT Hub.

        // Create a "Storage Account" in the Azure portal, then use the navigation hints below.

        blob-storage {

            // <blob-store> > Settings > Access Keys > Storage account name

            account-name = "myhubblob"

            // <blob-store> > Settings > Access Keys > Primary or secondary key

            account-key = "ROZQfFFQvhSP+R/yNhLrS4rV5WuSmqqXOHcioxpWEIdDirJHdTNh4YkqjyaMdF7Zh102Vn6+KFtzxz/y4mz9uQ=="

        }

    }

    transport.websockets {

        // ThingWorx platform application key

        app-key = "bfbd6a33-c995-40b6-96cc-e4e9f0481a15"

        // One or more platforms can be specified here, comma separated

        platforms = "ws://localhost:8080/Thingworx/WS"

    }

}

below is the iot-connector log part where WARN is located but i don't know if it's the problem.

17:21:58.295 [main] WARN  c.t.c.metrics.MetricsReporterManager - Metrics are enabled but no reporters are configured

17:21:59.349 [azure-eventhub-consumer-1] WARN  c.t.p.azure.iot.EventHubConsumer - partition receiver failed to start: partitionId=1, will-retry=false

com.microsoft.azure.servicebus.IllegalEntityException: The messaging entity 'sb://ihsuproddbres045dednamespace.servicebus.windows.net/iotesttw/consumergroups/$default/partitions/1' could not be found. TrackingId:30c6601b708040599c6c3b2358deb34f_G0, SystemTracker:gateway6, Timestamp:10/17/2016 3:21:57 PM, errorContext[NS: ihsuproddbres045dednamespace.servicebus.windows.net, PATH: IoTestTW/ConsumerGroups/$Default/Partitions/1, REFERENCE_ID: 83888f_30c6601b708040599c6c3b2358deb34f_G0, R_TYPE: NON_EPOCH]

  at com.microsoft.azure.servicebus.ExceptionUtil.toException(ExceptionUtil.java:38) ~[azure-eventhubs-0.7.1.jar:na]

  at com.microsoft.azure.servicebus.MessageReceiver.onError(MessageReceiver.java:379) ~[azure-eventhubs-0.7.1.jar:na]

  at com.microsoft.azure.servicebus.MessageReceiver.onClose(MessageReceiver.java:682) ~[azure-eventhubs-0.7.1.jar:na]

  at com.microsoft.azure.servicebus.amqp.BaseLinkHandler.processOnClose(BaseLinkHandler.java:56) ~[azure-eventhubs-0.7.1.jar:na]

  at com.microsoft.azure.servicebus.amqp.ReceiveLinkHandler.onLinkRemoteClose(ReceiveLinkHandler.java:92) ~[azure-eventhubs-0.7.1.jar:na]

  at org.apache.qpid.proton.engine.BaseHandler.handle(BaseHandler.java:176) ~[proton-j-0.12.2.jar:0.12.2]

  at org.apache.qpid.proton.engine.impl.EventImpl.dispatch(EventImpl.java:108) ~[proton-j-0.12.2.jar:0.12.2]

  at org.apache.qpid.proton.reactor.impl.ReactorImpl.dispatch(ReactorImpl.java:304) ~[proton-j-0.12.2.jar:0.12.2]

  at org.apache.qpid.proton.reactor.impl.ReactorImpl.process(ReactorImpl.java:272) ~[proton-j-0.12.2.jar:0.12.2]

  at com.microsoft.azure.servicebus.MessagingFactory$RunReactor.run(MessagingFactory.java:341) ~[azure-eventhubs-0.7.1.jar:na]

  at java.lang.Thread.run(Thread.java:745) ~[na:1.8.0_92]

Please can give me your steps !

Thanks

15-Moonstone
November 21, 2018

Hi,

 

I am able to make connection between thingworx composer and thingworx-azure connector. But not sure if I am connected with Azure. My logs doesn't give me that indication. Also I have attached few screenshot which shows thingworx composer is connected with thingworx-azure connector. Can you please suggest how can I make connection IOT hub? Below are my logs details.

 

 

12:44:37.631 [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'.
12:44:38.015 [main] WARN c.t.c.metrics.MetricsReporterManager - Metrics are enabled but no reporters are configured
12:44:39.510 [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)
12:44:39.525 [pool-5-thread-1] ERROR eventprocessorhost.trace - host AzureIot-2aaa9290-7e55-4b2c-abb5-d9c6a6f71e8e: Exception while initializing stores, not starting partition manager
12:44:39.525 [pool-5-thread-1] ERROR eventprocessorhost.trace - host AzureIot-2aaa9290-7e55-4b2c-abb5-d9c6a6f71e8e: Caught com.microsoft.azure.servicebus.IllegalEntityException: Failure getting partition ids for event hub
12:44:39.525 [pool-5-thread-1] ERROR eventprocessorhost.trace - host AzureIot-2aaa9290-7e55-4b2c-abb5-d9c6a6f71e8e: com.microsoft.azure.eventprocessorhost.PartitionManager.getPartitionIds(PartitionManager.java:71)
12:44:39.525 [pool-5-thread-1] ERROR eventprocessorhost.trace - host AzureIot-2aaa9290-7e55-4b2c-abb5-d9c6a6f71e8e: com.microsoft.azure.eventprocessorhost.PartitionManager.initializeStores(PartitionManager.java:211)
12:44:39.525 [pool-5-thread-1] ERROR eventprocessorhost.trace - host AzureIot-2aaa9290-7e55-4b2c-abb5-d9c6a6f71e8e: com.microsoft.azure.eventprocessorhost.PartitionManager.initialize(PartitionManager.java:106)
12:44:39.525 [pool-5-thread-1] ERROR eventprocessorhost.trace - host AzureIot-2aaa9290-7e55-4b2c-abb5-d9c6a6f71e8e: com.microsoft.azure.eventprocessorhost.EventProcessorHost.lambda$registerEventProcessorFactory$0(EventProcessorHost.java:509)
12:44:39.525 [pool-5-thread-1] ERROR eventprocessorhost.trace - host AzureIot-2aaa9290-7e55-4b2c-abb5-d9c6a6f71e8e: java.util.concurrent.FutureTask.run(Unknown Source)
12:44:39.525 [pool-5-thread-1] ERROR eventprocessorhost.trace - host AzureIot-2aaa9290-7e55-4b2c-abb5-d9c6a6f71e8e: java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
12:44:39.525 [pool-5-thread-1] ERROR eventprocessorhost.trace - host AzureIot-2aaa9290-7e55-4b2c-abb5-d9c6a6f71e8e: java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
12:44:39.525 [pool-5-thread-1] ERROR eventprocessorhost.trace - host AzureIot-2aaa9290-7e55-4b2c-abb5-d9c6a6f71e8e: java.lang.Thread.run(Unknown Source)
12:44:39.525 [pool-5-thread-1] ERROR eventprocessorhost.trace - host AzureIot-2aaa9290-7e55-4b2c-abb5-d9c6a6f71e8e: Inner exception com.microsoft.azure.servicebus.ServiceBusException: java.lang.NullPointerException, TrackingId: 7b47ba83-1d67-496b-bbf0-e0f3f4d752b4, at: 2018-11-16T12:44:39.523+05:30[Asia/Calcutta]
12:44:39.525 [pool-5-thread-1] ERROR eventprocessorhost.trace - host AzureIot-2aaa9290-7e55-4b2c-abb5-d9c6a6f71e8e: com.microsoft.azure.servicebus.MessagingFactory$RunReactor.run(MessagingFactory.java:397)
12:44:39.525 [pool-5-thread-1] ERROR eventprocessorhost.trace - host AzureIot-2aaa9290-7e55-4b2c-abb5-d9c6a6f71e8e: java.lang.Thread.run(Unknown Source)
13:56:52.584 [ConnectedStateListener-executor] WARN c.t.connectionserver.CXThingImpl - Lost connection to platform

1-Visitor
August 10, 2017

This error is innocuous. It does not interfere with operation of connector or platform. see discussion here I am getting some errors in the error logs while starting the Azure IoT Hub connector