Skip to main content
1-Visitor
April 14, 2021
Question

twSocket_Create: getaddrinfo() failed: [Name or service not known]

  • April 14, 2021
  • 1 reply
  • 831 views

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
[FORCE] 2021-04-14 17:24:11,967 ./wsems: Initializing EMS ....
[FORCE] 2021-04-14 17:24:11,967 main: Using config file /home/axiomtek/microserver/etc/config.json
[WARN ] 2021-04-14 17:24:11,967 Main: Encryption is disabled on HTTP Server.
[WARN ] 2021-04-14 17:24:11,968 Main: Authentication is disabled on the HTTP Server.
[FORCE] 2021-04-14 17:24:11,968 httpServer: starting http server port=8000
[WARN ] 2021-04-14 10:24:11,968 SDK: SDK Version: 2.2.11
[WARN ] 2021-04-14 10:24:11,968 SDK: TLS Library: OpenSSL
[WARN ] 2021-04-14 10:24:11,968 SDK: TLS Library Version: 1.1.1c
[WARN ] 2021-04-14 10:24:11,969 SDK: twSocket_Create: getaddrinfo() failed: [Name or service not known]
[ERROR] 2021-04-14 10:24:11,969 SDK: twWs_Create: Error creating BSD socket to be used for the websocket
[ERROR] 2021-04-14 10:24:11,969 SDK: twApi_Initialize: Error creating websocket structure, retrying

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"

1 reply

5-Regular Member
April 16, 2021

have you tried changing the port from 8080 to 8443 in ws_servers