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

Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X

Error occurred while accessing EMS while connecting Raspberry Pi

sshrivastava
1-Newbie

Error occurred while accessing EMS while connecting Raspberry Pi

This is the output from Wsems


pi@raspberrypi:~/microserver $ sudo ./wsems

[INFO ] 2017-08-11 16:49:23,571 ./wsems: Using config file: /home/pi/microserver/etc/config.json

[FORCE] 2017-08-11 16:49:23,571 ./wsems: Starting up ....

[FORCE] 2017-08-11 16:49:23,572 ./wsems: Initializing EMS ....

[FORCE] 2017-08-11 16:49:23,572 main: Using config file /home/pi/microserver/etc/config.json

[INFO ] 2017-08-11 16:49:23,572 ./wsems: Creating the WsEms proxy.

[INFO ] 2017-08-11 16:49:23,572 ./wsems: Starting HTTP Server.

[INFO ] 2017-08-11 16:49:23,573 ./wsems: Initializing the ThingWorx REST interface.

[FORCE] 2017-08-11 16:49:23,573 httpServer: starting http server port=8088

[DEBUG] 2017-08-11 16:49:23,573 httpServer: http server bound to port=8088.

[DEBUG] 2017-08-11 16:49:23,574 SDK: twWs_Create: Initializing Websocket Client for 54.64.229.7:80//Thingworx/WS

[DEBUG] 2017-08-11 16:49:23,574 SDK: twTlsClient_Create: Initializing TLS Client

[DEBUG] 2017-08-11 16:49:23,575 SDK: twApi_Initialize: Websocket Established after 0 tries

[DEBUG] 2017-08-11 16:49:23,575 SDK: subscribedPropsMgr_Initialize: Initializing subscribed properties manager

[DEBUG] 2017-08-11 16:49:23,575 jsonConfigurator::getJsonEntity: Key cert_chain not found

[DEBUG] 2017-08-11 16:49:23,575 jsonConfigurator::getJsonEntity: Key validation_criteria not found

[DEBUG] 2017-08-11 16:49:23,576 jsonConfigurator::getJsonEntity: Parent file not found

[DEBUG] 2017-08-11 16:49:23,577 SDK: twTunnelManager_Create: Tunnel Manager singleton already exists

[DEBUG] 2017-08-11 16:49:23,576 WsEmsProxy::bindThing: Host specified as 'localhost'.  Testing IPV6/IPV4 connectivity

[DEBUG] 2017-08-11 16:49:23,578 SDK: added PiThing to boundList

[DEBUG] 2017-08-11 16:49:23,578 SDK: twApi_BindThings: not currently connected, only binding things to api

[DEBUG] 2017-08-11 16:49:23,578 SDK: twMessage_Delete:  Deleting BIND Message: 1

[DEBUG] 2017-08-11 16:49:23,578 jsonConfigurator::getJsonEntity: Parent file not found

[INFO ] 2017-08-11 16:49:23,578 wsEmsProxy::initialize: Initialization complete!

[INFO ] 2017-08-11 16:49:23,579 ./wsems: Starting the connection.

54.64.229.7:80-->[DEBUG] 2017-08-11 16:49:23,580 SDK: twTlsClient_Reconnect: Re-establishing SSL context

[DEBUG] 2017-08-11 16:49:23,581 SDK: twTlsClient_Connect: Connecting to server

[DEBUG] 2017-08-11 16:49:23,956 SDK: ws_on_headers_complete: Websocket connected!

[INFO ] 2017-08-11 16:49:23,956 SDK: twWs_Connect: Websocket connected!

[DEBUG] 2017-08-11 16:49:23,956 SDK: twWs_SendMessage: Sent 60 bytes using 1 frames.

[DEBUG] 2017-08-11 16:49:24,334 SDK: twMessage_Delete:  Deleting RESPONSE Message: 2

[DEBUG] 2017-08-11 16:49:24,334 SDK: twMessage_Delete:  Deleting AUTH Message: 2

[WARN ] 2017-08-11 16:49:24,335 SDK: twBindBody_Delete: NULL body or stream pointer

[DEBUG] 2017-08-11 16:49:24,335 SDK: twMessage_Delete:  Deleting BIND Message: 0

[DEBUG] 2017-08-11 16:49:24,335 SDK: twWs_SendMessage: Sent 26 bytes using 1 frames.

[DEBUG] 2017-08-11 16:49:24,337 SDK: sendCtlFrame: >>>>> Sending Ping. Msg: 11:19:24

[INFO ] 2017-08-11 16:49:24,381 Main: Succesfully connected.  Saving .booted config file

[DEBUG] 2017-08-11 16:49:24,784 SDK: twMessage_Delete:  Deleting RESPONSE Message: 3

[DEBUG] 2017-08-11 16:49:24,784 SDK: twMessage_Delete:  Deleting BIND Message: 3

[DEBUG] 2017-08-11 16:49:25,792 SDK: twTlsClient_Create: Initializing TLS Client

[DEBUG] 2017-08-11 16:49:25,795 TlsStream::doclose: Disconeccting socket

[DEBUG] 2017-08-11 16:49:25,795 SDK: twTlsClient_Close: Disconnecting from server

[DEBUG] 2017-08-11 16:49:25,795 emsRequestHandler: Got 405 response code from POST request on Things/PiThing/Services/NotifyPropertyUpdate

[DEBUG] 2017-08-11 16:49:25,796 SDK: twTlsClient_Close: Disconnecting from server

[WARN ] 2017-08-11 16:49:25,796 SDK: InfoTable precheck: Name not found in datashape

[DEBUG] 2017-08-11 16:49:25,797 SDK: twMessage_Delete:  Deleting RESPONSE Message: 0

[DEBUG] 2017-08-11 16:49:25,896 SDK: twWs_SendMessage: Sent 402 bytes using 1 frames.

[DEBUG] 2017-08-11 16:49:25,896 SDK: twMessage_Delete:  Deleting RESPONSE Message: 13

[DEBUG] 2017-08-11 16:49:25,896 SDK: twMessage_Delete:  Deleting REQUEST Message: 13

this is the output from lua script

pi@raspberrypi:~/microserver $ sudo ./luaScriptResource

[INFO ] 2017-08-11 17:22:33,152 ./luaScriptResource: Using config file: /home/pi/microserver/etc/config.lua

[FORCE] 2017-08-11 17:22:33,153 ./luaScriptResource: Starting up ....

[INFO ] 2017-08-11 17:22:33,160 ./luaScriptResource: New path is /home/pi/microserver/etc/thingworx/clibs:/home/pi/microserver/etc/custom/clibs:/home/pi/microserver/etc/community/clibs:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

[INFO ] 2017-08-11 17:22:33,220 thingworx.shape: Creating a new shape.

[INFO ] 2017-08-11 17:22:33,221 PiThing: -- Configuration -------------------------------

[INFO ] 2017-08-11 17:22:33,221 PiThing: scanRate: 60000

[INFO ] 2017-08-11 17:22:33,221 PiThing: scanRateResolution: 500

[INFO ] 2017-08-11 17:22:33,221 PiThing: taskRate: 15000

[INFO ] 2017-08-11 17:22:33,221 PiThing: keepAliveRate: 60000

[INFO ] 2017-08-11 17:22:33,221 PiThing: requestTimeout: 15000

[INFO ] 2017-08-11 17:22:33,221 PiThing: registerRate: 43200000

[INFO ] 2017-08-11 17:22:33,221 PiThing: register: true

[INFO ] 2017-08-11 17:22:33,221 PiThing: getPropertySubscriptionOnReconnect: false

[INFO ] 2017-08-11 17:22:33,221 PiThing: maxConcurrentPropertyUpdates: 100

[INFO ] 2017-08-11 17:22:33,222 PiThing: defaultPushType: VALUE

[INFO ] 2017-08-11 17:22:33,222 PiThing: useShapes: true

[INFO ] 2017-08-11 17:22:33,222 PiThing: identifier: Not Specififed

[INFO ] 2017-08-11 17:22:33,222 PiThing: ------------------------------------------------

[INFO ] 2017-08-11 17:22:33,223 thingworx.template: Adding shape 'shapes.metadata' to template 'thingworx.template'

[INFO ] 2017-08-11 17:22:33,224 thingworx.template: Adding shape 'shapes.propsubscribe' to template 'thingworx.template'

[INFO ] 2017-08-11 17:22:33,229 thingworx.template: Creating new templates.PiTemplate named 'PiThing'

[INFO ] 2017-08-11 17:22:33,229 PiThing: -- Initializing properties ---------------------

[INFO ] 2017-08-11 17:22:33,230 PiThing: Initialized property upToDate [baseType: BOOLEAN, pushType: NEVER, handler: nil, value: true]

[INFO ] 2017-08-11 17:22:33,230 PiThing: Initialized property cpu_volt [baseType: NUMBER, pushType: ALWAYS, handler: nil, value: 0]

[INFO ] 2017-08-11 17:22:33,230 PiThing: Initialized property cpu_temperature [baseType: NUMBER, pushType: ALWAYS, handler: nil, value: 0]

[FORCE] 2017-08-11 17:22:33,231 httpServer: starting http server port=8001

[INFO ] 2017-08-11 17:22:33,231 PiThing: Initialized property cpu_freq [baseType: NUMBER, pushType: ALWAYS, handler: nil, value: 0]

[INFO ] 2017-08-11 17:22:33,231 PiThing: ------------------------------------------------

[INFO ] 2017-08-11 17:22:36,202 PiThing: -- Starting script --------------------------

[INFO ] 2017-08-11 17:22:36,202 PiThing: Registering core callback handler

[INFO ] 2017-08-11 17:22:36,203 PiThing: Starting main loop

[INFO ] 2017-08-11 17:22:36,203 PiThing: Calling lifecycle start listeners.

[INFO ] 2017-08-11 17:22:36,203 shapes.propsubscribe: Initialized

[INFO ] 2017-08-11 17:22:36,204 thingworx.handler: Creating a new handler.

[INFO ] 2017-08-11 17:22:36,213 PiThing: Error occured while accessing EMS. Checking isConnected.

[INFO ] 2017-08-11 17:22:36,229 PiThing: MicroServer is now available.

[INFO ] 2017-08-11 17:22:36,229 PiThing: EMS is available: true, online: false

[INFO ] 2017-08-11 17:22:42,268 PiThing: Error occured while accessing EMS. Checking isConnected.

[INFO ] 2017-08-11 17:22:42,274 PiThing: EMS is available: true, online: false

[INFO ] 2017-08-11 17:22:48,281 PiThing: Error occured while accessing EMS. Checking isConnected.

[INFO ] 2017-08-11 17:22:48,285 PiThing: EMS is available: true, online: false

[INFO ] 2017-08-11 17:22:54,309 PiThing: Error occured while accessing EMS. Checking isConnected.

[INFO ] 2017-08-11 17:22:54,314 PiThing: EMS is available: true, online: false

[INFO ] 2017-08-11 17:23:00,324 PiThing: Error occured while accessing EMS. Checking isConnected.

[INFO ] 2017-08-11 17:23:00,329 PiThing: EMS is available: true, online: false

But i am not able to connect Server and not able to connect ems

and i am not able to see property in Pi thing in remote under managing property binding

pls help me to solve this issue

4 REPLIES 4
alex.augot
5-Regular Member
(To:sshrivastava)

Hi Shruti,

It sounds like you're using an auto_bind configuration in the EMS, which is not something you need to do if you're running the LSR.  Try removing the 'auto_bind' structure from config.json and see if that fixes the issue.

Hi Alex,

After removing the auto_bind from config.json file, still the same error is coming

Navku
13-Aquamarine
(To:sshrivastava)

Hi ,

Is your ems and thingworx connecting and binding the data to thingworx

Please help me with that I am getting the same error

Navku
13-Aquamarine
(To:sshrivastava)

Hi,

Is this error resolved.

Top Tags