Skip to main content
1-Visitor
May 31, 2018
Solved

Thingworx EMS WebSocket Closed!

  • May 31, 2018
  • 1 reply
  • 6068 views

When trying to run the EMS on an Ubuntu PC I get the following messages:

twWs_Receive: Websocket closed!

api:sendMessageBlocking: AUTH Message 1 failed. Code:129

 

Web server runs correctly I can open a browser and hit http://localhost:8000/Thingworx/Things/LocalEms/Properties/isConnected however this shows an empty webpage and not an InfoTable.

 

If I run a lsof command it shows the port 8000 is listening and it's being used by wsems and that a connection is established with the ThingWorx Server.

 

Any ideas or suggestions?

Best answer by gquiroga

I was able to establish the connection by opening the AWS Server to pings and by changing the appkey.


1 reply

5-Regular Member
May 31, 2018

Your post is a bit light on information. If you add some extra details someone might help better. My first guess would be that your app-key has expired but you don't mention your version of ThingWorx platform.

 

You should: 

* Check the thingworx platform logs.

* Check to see if your app-key has expired

* you don't explain what port 8000 is or what it's supposed to be used for

 

I'm guessing it's your app-key

gquiroga1-VisitorAuthor
1-Visitor
May 31, 2018

Thanks for your response cdovholuk.

* Port 8000 is what I have configured for the http server.

* I just created the appKey.

* I believe the issue is with the TWX server it's an AWS

5-Regular Member
May 31, 2018

It's possilble AWS is terminating the websocket. If there's nothing in the ThingWorx platform logs - this will be an expedition as to the problem. If you have the ability to make a support ticket with PTC support - you probably should.

 

You could try to fire up a tcpdump/wireshark from the ems and see what the actual traffic looks like... You also could try enabling verbose logging in the ems (i don't have the exact instructions how to do that but I believe our doc shows you how) and you should turn up logging at the platform to see if anything pops out of there.

 

I don't think I'll be able to offer you much more than that - sorry...