question

Upvotes
Accepted
1 0 2 2

Cons113 Error: 1004 rsslGetHostByName() failed

when i try to run Cons113 with private -username -password -clientId , it shows that

loggerMsg

TimeStamp: 13:44:37.182

ClientName: ChannelCallbackClient

Severity: Warning

Text: Received ChannelDownReconnecting event on channel Channel_4

Instance Name Consumer_4_1

RsslReactor 0x0x1804260

RsslChannel 0x0x1804260

Error Id -1

Internal sysError 0

Error Location

Error Text </XXX/Real-Time-SDK/Cpp-C/Eta/Impl/Transport/ripcutils.c:1445> Error: 1004 rsslGetHostByName() failed. Host name is incorrect. System errno: (0)

loggerMsgEnd


how to solve this problem ?

error-login
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
Accepted
47.2k 110 44 60

@jxu2

According to the error, it looks like the OpenSSL is unable to locate the certificate file, such as cert.pem.

On my Linux machine, the certificate file is at /etc/pki/tls.

sh-4.2# ls -al /etc/pki/tls
total 36
drwxr-xr-x 5 root root  4096 May 12 02:06 .
drwxr-xr-x 1 root root  4096 May 12 02:06 ..
lrwxrwxrwx 1 root root    49 May 12 02:06 cert.pem -> /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem
drwxr-xr-x 2 root root  4096 May 12 02:06 certs
drwxr-xr-x 2 root root  4096 Mar 28 10:36 misc
-rw-r--r-- 1 root root 10923 Mar 28 10:31 openssl.cnf
drwxr-xr-x 2 root root  4096 Mar 28 10:36 private

Then, I specified this file in the EmaConfig.xml under the Channel_4 element.

<OpenSSLCAStore value="/etc/pki/tls/cert.pem"/>

1655356743132.png

If I don't specify it, I get the following error.

1655357069620.png

However, after specifying the OpenSSLCAStore, the application works properly.

loggerMsg
    TimeStamp: 05:25:25.854
    ClientName: ChannelCallbackClient
    Severity: Success
    Text:    Received ChannelUp event on channel Channel_4
        Instance Name Consumer_4_1
        Connected component version: ads3.4.2.L1.linux.tis.rrg 64-bit
loggerMsgEnd

I hope this will help you


1655356743132.png (40.3 KiB)
1655357069620.png (36.7 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
47.2k 110 44 60

@jxu2

The error indicates that it was unable to resolve the configured server name.

Cons113 is used to connect to Refinitiv Real-Time Optimized so you need to verify the EmaConfig.xml configuration file in the working directory of the Cons113.

       <Channel>
            <Name value="Channel_4"/>
            <ChannelType value="ChannelType::RSSL_ENCRYPTED"/>
            <CompressionType value="CompressionType::None"/>
            <GuaranteedOutputBuffers value="5000"/>            
            <Location value="eu-west"/>
            <EnableSessionManagement value="1"/>
            <EncryptedProtocolType value="EncryptedProtocolType::RSSL_SOCKET"/>
           <ObjectName value=""/>
        </Channel>

You may specify the Location instead of the Host and Port configurations.

1655190123132.png

To verify the problem, you need to enable the verbose logging in EMA by using the following configurations.

        <Consumer>
            <Name value="Consumer_4"/>
            <Channel value="Channel_4"/>          
            <Logger value="Logger_1"/>
            <Dictionary value="Dictionary_2"/>
          </Consumer>
...
...
        <Logger>
            <Name value="Logger_1"/>
            <LoggerType value="LoggerType::File"/>
            <LoggerSeverity value="LoggerSeverity::Verbose"/>
        </Logger>

The EMA log file (emaLog_xxx.log) will be created in the working directory.

To verify the problem, please share the EMA log file (emaLog_xxx.log) and the EMA configuration file (EMAConfig.xml).


1655190123132.png (49.0 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
1 0 2 2

when i upload the emaconfig.xml and emaLog_xxx.log, it remainds me something went wrong!

--- EmaConfig.xml ---

<Channel>

<Name value="Channel_4"/>

<ChannelType value="ChannelType::RSSL_ENCRYPTED"/>

<CompressionType value="CompressionType::None"/>

<GuaranteedOutputBuffers value="5000"/>

<!--<Host value="com.amazonaws.vpce.us-east-1.vpcesvc-04b75a16bc641742c"/>

<Port value="14002"/>-->

<!-- EMA discovers a host and a port from RDP service discovery for the specified location

when both of them are not set and the session management is enable. -->

<!--<Location value="us-east-1"/>-->

<Location value="eu-west"/>

<EnableSessionManagement value="1"/>

<EncryptedProtocolType value="EncryptedProtocolType::RSSL_SOCKET"/>

<!-- ObjectName is optional: defaulted to "" -->

<ObjectName value=""/>

</Channel>

--- EmaLog_xxx.log --

loggerMsg

TimeStamp: 11:29:03.756

ClientName: ChannelCallbackClient

Severity: Warning

Text: Received ChannelDownReconnecting event on channel Channel_4

Instance Name Consumer_4_1

RsslReactor 0x0x2c2a620

RsslChannel 0x0x2c2a620

Error Id -1

Internal sysError 0

Error Location /home/XXX/Real-Time-SDK/Cpp-C/Eta/Impl/Reactor/rsslReactorWorker.c:1480

Error Text </home/XXX//Real-Time-SDK/Cpp-C/Eta/Impl/Transport/ripcsslutils.c:1188> Error: 2002 Certificate validation error. OpenSSL Return code: self signed certificate in certificate chain

loggerMsgEnd


icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
1 0 2 2

openssl version in my machine:

openssl-1.0.2k-1.fc24.x86_64

openssl-libs-1.0.2k-1.fc24.x86_64

openssl-devel-1.0.2k-1.fc24.x86_64

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.