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

Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X

Error browsing properties. Be sure the remote device/server is connected and configured properly

dciciani
4-Participant

Error browsing properties. Be sure the remote device/server is connected and configured properly

Hi,

I get "Error browsing properties. Be sure the remote device/server is connected and configured properly" when i'm trying to browse properties from my remote device "PiThing_dciciani". The configuration of my edge device look  'isConnected' is set to 'True'. 

On the device I've 'wsems ' and 'luaScriptResource' running. The configuration are:

- config.json

{
"ws_servers": [{
"host": "academic-educatorsextension.portal.ptc.io",
"port": 443
}],
"http_server": {
"host": "127.0.0.1",
"port": 8080,
"ssl": false,
"authenticate": false
},
"appKey": "***************************",
"logger": {
"level": "DEBUG"
},
"auto_bind": [{
"name": "PiThing_dciciani",
"gateway": false
}],
"certificates": {
"validate": false,
"allow_self_signed":true
},
"ws_connection": {
"encryption": "ssl",
"verbose": true,
"msg_timeout": 1000
}
}

 config.lua

scripts.log_level = "DEBUG"
scripts.PiThing = {
file = "thing.lua",
template = "PiTemplate",
identifier = "PiThing_dciciani",
scanrate = 1000,
taskrate = 30000
}

scripts.rap_host = "127.0.0.1"
scripts.rap_port = 8080
scripts.rap_ssl = false
scripts.rap_server_authenticate = false


scripts.script_resource_host = "127.0.0.1"
scripts.script_resource_port = 8001
scripts.script_resource_ssl = false
scripts.script_resource_authenticate = false

 

 

Anyone has got the same problem? What i'm missing?

 

Thanks!

 

Daniele

1 REPLY 1
dciciani
4-Participant
(To:dciciani)

Ah, these are the logs come from ./wsems and ./luaScriptResource.

./wsems

[FORCE] 2018-06-17 22:18:42,661 ./wsems: Initializing EMS ....
[FORCE] 2018-06-17 22:18:42,662 main: Using config file /home/pi/microserver/etc/config.json
[INFO ] 2018-06-17 22:18:42,662 ./wsems: Creating the WsEms proxy.
[INFO ] 2018-06-17 22:18:42,662 ./wsems: Starting HTTP Server.
[INFO ] 2018-06-17 22:18:42,662 Main: Using custom certificate and private key for HTTP Server
[WARN ] 2018-06-17 22:18:42,662 Main: Encryption is disabled on HTTP Server.
[WARN ] 2018-06-17 22:18:42,662 Main: Authentication is disabled on the HTTP Server.
[FORCE] 2018-06-17 22:18:42,663 httpServer: starting http server port=8080
[INFO ] 2018-06-17 22:18:42,663 ./wsems: Initializing the ThingWorx REST interface.
[DEBUG] 2018-06-17 22:18:42,663 httpServer: http server bound to port=8080.
[INFO ] 2018-06-17 22:18:42,663 wsEmsProxy::initialize: FIPS is disabled.
[INFO ] 2018-06-17 22:18:42,663 wsEmsProxy::initialize: Encryption is enabled on Web Socket connection.
[WARN ] 2018-06-17 22:18:42,665 SDK: SDK Version: 2.0.4
[WARN ] 2018-06-17 22:18:42,665 SDK: TLS Library: OpenSSL
[WARN ] 2018-06-17 22:18:42,665 SDK: TLS Library Version: 1.0.2l
[WARN ] 2018-06-17 22:18:42,665 SDK: FIPS Capable
[DEBUG] 2018-06-17 22:18:42,665 SDK: twWs_Create: Initializing Websocket Client for academic-educatorsextension.portal.ptc.io:443//Thingworx/WS
[DEBUG] 2018-06-17 22:18:42,665 SDK: twTlsClient_Create: Initializing TLS Client
[DEBUG] 2018-06-17 22:18:42,704 SDK: twApi_Initialize: Websocket Established after 0 tries
[DEBUG] 2018-06-17 22:18:42,704 SDK: subscribedPropsMgr_Initialize: Initializing subscribed properties manager
[INFO ] 2018-06-17 22:18:42,704 WsProxy::initialize: EMS Version 5.4.0.114
[INFO ] 2018-06-17 22:18:42,704 WsProxy::initialize: twApi singleton initialized
[WARN ] 2018-06-17 22:18:42,704 WsProxy::initialize: Certificate validation is disabled.
[WARN ] 2018-06-17 22:18:42,704 WsProxy::initialize: Self signed certificates are enabled.
[DEBUG] 2018-06-17 22:18:42,704 jsonConfigurator::getJsonEntity: Key validation_criteria not found
[DEBUG] 2018-06-17 22:18:42,705 jsonConfigurator::getJsonEntity: Parent file not found
[DEBUG] 2018-06-17 22:18:42,706 SDK: twTunnelManager_Create: Tunnel Manager singleton already exists
[ERROR] 2018-06-17 22:18:42,706 SDK: twMap_Add: parse function returned null.
[DEBUG] 2018-06-17 22:18:42,705 WsEmsProxy::bindThing: Host specified as 'localhost'. Testing IPV6/IPV4 connectivity
[WARN ] 2018-06-17 22:18:42,707 WsEmsProxy::bindThing: Exception connecting to localhost:8001. Err: Connection refused [localhost:8001]
[WARN ] 2018-06-17 22:18:42,707 WsEmsProxy::bindThing: Changing host from 'localhost' to '127.0.0.1'
[DEBUG] 2018-06-17 22:18:42,708 SDK: added PiThing_dciciani to boundList
[DEBUG] 2018-06-17 22:18:42,708 SDK: twApi_BindThings: not currently connected, only binding things to api
[DEBUG] 2018-06-17 22:18:42,708 SDK: twMessage_Delete: Deleting BIND Message: 1
[DEBUG] 2018-06-17 22:18:42,708 jsonConfigurator::getJsonEntity: Parent file not found
[INFO ] 2018-06-17 22:18:42,708 wsEmsProxy::initialize: Initialization complete!
[INFO ] 2018-06-17 22:18:42,709 ./wsems: Starting the connection.

academic-educatorsextension.portal.ptc.io:443-->[DEBUG] 2018-06-17 22:18:42,712 SDK: twTlsClient_Reconnect: Re-establishing SSL context
[DEBUG] 2018-06-17 22:18:42,714 SDK: twTlsClient_Connect: Connecting to server
[DEBUG] 2018-06-17 22:18:43,108 SDK: twTlsClient_Connect: TLS connection established
[DEBUG] 2018-06-17 22:18:43,254 SDK: ws_on_headers_complete: Websocket connected!
[INFO ] 2018-06-17 22:18:43,254 SDK: twWs_Connect: Websocket connected!
[DEBUG] 2018-06-17 22:18:43,255 SDK: twWs_SendMessage: Sent 60 bytes using 1 frames.
[DEBUG] 2018-06-17 22:18:43,718 SDK: twMessage_Delete: Deleting RESPONSE Message: 2
[DEBUG] 2018-06-17 22:18:43,718 SDK: twMessage_Delete: Deleting AUTH Message: 2
[WARN ] 2018-06-17 22:18:43,719 SDK: twBindBody_Delete: NULL body or stream pointer
[DEBUG] 2018-06-17 22:18:43,719 SDK: twMessage_Delete: Deleting BIND Message: 3
[DEBUG] 2018-06-17 22:18:43,719 SDK: twWs_SendMessage: Sent 35 bytes using 1 frames.
[DEBUG] 2018-06-17 22:18:43,721 SDK: sendCtlFrame: >>>>> Sending Ping. Msg: 22:18:43
[INFO ] 2018-06-17 22:18:43,761 Main: Succesfully connected. Saving .booted config file
[DEBUG] 2018-06-17 22:18:44,12 SDK: twMessage_Delete: Deleting RESPONSE Message: 3
[DEBUG] 2018-06-17 22:18:44,12 SDK: twMessage_Delete: Deleting BIND Message: 3
[INFO ] 2018-06-17 22:18:45,114 SDK: api_requesthandler: No handler found. Returning 404
[DEBUG] 2018-06-17 22:18:45,115 SDK: twMessage_Delete: Deleting RESPONSE Message: 118
[DEBUG] 2018-06-17 22:18:45,115 SDK: twWs_SendMessage: Sent 17 bytes using 1 frames.
[DEBUG] 2018-06-17 22:18:45,115 SDK: twMessage_Delete: Deleting RESPONSE Message: 118
[DEBUG] 2018-06-17 22:18:45,115 SDK: twMessage_Delete: Deleting REQUEST Message: 118

-----------------------------------------------------------------------------------------------------------------------------------------------------

 ./luaScriptResource

[INFO ] 2018-06-17 22:23:08,345 ./luaScriptResource: Using config file: /home/pi/microserver/etc/config.lua
[FORCE] 2018-06-17 22:23:08,345 ./luaScriptResource: Starting up ....

[INFO ] 2018-06-17 22:23:08,350 luaScriptResource:main: Encryption is disabled on the RAP connection.
[INFO ] 2018-06-17 22:23:08,350 luaScriptResource:main: FIPS is disabled.
[DEBUG] 2018-06-17 22:23:08,353 ./luaScriptResource: Appending /home/pi/microserver/etc/thingworx/clibs;/home/pi/microserver/etc/custom/clibs;/home/pi/microserver/etc/community/clibs to current path /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
[INFO ] 2018-06-17 22:23:08,353 ./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
[WARN ] 2018-06-17 22:23:08,355 ScriptResource::initialize: Encryption is disabled on HTTP Server.
[WARN ] 2018-06-17 22:23:08,356 ScriptResource::initialize: Authentication is disabled on the HTTP Server.
[DEBUG] 2018-06-17 22:23:08,357 luaScriptProxy: Constructor Called
[DEBUG] 2018-06-17 22:23:08,359 luaScriptProxy::initialize: Name = PiThing
File = /home/pi/microserver/etc/thingworx/scripts/thing.lua
LibraryPath = /home/pi/microserver/etc/?.lua;/home/pi/microserver/etc/thingworx/?.lua;/home/pi/microserver/etc/thingworx/lua/?.lua;/home/pi/microserver/etc/custom/?.lua;/home/pi/microserver/etc/custom/lua/?.lua;/home/pi/microserver/etc/community/lua/?.lua
InitData Ptr = 0

Persisted Props:
file = thing.lua
identifier = PiThing_dciciani
scanrate = 1000
taskrate = 30000
template = PiTemplate

GlobalProps:
config_file_path = /home/pi/microserver/etc
log_level = DEBUG
rap_host = 127.0.0.1
rap_port = 8080
rap_server_authenticate = false
rap_ssl = false
script_clib_path = /home/pi/microserver/etc/thingworx/clibs/?.so;/home/pi/microserver/etc/custom/clibs/?.so;/home/pi/microserver/etc/community/clibs/?.so
script_directory = /home/pi/microserver/etc/custom/scripts
script_library_path = /home/pi/microserver/etc/?.lua;/home/pi/microserver/etc/thingworx/?.lua;/home/pi/microserver/etc/thingworx/lua/?.lua;/home/pi/microserver/etc/custom/?.lua;/home/pi/microserver/etc/custom/lua/?.lua;/home/pi/microserver/etc/community/lua/?.lua
script_resource_authenticate = false
script_resource_host = 127.0.0.1
script_resource_port = 8001
script_resource_ssl = false

[DEBUG] 2018-06-17 22:23:08,361 luaScriptProxy::runScript: Starting Script
[DEBUG] 2018-06-17 22:23:08,362 luaScriptProxy::execute: Script PiThing now executing
[DEBUG] 2018-06-17 22:23:08,373 luaScriptProxy::getStatus: Script PiThing status = Running
[DEBUG] 2018-06-17 22:23:08,378 luaScriptProxy: Constructor Called
[DEBUG] 2018-06-17 22:23:08,388 luaScriptProxy::initialize: Name = Thingworx
File = /home/pi/microserver/etc/thingworx/scripts/thingworx.lua
LibraryPath = /home/pi/microserver/etc/?.lua;/home/pi/microserver/etc/thingworx/?.lua;/home/pi/microserver/etc/thingworx/lua/?.lua;/home/pi/microserver/etc/custom/?.lua;/home/pi/microserver/etc/custom/lua/?.lua;/home/pi/microserver/etc/community/lua/?.lua
InitData Ptr = 0

Persisted Props:
file = thingworx.lua
max_run_time = 20

GlobalProps:
config_file_path = /home/pi/microserver/etc
log_level = DEBUG
rap_host = 127.0.0.1
rap_port = 8080
rap_server_authenticate = false
rap_ssl = false
script_clib_path = /home/pi/microserver/etc/thingworx/clibs/?.so;/home/pi/microserver/etc/custom/clibs/?.so;/home/pi/microserver/etc/community/clibs/?.so
script_directory = /home/pi/microserver/etc/custom/scripts
script_library_path = /home/pi/microserver/etc/?.lua;/home/pi/microserver/etc/thingworx/?.lua;/home/pi/microserver/etc/thingworx/lua/?.lua;/home/pi/microserver/etc/custom/?.lua;/home/pi/microserver/etc/custom/lua/?.lua;/home/pi/microserver/etc/community/lua/?.lua
script_resource_authenticate = false
script_resource_host = 127.0.0.1
script_resource_port = 8001
script_resource_ssl = false

[DEBUG] 2018-06-17 22:23:08,394 luaScriptProxy::runScript: Starting Script
[DEBUG] 2018-06-17 22:23:08,395 luaScriptProxy::execute: Script Thingworx now executing
[DEBUG] 2018-06-17 22:23:08,395 luaScriptProxy::getStatus: Script Thingworx status = Running
[FORCE] 2018-06-17 22:23:08,396 httpServer: starting http server port=8001
[DEBUG] 2018-06-17 22:23:08,396 httpServer: http server bound to port=8001.
[DEBUG] 2018-06-17 22:23:08,412 utils: Adding utils functions to tw_utils
[INFO ] 2018-06-17 22:23:08,429 thingworx.shape: Creating a new shape.
[INFO ] 2018-06-17 22:23:08,430 PiThing: -- Configuration -------------------------------
[INFO ] 2018-06-17 22:23:08,431 PiThing: scanRate: 60000
[INFO ] 2018-06-17 22:23:08,431 PiThing: scanRateResolution: 500
[INFO ] 2018-06-17 22:23:08,431 PiThing: taskRate: 15000
[INFO ] 2018-06-17 22:23:08,431 PiThing: keepAliveRate: 60000
[INFO ] 2018-06-17 22:23:08,431 PiThing: requestTimeout: 15000
[INFO ] 2018-06-17 22:23:08,431 PiThing: registerRate: 43200000
[INFO ] 2018-06-17 22:23:08,431 PiThing: register: true
[INFO ] 2018-06-17 22:23:08,431 PiThing: getPropertySubscriptionOnReconnect: false
[INFO ] 2018-06-17 22:23:08,431 PiThing: maxConcurrentPropertyUpdates: 100
[INFO ] 2018-06-17 22:23:08,431 PiThing: defaultPushType: VALUE
[INFO ] 2018-06-17 22:23:08,431 PiThing: useShapes: true
[INFO ] 2018-06-17 22:23:08,431 PiThing: identifier: PiThing_dciciani
[INFO ] 2018-06-17 22:23:08,431 PiThing: ------------------------------------------------
[INFO ] 2018-06-17 22:23:08,433 thingworx.template: Adding shape 'shapes.metadata' to template 'thingworx.template'
[INFO ] 2018-06-17 22:23:08,434 thingworx.template: Adding shape 'shapes.propsubscribe' to template 'thingworx.template'
[INFO ] 2018-06-17 22:23:08,434 thingworx.template: Creating new templates.PiTemplate named 'PiThing'
[INFO ] 2018-06-17 22:23:08,434 PiThing: -- Initializing properties ---------------------
[INFO ] 2018-06-17 22:23:08,435 PiThing: Initialized property upToDate [baseType: BOOLEAN, pushType: NEVER, handler: nil, value: true]
[INFO ] 2018-06-17 22:23:08,435 PiThing: Initialized property cpu_volt [baseType: NUMBER, pushType: ALWAYS, handler: nil, value: 0]
[INFO ] 2018-06-17 22:23:08,436 PiThing: Initialized property cpu_temperature [baseType: NUMBER, pushType: ALWAYS, handler: nil, value: 0]
[INFO ] 2018-06-17 22:23:08,436 PiThing: Initialized property cpu_freq [baseType: NUMBER, pushType: ALWAYS, handler: nil, value: 0]
[INFO ] 2018-06-17 22:23:08,436 PiThing: ------------------------------------------------
[DEBUG] 2018-06-17 22:23:08,436 luaScriptProxy::getStatus: Script PiThing status = Running
[DEBUG] 2018-06-17 22:23:08,436 luaScriptProxy::getStatus: Script Thingworx status = Running
[DEBUG] 2018-06-17 22:23:08,437 luaScriptProxy::getStatus: Script Thingworx status = Running
[WARN ] 2018-06-17 22:23:08,437 ScriptResource::executeScriptRequest: Path /scripts/Thingworx/registerIdentifier/ not found
[ERROR] 2018-06-17 22:23:08,437 luaInterscriptBinding::l_executeCallback: Error executing callback 'Thingworx//scripts/Thingworx/registerIdentifier'
Returned: 404 /scripts/Thingworx/registerIdentifier/ not found
[DEBUG] 2018-06-17 22:23:08,441 ScriptResource::registerScriptCallback: Registered path /scripts/Thingworx/ with callback handle_request
[DEBUG] 2018-06-17 22:23:08,441 luaHttpBinding::l_registerCallback: Registered path '/' with callback 'handle_request' for script 'Thingworx'
[DEBUG] 2018-06-17 22:23:08,442 ScriptResource::registerScriptCallback: Registered path /scripts/Thingworx/registerIdentifier/ with callback register_identifier
[DEBUG] 2018-06-17 22:23:08,442 luaHttpBinding::l_registerCallback: Registered path '/registerIdentifier' with callback 'register_identifier' for script 'Thingworx'
[DEBUG] 2018-06-17 22:23:09,439 ScriptResource::executeScriptRequest: Found callback handle_request for path /scripts/Thingworx/
[DEBUG] 2018-06-17 22:23:09,439 ScriptResource::executeScriptRequest: Found callback register_identifier for path /scripts/Thingworx/registerIdentifier/
[INFO ] 2018-06-17 22:23:09,439 Thingworx: Registering identifier *PiThing_dciciani for thing PiThing
[DEBUG] 2018-06-17 22:23:09,439 luaScriptProxy::executeScriptCallback: Executed POST request on register_identifier
[INFO ] 2018-06-17 22:23:10,440 PiThing: Identifier *PiThing_dciciani registered with main Thingworx script for for Thing PiThing
[INFO ] 2018-06-17 22:23:12,410 PiThing: -- Starting script --------------------------
[INFO ] 2018-06-17 22:23:12,410 PiThing: Registering core callback handler
[DEBUG] 2018-06-17 22:23:12,410 ScriptResource::registerScriptCallback: Registered path /scripts/PiThing/ with callback core_handler
[DEBUG] 2018-06-17 22:23:12,410 luaHttpBinding::l_registerCallback: Registered path '/' with callback 'core_handler' for script 'PiThing'
[INFO ] 2018-06-17 22:23:12,410 PiThing: Starting main loop
[INFO ] 2018-06-17 22:23:12,410 PiThing: Calling lifecycle start listeners.
[DEBUG] 2018-06-17 22:23:12,410 PiThing: Executing lifecycle start event: shapes.propsubscribe_start
[INFO ] 2018-06-17 22:23:12,410 shapes.propsubscribe: Initialized
[INFO ] 2018-06-17 22:23:12,411 thingworx.handler: Creating a new handler.
[DEBUG] 2018-06-17 22:23:12,414 thingworx.server: Invoking /Thingworx/Things/LocalEms/Services/AddEdgeThing on server. content: {"keepalive":60000,"port":"8001","timeout":15000,"host":"127.0.0.1","proto":"http","name":"*PiThing_dciciani","path":"/scripts/Thingworx"}
[DEBUG] 2018-06-17 22:23:12,415 SDK: twTlsClient_Create: Initializing TLS Client

 

Thanks!

Daniele

 

Top Tags