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

Error in running WSEMS - twApi_Initialize: Invalid parameter found

SOLVED
Highlighted
Level 7

Error in running WSEMS - twApi_Initialize: Invalid parameter found

Hi,

 

I'm trying to run the WSEMS (Microserver-Linux-arm-openssl-5-4-4-434). on my raspberry pi. I have done all the steps from the developers guide.

 

When i run the wsems i get the following logs:

 

pi@raspberrypi:~/EMS/microserver $ sudo ./wsems
[TRACE] 2018-10-26 12:28:06,32 jsonConfigurator::getString: Key = audit_target, Parent = logger
[TRACE] 2018-10-26 12:28:06,32 jsonConfigurator::getValueByType: Key audit_target not found
[TRACE] 2018-10-26 12:28:06,32 jsonConfigurator::getString: Key = publish_directory, Parent = logger
[TRACE] 2018-10-26 12:28:06,34 jsonConfigurator::getUnsignedInteger: Key = max_file_storage, Parent = logger
[TRACE] 2018-10-26 12:28:06,34 jsonConfigurator::getString: Key = publish_level, Parent = logger
[TRACE] 2018-10-26 12:28:06,34 jsonConfigurator::getBoolean: Key = auto_flush, Parent = logger
[TRACE] 2018-10-26 12:28:06,34 jsonConfigurator::getUnsignedInteger: Key = buffer_size, Parent = logger
[TRACE] 2018-10-26 12:28:06,34 jsonConfigurator::getUnsignedInteger: Key = flush_chunk_size, Parent = logger
[FORCE] 2018-10-26 12:28:06,34 ./wsems: Initializing EMS ....
[FORCE] 2018-10-26 12:28:06,34 main: Using config file /home/pi/EMS/microserver/etc/config.json
[INFO ] 2018-10-26 12:28:06,34 ./wsems: Creating the WsEms proxy.
[TRACE] 2018-10-26 12:28:06,34 DutyCycle::DutyCycle: Constructor called
[DEBUG] 2018-10-26 12:28:06,34 DutyCycle::calculateDutyCycleTimePeriods: m_ConnectPeriod: 60000
[DEBUG] 2018-10-26 12:28:06,34 DutyCycle::calculateDutyCycleTimePeriods: m_DisconnectPeriod: 0
[TRACE] 2018-10-26 12:28:06,34 wsEmsProxy::wsEmsProxy: Constructor called
[INFO ] 2018-10-26 12:28:06,34 ./wsems: Starting HTTP Server.
[TRACE] 2018-10-26 12:28:06,34 jsonConfigurator::getInteger: Key = port, Parent = http_server
[TRACE] 2018-10-26 12:28:06,34 jsonConfigurator::getValueByType: Key port not found
[TRACE] 2018-10-26 12:28:06,34 jsonConfigurator::getString: Key = host, Parent = http_server
[TRACE] 2018-10-26 12:28:06,34 jsonConfigurator::getValueByType: Key host not found
[TRACE] 2018-10-26 12:28:06,34 jsonConfigurator::getInteger: Key = ports_to_try, Parent = http_server
[TRACE] 2018-10-26 12:28:06,34 jsonConfigurator::getValueByType: Key ports_to_try not found
[TRACE] 2018-10-26 12:28:06,34 jsonConfigurator::getInteger: Key = max_clients, Parent = http_server
[TRACE] 2018-10-26 12:28:06,34 jsonConfigurator::getValueByType: Key max_clients not found
[TRACE] 2018-10-26 12:28:06,34 jsonConfigurator::getBoolean: Key = enable_csrf_tokens, Parent = http_server
[TRACE] 2018-10-26 12:28:06,34 jsonConfigurator::getValueByType: Key enable_csrf_tokens not found
[TRACE] 2018-10-26 12:28:06,35 jsonConfigurator::getInteger: Key = csrf_token_rotation_period, Parent = http_server
[TRACE] 2018-10-26 12:28:06,35 jsonConfigurator::getValueByType: Key csrf_token_rotation_period not found
[TRACE] 2018-10-26 12:28:06,35 jsonConfigurator::getBoolean: Key = use_default_certificate, Parent = http_server
[INFO ] 2018-10-26 12:28:06,35 Main: Using built-in certificate for HTTP Server
[TRACE] 2018-10-26 12:28:06,35 jsonConfigurator::getBoolean: Key = ssl, Parent = http_server
[WARN ] 2018-10-26 12:28:06,35 Main: Encryption is disabled on HTTP Server.
[TRACE] 2018-10-26 12:28:06,35 jsonConfigurator::getString: Key = certificate, Parent = http_server
[TRACE] 2018-10-26 12:28:06,35 jsonConfigurator::getValueByType: Key certificate not found
[TRACE] 2018-10-26 12:28:06,35 jsonConfigurator::getString: Key = private_key, Parent = http_server
[TRACE] 2018-10-26 12:28:06,35 jsonConfigurator::getValueByType: Key private_key not found
[TRACE] 2018-10-26 12:28:06,35 jsonConfigurator::getString: Key = enable_csrf_tokens, Parent = http_server
[TRACE] 2018-10-26 12:28:06,35 jsonConfigurator::getValueByType: Key enable_csrf_tokens not found
[TRACE] 2018-10-26 12:28:06,35 jsonConfigurator::getBoolean: Key = validate, Parent = certificates
[TRACE] 2018-10-26 12:28:06,35 jsonConfigurator::getBoolean: Key = authenticate, Parent = http_server
[WARN ] 2018-10-26 12:28:06,35 Main: Authentication is disabled on the HTTP Server.
[TRACE] 2018-10-26 12:28:06,35 jsonConfigurator::getInteger: Key = content_read_timeout, Parent = http_server
[TRACE] 2018-10-26 12:28:06,35 jsonConfigurator::getValueByType: Key content_read_timeout not found
[INFO ] 2018-10-26 12:28:06,35 ./wsems: Initializing the ThingWorx REST interface.
[TRACE] 2018-10-26 12:28:06,35 wsEmsProxy::initialize: Method entered
[FORCE] 2018-10-26 12:28:06,35 httpServer: 
[TRACE] 2018-10-26 12:28:06,35 jsonConfigurator::getString: Key = level, Parent = logger
[TRACE] 2018-10-26 12:28:06,36 jsonConfigurator::getBoolean: Key = verbose, Parent = ws_connection
[TRACE] 2018-10-26 12:28:06,36 jsonConfigurator::getBoolean: Key = enabled, Parent = fips
[INFO ] 2018-10-26 12:28:06,36 wsEmsProxy::initialize: FIPS is disabled.
[TRACE] 2018-10-26 12:28:06,36 jsonConfigurator::getString: Key = encryption, Parent = ws_connection
[INFO ] 2018-10-26 12:28:06,36 wsEmsProxy::initialize: Encryption is disabled on Web Socket connection.
[TRACE] 2018-10-26 12:28:06,36 jsonConfigurator::getString: Key = appkey, Parent = 
[TRACE] 2018-10-26 12:28:06,36 jsonConfigurator::getString: Key = resource, Parent = 
[TRACE] 2018-10-26 12:28:06,36 jsonConfigurator::getValueByType: Key resource not found
[TRACE] 2018-10-26 12:28:06,36 jsonConfigurator::getInteger: Key = port, Parent = proxy
[TRACE] 2018-10-26 12:28:06,36 jsonConfigurator::getValueByType: Parent proxy not found
[TRACE] 2018-10-26 12:28:06,37 jsonConfigurator::getString: Key = host, Parent = proxy
[TRACE] 2018-10-26 12:28:06,37 jsonConfigurator::getValueByType: Parent proxy not found
[TRACE] 2018-10-26 12:28:06,37 jsonConfigurator::getString: Key = user, Parent = proxy
[TRACE] 2018-10-26 12:28:06,37 jsonConfigurator::getValueByType: Parent proxy not found
[TRACE] 2018-10-26 12:28:06,37 jsonConfigurator::getString: Key = password, Parent = proxy
[TRACE] 2018-10-26 12:28:06,37 jsonConfigurator::getValueByType: Parent proxy not found
[TRACE] 2018-10-26 12:28:06,37 jsonConfigurator::getUnsignedInteger: Key = socket_read_timeout, Parent = ws_connection
[TRACE] 2018-10-26 12:28:06,37 jsonConfigurator::getValueByType: Key socket_read_timeout not found
[TRACE] 2018-10-26 12:28:06,37 jsonConfigurator::getUnsignedInteger: Key = frame_read_timeout, Parent = ws_connection
[TRACE] 2018-10-26 12:28:06,37 jsonConfigurator::getValueByType: Key frame_read_timeout not found
[TRACE] 2018-10-26 12:28:06,37 jsonConfigurator::getUnsignedInteger: Key = ssl_read_timeout, Parent = ws_connection
[TRACE] 2018-10-26 12:28:06,37 jsonConfigurator::getValueByType: Key ssl_read_timeout not found
[TRACE] 2018-10-26 12:28:06,37 jsonConfigurator::getUnsignedInteger: Key = msg_timeout, Parent = ws_connection
[TRACE] 2018-10-26 12:28:06,37 jsonConfigurator::getValueByType: Key msg_timeout not found
[TRACE] 2018-10-26 12:28:06,37 jsonConfigurator::getUnsignedInteger: Key = ping_rate, Parent = ws_connection
[TRACE] 2018-10-26 12:28:06,37 jsonConfigurator::getValueByType: Key ping_rate not found
[TRACE] 2018-10-26 12:28:06,37 jsonConfigurator::getUnsignedInteger: Key = pingpong_timeout, Parent = ws_connection
[TRACE] 2018-10-26 12:28:06,37 jsonConfigurator::getValueByType: Key pingpong_timeout not found
[TRACE] 2018-10-26 12:28:06,37 jsonConfigurator::getUnsignedInteger: Key = max_threads, Parent = ws_connection
[TRACE] 2018-10-26 12:28:06,37 jsonConfigurator::getValueByType: Key max_threads not found
[TRACE] 2018-10-26 12:28:06,37 jsonConfigurator::getUnsignedInteger: Key = max_msg_size, Parent = ws_connection
[TRACE] 2018-10-26 12:28:06,37 jsonConfigurator::getValueByType: Key max_msg_size not found
[TRACE] 2018-10-26 12:28:06,37 jsonConfigurator::getUnsignedInteger: Key = max_messages, Parent = ws_connection
[TRACE] 2018-10-26 12:28:06,37 jsonConfigurator::getValueByType: Key max_messages not found
[TRACE] 2018-10-26 12:28:06,37 jsonConfigurator::getBoolean: Key = verbose, Parent = ws_connection
[TRACE] 2018-10-26 12:28:06,37 jsonConfigurator::getBoolean: Key = connect_on_demand, Parent = ws_connection
[TRACE] 2018-10-26 12:28:06,37 jsonConfigurator::getValueByType: Key connect_on_demand not found
[TRACE] 2018-10-26 12:28:06,37 jsonConfigurator::getUnsignedInteger: Key = max_connect_delay, Parent = ws_connection
[TRACE] 2018-10-26 12:28:06,37 jsonConfigurator::getValueByType: Key max_connect_delay not found
[TRACE] 2018-10-26 12:28:06,38 jsonConfigurator::getUnsignedInteger: Key = message_idle_time, Parent = ws_connection
[TRACE] 2018-10-26 12:28:06,38 jsonConfigurator::getValueByType: Key message_idle_time not found
[TRACE] 2018-10-26 12:28:06,38 jsonConfigurator::getUnsignedInteger: Key = connect_timeout, Parent = ws_connection
[DEBUG] 2018-10-26 12:28:06,38 httpServer: http server bound to port=8000.
[TRACE] 2018-10-26 12:28:06,38 jsonConfigurator::getValueByType: Key connect_timeout not found
[TRACE] 2018-10-26 12:28:06,38 jsonConfigurator::getUnsignedInteger: Key = connect_retry_interval, Parent = ws_connection
[TRACE] 2018-10-26 12:28:06,38 jsonConfigurator::getValueByType: Key connect_retry_interval not found
[TRACE] 2018-10-26 12:28:06,38 jsonConfigurator::getInteger: Key = connect_retries, Parent = ws_connection
[TRACE] 2018-10-26 12:28:06,38 jsonConfigurator::getValueByType: Key connect_retries not found
[TRACE] 2018-10-26 12:28:06,38 jsonConfigurator::getUnsignedInteger: Key = connect_period, Parent = duty_cycle
[TRACE] 2018-10-26 12:28:06,38 jsonConfigurator::getValueByType: Parent duty_cycle not found
[TRACE] 2018-10-26 12:28:06,38 jsonConfigurator::getUnsignedInteger: Key = duty_cycle, Parent = duty_cycle
[TRACE] 2018-10-26 12:28:06,38 jsonConfigurator::getValueByType: Parent duty_cycle not found
[TRACE] 2018-10-26 12:28:06,38 jsonConfigurator::getUnsignedInteger: Key = delay_duty_cycle, Parent = duty_cycle
[TRACE] 2018-10-26 12:28:06,38 jsonConfigurator::getValueByType: Parent duty_cycle not found
[DEBUG] 2018-10-26 12:28:06,38 wsEmsProxy::initialize: 


[DEBUG] 2018-10-26 12:28:06,38 wsEmsProxy::initialize: EMS Duty Cycle configuration from config.json:
[DEBUG] 2018-10-26 12:28:06,38 wsEmsProxy::initialize: m_DutyCycle.setDutyCyclePeriod: 60000
[DEBUG] 2018-10-26 12:28:06,38 wsEmsProxy::initialize: m_DutyCycle.setDutyCyclePercent: 100
[DEBUG] 2018-10-26 12:28:06,38 wsEmsProxy::initialize: m_DutyCycle.setConnectTimeout: 10000
[DEBUG] 2018-10-26 12:28:06,38 wsEmsProxy::initialize: m_DutyCycle.setConnectRetries: -1
[DEBUG] 2018-10-26 12:28:06,38 wsEmsProxy::initialize: m_DutyCycle.setDelayDutyCycle: 60000
[DEBUG] 2018-10-26 12:28:06,38 wsEmsProxy::initialize: 


[TRACE] 2018-10-26 12:28:06,38 jsonConfigurator::getBoolean: Key = enabled, Parent = offline_msg_store
[TRACE] 2018-10-26 12:28:06,38 jsonConfigurator::getValueByType: Parent offline_msg_store not found
[TRACE] 2018-10-26 12:28:06,38 jsonConfigurator::getString: Key = directory, Parent = offline_msg_store
[TRACE] 2018-10-26 12:28:06,38 jsonConfigurator::getValueByType: Parent offline_msg_store not found
[TRACE] 2018-10-26 12:28:06,38 jsonConfigurator::getUnsignedInteger: Key = max_size, Parent = offline_msg_store
[TRACE] 2018-10-26 12:28:06,38 jsonConfigurator::getValueByType: Parent offline_msg_store not found
[TRACE] 2018-10-26 12:28:06,38 jsonConfigurator::getUnsignedInteger: Key = message_chunk_size, Parent = ws_connection
[WARN ] 2018-10-26 17:58:06,39 SDK: SDK Version: 2.1.5
[WARN ] 2018-10-26 17:58:06,39 SDK: TLS Library: OpenSSL
[WARN ] 2018-10-26 17:58:06,39 SDK: TW_SSL_VERSION: Error tls runtime version: OpenSSL 1.0.2l  25 May 2017, does not match compiled version: OpenSSL 1.0.2l-fips  25 May 2017
[WARN ] 2018-10-26 17:58:06,39 SDK: TLS Library Version: 1.0.2l
[WARN ] 2018-10-26 17:58:06,39 SDK: FIPS Capable
[ERROR] 2018-10-26 17:58:06,39 SDK: twApi_Initialize: Invalid parameter found
[ERROR] 2018-10-26 12:28:06,39 WsProxy::initialize: Unable to initialize twApi singleton
[ERROR] 2018-10-26 12:28:06,39 Main: Could initialize the wsEmsProxy
[FORCE] 2018-10-26 12:28:06,39 Main: Exiting....
[DEBUG] 2018-10-26 12:28:11,43 jsonConfigurator::~jsonConfigurator: Deleting JSON object
[TRACE] 2018-10-26 12:28:11,44 wsEmsProxy::~wsEmsProxy: Destructor called
[TRACE] 2018-10-26 12:28:11,44 WsProxy::~WsProxy: Deleting Thing binding list
[TRACE] 2018-10-26 12:28:11,44 DutyCycle::~DutyCycle: Destructor called

 This is my config.json:

{
  "ws_servers": [
    {
      "host": "***********",
      "port": 80
    }
  ],
  "appKey": "AES:**************",
  "http_server": {
    "use_default_certificate": true,
    "ssl": false,
    "authenticate": false
  },
  "ws_connection": {
    "encryption": "none",
		"verbose":true,
		"message_chunk_size": 8192
  },
	"fips": {
		"enabled": false
	},
	"logger":	{
		"level":"TRACE",
		"publish_directory":"/home/pi/EMS/microserver/logs",
		"publish_level":"TRACE",
		"max_file_storage":2000000,
		"auto_flush":true,
		"flush_chunk_size": 16384,
		"buffer_size" : 4096
	},
  "auto_bind": [
    {
      "name": "Test_WSEMS",
      "host": "***********",
      "port": 8001,
      "timeout": 30000,
      "protocol": "http",
      "gateway": false
    }
  ],
  "certificates": {
    "validate": false
  }
}

It would be great if someone could help out with this.

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Error in running WSEMS - twApi_Initialize: Invalid parameter found

Hi @vvmonty,

 

I think your issue is you are using the ARM release of the EMS instead of the ARM-HF release.  Try using the ARM-HF release.

 

-- Alex

1 REPLY 1

Re: Error in running WSEMS - twApi_Initialize: Invalid parameter found

Hi @vvmonty,

 

I think your issue is you are using the ARM release of the EMS instead of the ARM-HF release.  Try using the ARM-HF release.

 

-- Alex