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

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

Connection to Thingworx failed

grantji
6-Contributor

Connection to Thingworx failed

I installed both Thinngworx foundation server and Industrial Connectivity, version 8.3 trial. The Thingworx foundation server is working well, I can connect to composer in Browser. However, I tried to configure IC to connect to Thingworx, and then get an error: 

 

Date Time Level Source Event
1/8/2019 10:50:18 AM Error ThingWorx Native Interface Connection to ThingWorx failed. | Platform = localhost:80/Thingworx/WS, error = could not initialize a secure socket connection.

 

Thanks a lot!

001.png

ACCEPTED SOLUTION

Accepted Solutions
hchanana
16-Pearl
(To:RV_7)

Hi @RV_7 ,

 

Can you set Disable Encryption to yes and try to connect.

If this does not work, additionally change localhost to 127.0.0.1 in the host property.

 

Thanks,

Himanshu

View solution in original post

34 REPLIES 34

Hi @grantji,

 

Can you please validate your ThingWorx tomcat server port (80 in your case) is correct, the app key is valid. Also enable Trust all certificates and Trust self-sign certificates and reinitialize the KepServerEX

Regards,

Himanshu

grantji
6-Contributor
(To:hchanana)

Thanks for your reply. The port is 80, I connect to foundation server via "http://localhost/Thingworx/Composer/Apps/Composer/index.html#/modeler/details/ApplicationKey~Demo/attributes" The application key is correct as well. I have enabled Trust all certificates and Trust self-sign certificates. so fat it still doesn't work. how to reinitialize the KepServerEX? I exit the industrial connection and the start it again, right?

Hi @grantji,

 

You need to right click on KepServerEx icon on bottom right of your machine, you will get reinitialize option there.

 

Capture.JPG

 

 

Thanks,

Himanshu

grantji
6-Contributor
(To:hchanana)

It still doesn't work, thanks a lot anyway.
grantji
6-Contributor
(To:hchanana)

@hchanana

It still doesn't work. Thanks a lot anyway.

Hi @grantji,

 

Can you please share the ThingWorx application logs and event  logs of KepServerEX.

 

Thanks,

Himanshu

grantji
6-Contributor
(To:hchanana)

Thanks Himanshu, the attachment is event log of kepware, fyi. Where can I get the Thingworx application logs?
grantji
6-Contributor
(To:hchanana)

@hchanana, I sent a private message to you. You can connect to my machine via teamviewer if need. Thank you very much for spending time on my question.

Hi @grantji,

 

You can get the application logs in ThingworxStorage/logs folder.

 

Thanks,

Himanshu

grantji
6-Contributor
(To:hchanana)

Hi Himanshu,

 

sorry for this late reply, I took a long leave for some urgent things.  Today I try again, and still cannot connect to the web server. I attached some log files here, fyi. Thanks a lot.

 

Grant

SebB
13-Aquamarine
(To:grantji)

Hey @grantji 

 

the security.log show a http validation error. I found some TechSupport articles to this issue but i am not sure if the causes your connection issue. Could you please send the Application.log file that is in the same folder like the two over log files.

 

Seb

Seb
Principal Solution Experience Architect
PTC
grantji
6-Contributor
(To:SebB)

 
SebB
13-Aquamarine
(To:grantji)

Thanks @grantji 

 

but the log is full with ThingWatcher Messages.

Could you send me the archive folder that is in the log folder to see older log files.

 

Seb

Seb
Principal Solution Experience Architect
PTC
grantji
6-Contributor
(To:SebB)

Hi Seb, I got the log files under C:\Program Files (x86)\twxFoundationH2Trial-8.3.2\tomcat\apache-tomcat-8.5.23\ThingworxStorage, pls see the attachment. If need, I can send the teamviewer connection to you. Thanks in advance!

 

SebB
13-Aquamarine
(To:grantji)

It looks like you have not used the free trail installer for the setup

I dont see any connecting try in the logs.

I would like to take a look an the system, i send you a pm.

 

Seb

Seb
Principal Solution Experience Architect
PTC
grantji
6-Contributor
(To:SebB)

Thanks Seb. I also think the Industrial connectivity didn't try to connect to the Tomcat server, not sure if there is any environmental configuration problem. Because the timezone is difference for us, I will email you next Monday, have a good weekend!  

 

Grant

SebB
13-Aquamarine
(To:grantji)

Hey @grantji ,

 

i could find the problem. I changed the connection information in KepServerEx from localhost to 127.0.0.1. for some reason localhost is blocked on the server. i assume its a security setting.

I haven not looked deeper into it.

 

The connection to Thingworx should work now.

 

Seb

Seb
Principal Solution Experience Architect
PTC
grantji
6-Contributor
(To:SebB)

Hi Seb,

 

It works now. This problem really perplexed me for a long time. Thank you very much for your big help.

I remember that I ever enable "127.0.0.1 localhost" in C:\Windows\System32\drivers\etc\hosts, and I can access "http://localhost/Thingworx/" in Internet Explorer, I am wonder why the localhost doens't work for Industrial Connectivity. Is there any security setting in Industrial Connectivity? Thanks again and have a good day!

SebB
13-Aquamarine
(To:grantji)

@grantji 

 

I am not aware of any security setting in Industrial Connectivity that could be responsible for that.

Maybe its the Windows firewall or any setting on the host.

 

Seb

Seb
Principal Solution Experience Architect
PTC
Rocko
18-Opal
(To:SebB)

I just had the same problem, and replacing localhost with 127.0.0.1 also resolved it (thanks!). I have firewall switched off, so it must be something different, the way Kepserver resolves names I guess.
grantji
6-Contributor
(To:Rocko)

I also guess the problem related to Kepserver settings. I have changed the hosts file (enable the line "127.0.0.1 localhost" ) and switched the Windows Firewall off. Thanks!

SebB
13-Aquamarine
(To:grantji)

@grantji  and @Rocko 

 

could you please give me the KepServerEx version that you are using.

I want to check with PM if that is an issue with KepServerEx.

 

Thanks Seb

Seb
Principal Solution Experience Architect
PTC
Rocko
18-Opal
(To:SebB)

With me, it's ThingWorx Industrial Connectivity Platform 8.4.66, Drivers are all 6.6.350.0.
SebB
13-Aquamarine
(To:Rocko)

@Rocko 

 

do you use windows server as OS?

 

Seb

Seb
Principal Solution Experience Architect
PTC
Rocko
18-Opal
(To:SebB)

No, it’s a windows 10 VM.
Hosts file maps localhost to 127.0.0.1.
SebB
13-Aquamarine
(To:Rocko)

We just tested it on Win 10 without issue but i faced the issue with Win server.

Thanks to all for your replies!

We will try to find the reason for this behavior and get back to you.

 

Seb

 

Seb
Principal Solution Experience Architect
PTC
grantji
6-Contributor
(To:SebB)

Hi Seb, I downloaded latest trial version on the official website. Just I checked the version of "Thingworx Industrial Connectivity", it is 8.3.65.  My OS is Windows Server 2012, installed on Virtual Machine. 

 

Grant

grantji
6-Contributor
(To:SebB)

Hi Seb,

 

I would like to know if there is any progress from testing team? Thanks a lot in advance!

 

Grant

SebB
13-Aquamarine
(To:grantji)

I got the feedback from RnD that the issue could not be reproduced.

 

Do you have the change to test it with the newest KepServerEx version?

 

Seb

Seb
Principal Solution Experience Architect
PTC
Announcements


Top Tags