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

Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X

Trying to run the Raspberry PI demo -- seeing errors in the PI's terminal -- using academic cloud instance -- Help please

jamesso
12-Amethyst

Trying to run the Raspberry PI demo -- seeing errors in the PI's terminal -- using academic cloud instance -- Help please

I have access to ThingWorx via this URL as provided to me as part of the academic program:

I can access the composer there just fine.

I created an App key as the Raspberry PI tutorial describes. I compiled the EMS jar and deployed it to the PI.

The command line I use on the PI is:

java -jar ./temperature-thing-jar-with-dependencies.jar ws://thingworx-academic-vu.ptcmscloud.com/Thingworx/WS <<myapikey>> simulated

I am hiding the API string for privacy.

The process on the PI starts up OK but then I see this log sequence repeated:

19:56:33.268 /main DEBUG c.t.c.c.e.m.CommunicationEndpointMonitorTask - Initializing CommunicationEndpoint Connection Monitor...

19:56:33.274 /Client-EndpointMonitor-1 DEBUG c.t.c.c.e.m.CommunicationEndpointMonitorTask - CommunicationEndpoint Monitor - checking for disconnected endpoints

19:56:33.277 /Client-EndpointMonitor-1 INFO  c.t.c.c.e.m.CommunicationEndpointMonitorTask - Endpoint not connected name: EP_0, id: 0. Attempting /reconnect...

19:56:33.284 /Client-EndpointMonitor-1 DEBUG c.t.c.c.e.ClientCommunicationEndpoint - Clearing endpoint authentication data id: 0

19:56:33.286 /Client-EndpointMonitor-1 INFO  c.t.c.c.e.ClientCommunicationEndpoint - Needed to refill connections on client endpoint id: 0 : active: 0, max: 1

19:56:33.550 /Client-EndpointMonitor-1 ERROR c.t.c.c.e.ClientCommunicationEndpoint - Refilling connections on endpoint 0, uri: ws://thingworx-academic-vu.ptcmscloud.com/Thingworx/WS failed : null

19:56:33.552 /Client-EndpointMonitor-1 INFO  c.t.c.c.e.m.CommunicationEndpointMonitorTask - Endpoint reconnection was unsuccessful name: EP_0, id: 0

I think I have the WS URL for my cloud instance correctly included in the pom.xml file used to deploy the jar. This is the same one that I use on the command line and that URL is leading to a failed connection.

As far as I can tell, I have followed all tutorial steps correctly. Do I need to create a remote thing first in the Composer? The tutorial does not describe this step.

Any advice appreciated.

6 REPLIES 6
jamesso
12-Amethyst
(To:jamesso)

More info.

If I run from my laptop, AND I use port 80 in the url string, then on the EMS command line I do see simulated temperatures and humidity values. But on the ThingWorx server, if I chose to monitor unbound remote things, nothing is showing up there.


On the PI, I get a different error: 









20:46:12.237 DEBUG c.t.c.c.c.n.ThingworxClientConnectionHandler - WebSocket Channel is connected


20:46:12.299 DEBUG i.n.h.c.h.w.WebSocketClientHandshaker13 - WebSocket version 13 client handshake key: oHqzZvpi3anAQC4F+gEm7g==, expected response: pQYG6OwuJhogu7qGuxGUELv22s0=


20:46:21.414 INFO  c.t.c.c.c.n.NettyClientConnectionFactory - forcing underlying tcp channel closed


20:46:21.423 ERROR c.t.c.c.e.ClientCommunicationEndpoint - Refilling connections on failed : timeout waiting for websocket handshake to complete


20:46:21.425 INFO  c.t.c.c.e.m.CommunicationEndpointMonitorTask - Endpoint reconnection was unsuccessful </p></div></p>

jamesso
12-Amethyst
(To:jamesso)

Based on some email from Adrian Petrescu I can get the EMS on the Raspberry PI to run without error if I use the IP address for my ThingWorx server instead of its FQDN. I see simulated temp and humidity values in the log stream.

But I don't see anything on the server when I select the Monitoring option to look at Unbound Remote Things. The messages on the PI suggest that the name Am2302Thing is being used from there, but I have not created such a thing in the Composer. Do I need to do that? The tutorial does not show that this step is required BEFORE trying to see the connection in the Monitoring window. 


BUT, later in the How to Bind Data tutorial video, the narrator shows how to create a Data Shape, then a Thing Template and finally a Thing. The Thing she creates IS Am2302Thing. So perhaps there is a cart before the horse issue here?


Comments appreciated.



jamesso
12-Amethyst
(To:jamesso)

There is something wrong with my ThingWorx server instance I suspect. After making all of the definitions: Shape, Template, Thing and binding the remote properties to the thing successfully, I still don't see a thing name in the Monitoring window, either under the All tab or the Unbound tab.

This is an educational show stopper for me at the moment!

walterh
1-Visitor
(To:jamesso)

Did you ever figure anything out on this? I am having a similar problem.


-Walter



jamesso
12-Amethyst
(To:jamesso)

The problem is that for the Monitoring access to work as advertised you need admin privileges to the server.

The academic instances in the cloud do NOT have admin privileges enabled for an ordinary educational user and ThingWorx is reluctant to do that for fear that the user might do damage to the instance.


There was some possibility that they could clone the Remote Thing Monitoring mashup and allow ordinary users to have access to that. But the person I am in touch with on this has been silent for over 2 weeks.



adrianpet
12-Amethyst
(To:jamesso)

Hello all,

     We are working on solving this issue. At the moment, the workaround for this issue is that we can see if a device was connected to its equivalent in ThingWorx (a Remote Thing in ThingWorx) by checking that the value from the isConnected property inside the Remote thing is "true". 


Best regards,



Announcements


Top Tags