3 Replies Latest reply on Aug 10, 2017 5:02 PM by ekobyakov-2 RSS
    mvolanti Apprentice

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

    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 !

      • Re: Very important! Connection server and IoT hub connector with two important ERROR. Don't work correctly!
        ttielebein Collaborator

        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?

          • Re: Very important! Connection server and IoT hub connector with two important ERROR. Don't work correctly!
            mvolanti Apprentice

            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