CentOS7 C++ Cons113 Unable to load CURL
I use C++ version of EMA on Windows and CentOS 6.7 work fine. I am trying to use it on CentOS 7 but it always display error
Exception Type='OmmInvalidUsageException', Text='Failed to add RsslChannel(s) to RsslReactor. Channel name(s) Channel_4
Instance Name Consumer_4_1
RsslReactor 0x0x2a34b70
RsslChannel 0
Error Id -1
Internal sysError 0
Error Location /home/centos/rtsdk/Real-Time-SDK/Cpp-C/Eta/Impl/Reactor/rsslReactor.c:1351
Error Text Failed to initialize RsslRestClient. Text: </home/centos/rtsdk/Real-Time-SDK/Cpp-C/Eta/Impl/Transport/rsslSocketTransportImpl.c:547> Error: 0012 Unable to load CURL.', ErrorCode='-1'
The curl is verion 7.29 on CentOS7. Please advise if any solution on it. Thanks.
Best Answer
-
I just set the LD_LIBRARY_PATH environment variable.
[root@1e537192d113 Optimized]# env
HOSTNAME=1e537192d113
TERM=xterm
OLDPWD=/opt/openssl/bin
LD_LIBRARY_PATH=/opt/refinitiv/Real-Time-SDK/Cpp-C/Ema/Executables/CENTOS7_64_GCC485/Optimized
LS_COLORS=
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
PWD=/opt/refinitiv/Real-Time-SDK/Cpp-C/Ema/Executables/CENTOS7_64_GCC485/Optimized
SHLVL=1
HOME=/root
LESSOPEN=||/usr/bin/lesspipe.sh %s
_=/usr/bin/envYou can test it with the OpenSSL command. Run the "openssl version -a" command.
[root@1e537192d113 bin]# ./openssl version -a
OpenSSL 1.1.1n 15 Mar 2022
built on: Mon Sep 12 07:45:50 2022 UTC
platform: linux-x86_64
options: bn(64,64) rc4(16x,int) des(int) idea(int) blowfish(ptr)
compiler: gcc -fPIC -pthread -m64 -Wa,--noexecstack -Wall -O3 -DOPENSSL_USE_NODELETE -DL_ENDIAN -DOPENSSL_PIC -DOPENSSL_CPUID_OBJ -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DKECCAK1600_ASM -DRC4_ASM -DMD5_ASM -DAESNI_ASM -DVPAES_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -DX25519_ASM -DPOLY1305_ASM -DNDEBUG
OPENSSLDIR: "/usr/local/ssl"
ENGINESDIR: "/opt/openssl/lib/engines-1.1"
Seeding source: os-specificThen, test the connection to the server. For example:
./openssl s_client -connect us-east-1-aws-1-med.optimized-pricing-api.refinitiv.net:443
0
Answers
-
The error message indicates that it is unable to find the curl library.
Error: 0012 Unable to load CURL
You can find the curl library in the RTSDK package. It is in the installdb/OL7_64_GCC482/Optimized/lib64 dictionary. You need to set the LD_LIBRARY_PATH environment variable to that location. For example:
export LD_LIBRARY_PATH=/opt/refinitiv/Real-Time-SDK/installdb/OL7_64_GCC482/Optimized/lib64
0 -
Hello @Alvin.Cho
You can find the step-by-step guide in the "Use the Libraries with Refinitiv Real-Time SDK C/C++" section of the How to Build OpenSSL, zlib, and cURL Libraries on Linux article.
Hope this helps.0 -
I can't find any folder named installdb. The most similar one is in in build directory/install/lib64. I pointed LD_LIBRARY_PATH here but still get the same error.
0 -
I think I follow all the procedures and did at least 3 times. Another user also tried it and got the same result. Is there anything I can check?0
-
What is the version of RTSDK that you are using?
Are you using the official RTSDK package at https://developers.refinitiv.com/en/api-catalog/refinitiv-real-time-opnsrc/rt-sdk-cc/downloads?
0 -
No, I git clone it yesterday0
-
I got the same error when running without the LD_LIBRARY_PATH.
Exception Type='OmmInvalidUsageException', Text='Failed to add RsslChannel(s) to RsslReactor. Channel name(s) Channel_4
Instance Name Consumer_4_1
RsslReactor 0x0x15ba120
RsslChannel 0
Error Id -1
Internal sysError 0
Error Location /opt/refinitiv/Real-Time-SDK/Cpp-C/Eta/Impl/Reactor/rsslReactor.c:1351
Error Text Failed to initialize RsslRestClient. Text: </opt/refinitiv/Real-Time-SDK/Cpp-C/Eta/Impl/Transport/rsslSocketTransportImpl.c:547> Error: 0012 Unable to load CURL.', ErrorCode='-1'After setting the LD_LIBRARY_PATH, I can run it properly.
export LD_LIBRARY_PATH=/opt/refinitiv/Real-Time-SDK/rtsdk/install/lib64
Please make sure that the version of libcurl is 7.78.0.
[root@1e537192d113 Optimized]# strings /opt/refinitiv/Real-Time-SDK/rtsdk/install/lib64/libcurl.so | grep libcurl
libcurl.so
...
libcurl/7.78.0
libcurl is now using a weak random seed!0 -
Yes I aware of that. But the latest version of CentOS7 supported is 7.29. Does it mean we can't use CentOS 7?
0 -
@Alvin.Cho
RTSDK supports CentOS 7. However, you need a new version of libcurl library.
If you run CMake to build the RTSDK package, it will build the libcurl library for you.
0 -
Otherwise, you can download the RTSDK package from https://developers.refinitiv.com/en/api-catalog/refinitiv-real-time-opnsrc/rt-sdk-cc/downloads. The package contains the libcurl library.
0 -
I downloaded the package ans point LD_LIBRARY_PATH under installdb/OL7_64_GCC482. It seems curl works fine but got an error message as following:
TimeStamp: 03:12:59.949
ClientName: ChannelCallbackClient
Severity: Warning
Text: Received ChannelDownReconnecting event on channel Channel_4
Instance Name Consumer_4_1
RsslReactor 0x0x16de550
RsslChannel 0x0x16de550
Error Id -1
Internal sysError 0
Error Location /local/jenkins/workspace/ESDKCore_RCDEV/OS/OL7-64/rcdev/source/rtsdk/Cpp-C/Eta/Impl/Reactor/rsslReactorWorker.c:1973
Error Text </local/jenkins/workspace/ESDKCore_RCDEV/OS/OL7-64/rcdev/source/rtsdk/Cpp-C/Eta/Impl/Transport/ripcsslutils.c:1188> Error: 2002 Certificate validation error. OpenSSL Return code: self signed certificate in certificate chain
loggerMsgEndI checked old forum post but no idea how to resolve it. Please help. Thanks.
0 -
0
-
openssl 1.1.1g
0 -
I followed the steps mentioned in the How to Build OpenSSL, zlib, and cURL Libraries on Linux article to build the OpenSSL library.
The library was built with the following options.
./config --prefix=/opt/openssl --openssldir=/usr/local/ssl
The /usr/local/ssl is the directory for OpenSSL configuration files, and also the default certificate and key store.
If I ran the EMA example without copying the certificate file (cert.pem) to the /usr/local/ssl directory, I got the following error.
loggerMsg
TimeStamp: 08:18:50.222
ClientName: ChannelCallbackClient
Severity: Warning
Text: Received ChannelDownReconnecting event on channel Channel_4
Instance Name Consumer_4_1
RsslReactor 0x0x1e96120
RsslChannel 0x0x1e96120
Error Id -1
Internal sysError 0
Error Location /opt/refinitiv/Real-Time-SDK/Cpp-C/Eta/Impl/Reactor/rsslReactorWorker.c:1973
Error Text </opt/refinitiv/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
loggerMsgEndHowever, if I copy the certificate file (cert.pem) to the /usr/local/ssl directory, the example can run properly.
ln -s /etc/pki/tls/cert.pem /usr/local/ssl/cert.pem
Therefore, you need to check the location of the default certificate and key store used by the OpenSSL library. Then, make sure that the certificate file is in that directory.
0 -
There is a link already there, and after I recreated the link it still displayed the same error. Can you show me all the exported variables ?0
-
My OPENSSLDIR is /usr/local/openssl/ssl. I copied cert.pem to this folder and it works. Thanks.
0
Categories
- All Categories
- 6 AHS
- 39 Alpha
- 161 App Studio
- 4 Block Chain
- 4 Bot Platform
- 16 Connected Risk APIs
- 47 Data Fusion
- 30 Data Model Discovery
- 608 Datastream
- 1.3K DSS
- 577 Eikon COM
- 4.9K Eikon Data APIs
- 7 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- Trading API
- 2.7K Elektron
- 1.3K EMA
- 236 ETA
- 519 WebSocket API
- 33 FX Venues
- 10 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 20 Messenger Bot
- 2 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 59 Open Calais
- 264 Open PermID
- 39 Entity Search
- 2 Org ID
- PAM
- PAM - Logging
- 8.4K Private Comments
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 20 RDMS
- 1.4K Refinitiv Data Platform
- 367 Refinitiv Data Platform Libraries
- 3 Refinitiv Due Diligence
- LSEG Due Diligence Portal API
- 3 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.1K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 10 World-Check Customer Risk Screener
- 990 World-Check One
- 44 World-Check One Zero Footprint
- 45 Side by Side Integration API
- Test Space
- 3 Thomson One Smart
- 1.2K TR Internal
- Global Hackathon 2015
- 2 Specialists Who Code
- 10 TR Knowledge Graph
- 150 Transactions
- 142 REDI API
- 1.7K TREP APIs
- 4 CAT
- 21 DACS Station
- 117 Open DACS
- 1.1K RFA
- 103 UPA
- 172 TREP Infrastructure
- 224 TRKD
- 886 TRTH
- 5 Velocity Analytics
- 5 Wealth Management Web Services
- 60 Workspace SDK
- 9 Element Framework
- 5 Grid
- 13 World-Check Data File
- Yield Book Analytics
- 46 中文论坛