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

Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X

Connecting to Core with 'SteamSensorClient'

Kaya
Emeritus

Connecting to Core with 'SteamSensorClient'

Received this question from a user. Thoughts? Thanks in advance.

 

CaptureIII.PNG

 

Error -1 during socket initialization:

11 REPLIES 11
pgrodowski
13-Aquamarine
(To:Kaya)

Hello,

 

This looks like the connection to the socket fails.

Is the Thingworx environment on localhost running with a self signed certificate?

 

If yes, please ask the user to change the Uri to wss://localhost:8443/Thingworx/WS and let me know if this resolves the problem.

 

At first glance it looks like the connection is refused.

 

Regards,

Pascal

billst
4-Participant
(To:pgrodowski)

I think you are on the right track.  I am trying to connect to a trial version to do development and testing.  When I ping our (purchased) live Thingworx  core it connects and pushes property updates.  When I installed the trial version I did not select SSL secure connection because I do not have a KeyStore.jks file or the KeyStore password.

mgoel
17-Peridot
(To:billst)

@Kaya

 

Hope you are doing good. Could you please confirm if the issue has been resolved.

 

If yes, please mark the answer as accept as solution for the future reference. Thank you in advance.

Regards-Mohit Goel

billst
4-Participant
(To:mgoel)

No, I still cannot connect with the SDK.  RestAPI  connects OK.

pgrodowski
13-Aquamarine
(To:billst)

Hello,

 

Can you provide your configuration and the url you're using to connect to the Platform? You can remove all internal information, important would be just the ports for the most part.

 

Thanks in advance.

 

Regards,

Pascal

billst
4-Participant
(To:pgrodowski)

 

 

billst
4-Participant
(To:pgrodowski)

 

wss://localhost:80/Thingworx/WS
config.AllowSelfSignedCertificates = true;
config.DisableCertValidation = true;
billst
4-Participant
(To:pgrodowski)

"wss://localhost:80/Thingworx/WS"
billst
4-Participant
(To:pgrodowski)

Visual Studio 2015,  Tried .NET 3.5 -> 4.5.2

pgrodowski
13-Aquamarine
(To:billst)

Hello,

 

I've done some further tests, is it correct that you're running the Thingworx environment with no certificate at all?

That's not recommended and would be rather difficult to work around, you can find one example how this can be done here, which is rather dated and untested from my side:

https://community.ptc.com/t5/ThingWorx-Developers/No-SSL-certification-in-C-SDK/td-p/530410

 

I would rather suggest to create a self signed certificate, which should give you less / no troubles when performing the connection from the SDK.

 

Let me know if you're still running into problem when using the self signed certificate.

 

Regards,

Pascal

mgoel
17-Peridot
(To:pgrodowski)

Hi @billst

 

Hope you are doing good. Could you please confirm if the issue has been resolved.

 

If yes, please mark the answer as accept as solution for the future reference. Thank you in advance.

Regards-Mohit Goel

Top Tags