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

Java Edge SDK cannot connect to ThingWorx Server, error 302

seanccc
17-Peridot

Java Edge SDK cannot connect to ThingWorx Server, error 302

Hi, 

The Java edge SDK raise 302 error code when connecting to ThingWorx server,   the IP address and appKey is correct .   The server has a customized Authenticator enabled , but sending post request via Postman to the server works.   Why the java sdk can not connect to the server ?    

 

ThingWorx version: 9.1.0

edge SDK: 7.0

JDK :  11

 

seanccc_0-1623917804622.png

 

seanccc_1-1623918072478.png

 

Regards,

Sean

 

2 REPLIES 2
abjain
13-Aquamarine
(To:seanccc)

@seanccc : Instead of ip can you try with the domain name of your server in the uri. Ex:"ws://pp-20050704237k.portal.ptc.io:8080/Thingworx/WS"? Also, is SSL enabled for your thingworx server? If yes, in that case connection uri in sdk should use wss instead of ws. 

slangley
23-Emerald II
(To:seanccc)

Hi @seanccc.

 

Were you able to make any progress on your issue?  Did you test using the domain name?  The IP address seen in the pic you provided indicates you are trying to connect internally, but I assume that is not the case.  Please make sure to use the public IP address if communicating outside your network.

 

Also, is it possible that you have SSL enabled in your java SDK?  From the url in the log snippet, we can see that SSL is not enabled on the ThingWorx side.  If you have it enabled on the sending side, that could be the cause of the issue.

 

Regards.

 

--Sharon

Announcements