Hi,
I do have an almost 1 year old C++ application that is connecting to Refinitiv servers using a batch list and is working perfectly fine using EZD. Clients also use it in TREP infrastructure and all is fine.
Now, I want to update it to the latest rebranded API EMA RTSDK-2.0.1.L2 and connect to the AWS servers.Theoretically, after updating the code to link to the latest API, and changing the server/port in EmaConfig.xml, all should continue to work, but the reality is that is not working and I do not know what I do wrong.
I am on 1 month Real Time Optimized trial at the moment, I have the correct API token, and Machine password, and client id but, connection to the server is not happening.
The way I register now is (notice that serviceName is commented-out in the sample, but I have tried with and without it and when I did use it I used ELEKTRON_DIRECT or DIRECT_FEED, it does not make any difference)
OmmConsumer consumer(OmmConsumerConfig().consumerName(consumerName.c_str())
.clientId("<this is the api token>")
.username("<this is the machine id>")
.password("<this is the 30+ chars password>"));
consumer.registerClient(ReqMsg()/*.serviceName(serviceName.c_str())*/
.payload(ElementList().addArray(refinitiv::ema::rdm::ENAME_BATCH_ITEM_LIST, symbolArray).complete()), myClient);
The below errors I get:
Case 1:
EmaConfig.xml has for Channel_1:
<ChannelType value="ChannelType::RSSL_SOCKET"/>
<Host value="emea-3-t1.streaming-pricing-api.refinitiv.com"/>
<Port value="14002"/>
In the ema log in verbose mode is all OK(with no error) until I get:
Received ChannelDownReconnecting event on channel Channel_1
Instance Name Consumer_1_1
RsslReactor 0x0000000007B75E80
RsslChannel 0x0000000007B75E80
Error Id -1
Internal sysError 10057
Error Location C:\Jenkins\workspace\ESDKCore_RCDEV\OS\VS140-64\rcdev\source\rtsdk\Cpp-C\Eta\Impl\Reactor\rsslReactorWorker.c:1241
Error Text <C:\Jenkins\workspace\ESDKCore_RCDEV\OS\VS140-64\rcdev\source\rtsdk\Cpp-C\Eta\Impl\Transport\rsslSocketTransportImpl.c:6068> Error: 1002 ipcConnecting() client connect() failed. System errno: (10057)
Case 2:
EmaConfig.xml has for Channel_1:
<ChannelType value="ChannelType::RSSL_ENCRYPTED"/>
<Host value="emea-3-t1.streaming-pricing-api.refinitiv.com"/>
<Port value="443">
In the ema log in verbose mode is all OK(with no error) until I get:
ClientName: ChannelCallbackClient
Severity: Warning
Text: Received ChannelDownReconnecting event on channel Channel_1
Instance Name Consumer_1_1
RsslReactor 0x0000000007B7DD70
RsslChannel 0x0000000007B7DD70
Error Id -1
Internal sysError 0
Error Location C:\Jenkins\workspace\ESDKCore_RCDEV\OS\VS140-64\rcdev\source\rtsdk\Cpp-C\Eta\Impl\Reactor\rsslReactorWorker.c:1241
Error Text <C:\Jenkins\workspace\ESDKCore_RCDEV\OS\VS140-64\rcdev\source\rtsdk\Cpp-C\Eta\Impl\Transport\ripcinetutils.c:1749> ripcWinInetInitConnection invalid HTTP ack
Case 3:
EmaConfig.xml has for Channel_1:
<ChannelType value="ChannelType::RSSL_HTTP"/>
<Host value="emea-3-t1.streaming-pricing-api.refinitiv.com"/>
<Port value="443"/>
In the ema log in verbose mode is all OK(with no error) until I get:
ClientName: ChannelCallbackClient
Severity: Warning
Text: Received ChannelDownReconnecting event on channel Channel_1
Instance Name Consumer_1_1
RsslReactor 0x0000000007B427D0
RsslChannel 0x0000000007B427D0
Error Id -1
Internal sysError 0
Error Location C:\Jenkins\workspace\ESDKCore_RCDEV\OS\VS140-64\rcdev\source\rtsdk\Cpp-C\Eta\Impl\Reactor\rsslReactorWorker.c:1324
Error Text Initialization timed out.
Case 4:
EmaConfig.xml has for Channel_1:
<ChannelType value="ChannelType::RSSL_HTTP"/>
<Host value="emea-3-t1.streaming-pricing-api.refinitiv.com"/>
<Port value="14002"/>
In the ema log in verbose mode is all OK(with no error) until I get:
ClientName: ChannelCallbackClient
Severity: Warning
Text: Received ChannelDownReconnecting event on channel Channel_1
Instance Name Consumer_1_1
RsslReactor 0x0000000007B44080
RsslChannel 0x0000000007B44080
Error Id -1
Internal sysError 0
Error Location C:\Jenkins\workspace\ESDKCore_RCDEV\OS\VS140-64\rcdev\source\rtsdk\Cpp-C\Eta\Impl\Reactor\rsslReactorWorker.c:1241
Error Text <C:\Jenkins\workspace\ESDKCore_RCDEV\OS\VS140-64\rcdev\source\rtsdk\Cpp-C\Eta\Impl\Transport\ripcinetutils.c:410> winInetCallback error - HTTPSendRequest unable to complete successfully
Case 5:
EmaConfig.xml has for Channel_1:
<ChannelType value="ChannelType::RSSL_ENCRYPTED"/>
<EncryptedProtocolType value="EncryptedProtocolType::RSSL_SOCKET"/>
<Host value="emea-3-t1.streaming-pricing-api.refinitiv.com"/>
<Port value="14002"/>
In the ema log in verbose mode is all OK(with no error) until I get:
ClientName: ChannelCallbackClient
Severity: Warning
Text: Received ChannelDownReconnecting event on channel Channel_1
Instance Name Consumer_1_1
RsslReactor 0x0000000007AE6160
RsslChannel 0x0000000007AE6160
Error Id -1
Internal sysError 10057
Error Location C:\Jenkins\workspace\ESDKCore_RCDEV\OS\VS140-64\rcdev\source\rtsdk\Cpp-C\Eta\Impl\Reactor\rsslReactorWorker.c:1241
Error Text <C:\Jenkins\workspace\ESDKCore_RCDEV\OS\VS140-64\rcdev\source\rtsdk\Cpp-C\Eta\Impl\Transport\ripcsslutils.c:1746> Error: 1002 ripcSSLInit client connect() failed. System errno: 10057
I did wrote a line of code to read through the self-discovery service the AWS servers so I know that the host is correct because If I use in EmaConfig.xml
<EncryptedProtocolType value="EncryptedProtocolType::RSSL_SOCKET"/> I do discover the host:ports
"apac-3-t1.streaming-pricing-api.refinitiv.com":14002
"emea-3-t1.streaming-pricing-api.refinitiv.com":14002
"amer-3-t1.streaming-pricing-api.refinitiv.com" :14002
and If I change to <EncryptedProtocolType value="EncryptedProtocolType::RSSL_WEBSOCKET"/>
I do discover the same hosts on 443 port
"apac-3-t1.streaming-pricing-api.refinitiv.com":443
"emea-3-t1.streaming-pricing-api.refinitiv.com":443
"amer-3-t1.streaming-pricing-api.refinitiv.com" :443
Based on my understanding, I should use in the channel definition
<ChannelType value="ChannelType::RSSL_ENCRYPTED"/> with
<EncryptedProtocolType value="EncryptedProtocolType::RSSL_SOCKET"/>
and
<Host value="emea-3-t1.streaming-pricing-api.refinitiv.com"/>
<Port value="14002"/>
as 14002 is used/needed when <EncryptedProtocolType value="EncryptedProtocolType::RSSL_SOCKET"/>
as <EncryptedProtocolType value="EncryptedProtocolType::RSSL_WEBSOCKET"/> is needed when port 443 is used and also when request message format needed is tr_json2.
So based on the documentation I think a Channel_4 similar setup should work (based on the EmaConfig.xml sample), but it does not work for me at the moment for some reason.
Can anyone has any pointers please what i do wrong as this task should be a matter of changing the code to the latest API, updating the host/port to the new AWS host and it should work.
I am out of ideas what is going wrong, and now I am at the point to debug deeper into EMA code to understand what is happening.
Debugging the EMA/ETA code, the code execution is all seems is correct until the point is calling
retval = (*(rsslSocketChannel->transportFuncs->connected))(rsslSocketChannel->stream,
rsslSocketChannel->transportInfo);
in rsslSokectTransportImpl.c in
ipcConnecting(RsslSocketChannel *rsslSocketChannel, ripcSessInProg *inPr, RsslError *error)
{
RsslInt32 retval;
ripcRWFlags rwflags = RIPC_RW_WAITALL;
_DEBUG_TRACE_CONN("called\n")
rwflags |= (rsslSocketChannel->blocking ? RIPC_RW_BLOCKING : 0);
if (rsslSocketChannel->blocking == 0)
{
/* Check to see if the connect() call has completed. */
retval = (*(rsslSocketChannel->transportFuncs->connected))(rsslSocketChannel->stream,
rsslSocketChannel->transportInfo);
which returns -1 and logging the error:
----
Just to add, there are some utility scripts on github at https://github.com/Refinitiv/websocket-api from where I do execute
market_price_authentication.py --hostname emea-3-t1.streaming-pricing-api.refinitiv.com --port 443 --user <machine_id> --password <password> --app_id <token>
and the outcome I get from this script is:
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='127.0.0.1', port=8443): Max retries exceeded with url: /getToken (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x0000017EEC0F6250>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it'))
I tried with port 443(which i think is the correct port in this websocket utility script case) and 14002(just to test) and the outcome is the same
Thank you