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

Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X

wsems error message : SDK: twSocket_Create: getaddrinfo() failed: [Name or service not known]"

KC_9903026
2-Guest

wsems error message : SDK: twSocket_Create: getaddrinfo() failed: [Name or service not known]"

Hello Everyone,

 

 

How's everyone doing here!  I am new to wsems and I am having some issue with starting it.  It seems the problem is "SDK: twSocket_Create: getaddrinfo() failed: [Name or service not known]".   I am not sure what name or service is this warning message referring to.   Any help would be great.  Thanks.   

P.S I am on Ubuntu 18.04 and firewall is disabled.  Internet connection to outside is fine.   

 

axiomtek@axiomtek:~/microserver$ ./wsems
axiomtek@axiomtek:~/microserver$ sudo ./wsems
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getString: Key = audit_target, Parent = logger
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getValueByType: Key audit_target not found
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getString: Key = publish_directory, Parent = logger
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getValueByType: Key publish_directory not found
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getUnsignedInteger: Key = max_file_storage, Parent = logger
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getValueByType: Key max_file_storage not found
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getString: Key = publish_level, Parent = logger
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getValueByType: Key publish_level not found
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getBoolean: Key = auto_flush, Parent = logger
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getValueByType: Key auto_flush not found
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getUnsignedInteger: Key = buffer_size, Parent = logger
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getValueByType: Key buffer_size not found
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getUnsignedInteger: Key = flush_chunk_size, Parent = logger
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getValueByType: Key flush_chunk_size not found
[FORCE] 2021-04-14 19:33:54,375 ./wsems: Initializing EMS ....
[FORCE] 2021-04-14 19:33:54,375 main: Using config file /home/axiomtek/microserver/etc/config.json
[INFO ] 2021-04-14 19:33:54,375 ./wsems: Creating the WsEms proxy.
[TRACE] 2021-04-14 19:33:54,375 DutyCycle::DutyCycle: Constructor called
[DEBUG] 2021-04-14 19:33:54,375 DutyCycle::calculateDutyCycleTimePeriods: m_ConnectPeriod: 60000
[DEBUG] 2021-04-14 19:33:54,375 DutyCycle::calculateDutyCycleTimePeriods: m_DisconnectPeriod: 0
[TRACE] 2021-04-14 19:33:54,375 wsEmsProxy::wsEmsProxy: Constructor called
[INFO ] 2021-04-14 19:33:54,375 ./wsems: Starting HTTP Server.
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getInteger: Key = port, Parent = http_server
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getString: Key = host, Parent = http_server
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getInteger: Key = ports_to_try, Parent = http_server
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getValueByType: Key ports_to_try not found
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getInteger: Key = max_clients, Parent = http_server
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getValueByType: Key max_clients not found
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getBoolean: Key = enable_csrf_tokens, Parent = http_server
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getValueByType: Key enable_csrf_tokens not found
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getInteger: Key = csrf_token_rotation_period, Parent = http_server
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getValueByType: Key csrf_token_rotation_period not found
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getBoolean: Key = ssl, Parent = http_server
[WARN ] 2021-04-14 19:33:54,375 Main: Encryption is disabled on HTTP Server.
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getBoolean: Key = disable_hostname_validation, Parent = certificates
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getValueByType: Key disable_hostname_validation not found
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getString: Key = cipher_suite, Parent = certificates
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getValueByType: Key cipher_suite not found
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getString: Key = certificate, Parent = http_server
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getValueByType: Key certificate not found
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getString: Key = private_key, Parent = http_server
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getValueByType: Key private_key not found
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getEncryptedString: Key = passphrase, Parent = http_server
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getValueByType: Key passphrase not found
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getString: Key = enable_csrf_tokens, Parent = http_server
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getValueByType: Key enable_csrf_tokens not found
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getBoolean: Key = validate, Parent = certificates
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getBoolean: Key = authenticate, Parent = http_server
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getEncryptedString: Key = password, Parent = http_server
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getValueByType: Key password not found
[WARN ] 2021-04-14 19:33:54,375 Main: Authentication is disabled on the HTTP Server.
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getInteger: Key = content_read_timeout, Parent = http_server
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getValueByType: Key content_read_timeout not found
[INFO ] 2021-04-14 19:33:54,375 ./wsems: Initializing the ThingWorx REST interface.
[TRACE] 2021-04-14 19:33:54,375 wsEmsProxy::initialize: Method entered
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getString: Key = level, Parent = logger
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getBoolean: Key = verbose, Parent = ws_connection
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getBoolean: Key = enabled, Parent = fips
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getValueByType: Parent fips not found
[INFO ] 2021-04-14 19:33:54,375 wsEmsProxy::initialize: FIPS is disabled.
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getString: Key = encryption, Parent = ws_connection
[INFO ] 2021-04-14 19:33:54,375 wsEmsProxy::initialize: Encryption is disabled on Web Socket connection.
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getString: Key = resource, Parent =
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getValueByType: Key resource not found
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getInteger: Key = port, Parent = proxy
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getValueByType: Parent proxy not found
[FORCE] 2021-04-14 19:33:54,375 httpServer:
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getString: Key = host, Parent = proxy
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getValueByType: Parent proxy not found
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getString: Key = user, Parent = proxy
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getValueByType: Parent proxy not found
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getEncryptedString: Key = password, Parent = proxy
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getValueByType: Parent proxy not found
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getUnsignedInteger: Key = socket_read_timeout, Parent = ws_connection
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getValueByType: Key socket_read_timeout not found
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getUnsignedInteger: Key = frame_read_timeout, Parent = ws_connection
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getValueByType: Key frame_read_timeout not found
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getUnsignedInteger: Key = ssl_read_timeout, Parent = ws_connection
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getValueByType: Key ssl_read_timeout not found
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getUnsignedInteger: Key = msg_timeout, Parent = ws_connection
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getValueByType: Key msg_timeout not found
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getUnsignedInteger: Key = ping_rate, Parent = ws_connection
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getValueByType: Key ping_rate not found
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getUnsignedInteger: Key = pingpong_timeout, Parent = ws_connection
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getValueByType: Key pingpong_timeout not found
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getUnsignedInteger: Key = max_threads, Parent = ws_connection
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getValueByType: Key max_threads not found
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getUnsignedInteger: Key = max_msg_size, Parent = ws_connection
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getValueByType: Key max_msg_size not found
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getUnsignedInteger: Key = max_messages, Parent = ws_connection
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getValueByType: Key max_messages not found
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getBoolean: Key = verbose, Parent = ws_connection
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getBoolean: Key = connect_on_demand, Parent = ws_connection
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getValueByType: Key connect_on_demand not found
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getUnsignedInteger: Key = max_connect_delay, Parent = ws_connection
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getValueByType: Key max_connect_delay not found
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getUnsignedInteger: Key = message_idle_time, Parent = ws_connection
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getValueByType: Key message_idle_time not found
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getUnsignedInteger: Key = connect_timeout, Parent = ws_connection
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getValueByType: Key connect_timeout not found
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getUnsignedInteger: Key = connect_retry_interval, Parent = ws_connection
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getValueByType: Key connect_retry_interval not found
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getInteger: Key = connect_retries, Parent = ws_connection
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getValueByType: Key connect_retries not found
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getUnsignedInteger: Key = connect_period, Parent = duty_cycle
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getValueByType: Parent duty_cycle not found
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getUnsignedInteger: Key = duty_cycle, Parent = duty_cycle
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getValueByType: Parent duty_cycle not found
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getUnsignedInteger: Key = delay_duty_cycle, Parent = duty_cycle
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getValueByType: Parent duty_cycle not found
[DEBUG] 2021-04-14 19:33:54,375 wsEmsProxy::initialize: EMS Duty Cycle configuration from config.json:
[DEBUG] 2021-04-14 19:33:54,375 wsEmsProxy::initialize: m_DutyCycle.setDutyCyclePeriod: 60000
[DEBUG] 2021-04-14 19:33:54,375 wsEmsProxy::initialize: m_DutyCycle.setDutyCyclePercent: 100
[DEBUG] 2021-04-14 19:33:54,375 wsEmsProxy::initialize: m_DutyCycle.setConnectTimeout: 10000
[DEBUG] 2021-04-14 19:33:54,375 wsEmsProxy::initialize: m_DutyCycle.setConnectRetries: -1
[DEBUG] 2021-04-14 19:33:54,375 wsEmsProxy::initialize: m_DutyCycle.setDelayDutyCycle: 60000
[DEBUG] 2021-04-14 19:33:54,375 jsonConfigurator::getJsonEntity: Key fingerprint_whitelist not found
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getBoolean: Key = enabled, Parent = offline_msg_store
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getValueByType: Parent offline_msg_store not found
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getString: Key = directory, Parent = offline_msg_store
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getValueByType: Parent offline_msg_store not found
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getUnsignedInteger: Key = max_size, Parent = offline_msg_store
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getValueByType: Parent offline_msg_store not found
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getUnsignedInteger: Key = message_chunk_size, Parent = ws_connection
[TRACE] 2021-04-14 19:33:54,375 jsonConfigurator::getValueByType: Key message_chunk_size not found
[WARN ] 2021-04-14 12:33:54,375 SDK: SDK Version: 2.2.11
[WARN ] 2021-04-14 12:33:54,375 SDK: TLS Library: OpenSSL
[WARN ] 2021-04-14 12:33:54,375 SDK: TLS Library Version: 1.1.1c
[DEBUG] 2021-04-14 12:33:54,375 SDK: twWs_Create: Initializing Websocket Client for https://pp-2104141617f2.devportal.ptc.io:8080/Thingworx/WS
[DEBUG] 2021-04-14 12:33:54,375 SDK: twTlsClient_Create: Initializing TLS Client
[DEBUG] 2021-04-14 19:33:54,375 httpServer: http server bound to port=8000.
[WARN ] 2021-04-14 12:33:54,376 SDK: twSocket_Create: getaddrinfo() failed: [Name or service not known]
[DEBUG] 2021-04-14 12:33:54,376 SDK: twSocket_Close: socket is already closed or was never opened
[ERROR] 2021-04-14 12:33:54,376 SDK: twWs_Create: Error creating BSD socket to be used for the websocket
[ERROR] 2021-04-14 12:33:54,376 SDK: twApi_Initialize: Error creating websocket structure, retrying
[DEBUG] 2021-04-14 12:33:59,376 SDK: twWs_Create: Initializing Websocket Client for https://pp-2104141617f2.devportal.ptc.io:8080/Thingworx/WS
[DEBUG] 2021-04-14 12:33:59,376 SDK: twTlsClient_Create: Initializing TLS Client
[WARN ] 2021-04-14 12:33:59,378 SDK: twSocket_Create: getaddrinfo() failed: [Name or service not known]
[DEBUG] 2021-04-14 12:33:59,378 SDK: twSocket_Close: socket is already closed or was never opened
[ERROR] 2021-04-14 12:33:59,378 SDK: twWs_Create: Error creating BSD socket to be used for the websocket
[ERROR] 2021-04-14 12:33:59,378 SDK: twApi_Initialize: Error creating websocket structure, retrying
[DEBUG] 2021-04-14 12:34:04,378 SDK: twWs_Create: Initializing Websocket Client for https://pp-2104141617f2.devportal.ptc.io:8080/Thingworx/WS
[DEBUG] 2021-04-14 12:34:04,378 SDK: twTlsClient_Create: Initializing TLS Client
[WARN ] 2021-04-14 12:34:04,379 SDK: twSocket_Create: getaddrinfo() failed: [Name or service not known]
[DEBUG] 2021-04-14 12:34:04,379 SDK: twSocket_Close: socket is already closed or was never opened
[ERROR] 2021-04-14 12:34:04,379 SDK: twWs_Create: Error creating BSD socket to be used for the websocket
[ERROR] 2021-04-14 12:34:04,379 SDK: twApi_Initialize: Error creating websocket structure, retrying
^C
axiomtek@axiomtek:~/microserver$


My config.json

{
"ws_servers": [{
"host": "https://pp-2104141617f2.devportal.ptc.io",
"port": 8080
}],
"appkey": "DP:AQABAEKZzUS7bzJkOzz1n3nIejbi31QvE/WHOesDxa4ctgDxgpVucHEOtMJXdWFa7rROATCpU+T+lRKCFsPqiPFvAEiOlVoviSZWT649T9o",
"ws_connection": {
"encryption": "none",
"verbose": true
},
"auto_bind": [{
"name": "127.0.0.1",
"gateway": false,
"port": 8001
}],
"http_server": {
"host": "127.0.0.1",
"port": 8000,
"ssl": false,
"authenticate": false
},
"certificates": {
"validate": true,
"allow_self_signed": true
},
"data_security": {
"key_hash": "MdbtkSJ+iV4VzJh2/1gK/VSbllV85BCqEZdN/9emaZQ"

2 REPLIES 2
tdixit
13-Aquamarine
(To:KC_9903026)

Hi @KC_9903026 

 

I can see you are using port 8080 with in ws_servers. Try changing the port from 8080 to 8443

 

{
"ws_servers": [{
"host": "https://pp-2104141617f2.devportal.ptc.io",
"port": 8080
}],

 

Regards,

Toolika Dixit

slangley
23-Emerald II
(To:KC_9903026)

Hi @KC_9903026.

 

If you have found a solution for your issue, please feel free to share with the community.

 

Regards.

 

--Sharon

Top Tags