curl / Mailing Lists / curl-library / Single Mail

curl-library

Occasionally facing connection issues with NSS

From: surya chandrika via curl-library <curl-library_at_cool.haxx.se>
Date: Fri, 26 Apr 2019 10:38:52 +0530

I am occasionally seeing "Unable to initialize NSS database" log during my
curl call initialization from my CPP module using libcurl and at that time,
my curl calls are not working.
*Note:* only at certain times , else is works properly without any changes
in system

Please find the logs in working case and not working case below, if you see
the timestamp its just the next call:-

Working case
------------------
2019-03-17 13:04:29.000|info |||0||About to connect() to xxx.xxxxxxx.com
port 443 (#621)
||qwerty.cc:123|
2019-03-17 13:04:29.000|info |||0|| Trying xxx.yyy.zzz.aaa...
|| qwerty.cc:123 |
2019-03-17 13:04:29.000|info |||0||Connected to xxx.xxxxxxx.com (
xxx.yyy.zzz.aaa ) port 443 (#621)
|| qwerty.cc:123 |
2019-03-17 13:04:29.000|info |||0||skipping SSL peer certificate
verification
|| qwerty.cc:123 |
2019-03-17 13:04:29.000|info |||0||Server certificate:
|| qwerty.cc:123 |
2019-03-17 13:04:29.000|info |||0||HTTP/1.1 200 OK

Not Working case
-----------------------
2019-03-17 13:04:30.000|info |||0||About to connect() to xxx.xxxxxxx.com
 port 443 (#622)
|| qwerty.cc:123 |
2019-03-17 13:04:30.000|info |||0|| Trying xxx.yyy.zzz.aaa ...
|| qwerty.cc:123 |
2019-03-17 13:04:30.000|info |||0||Connected to xxx.xxxxxxx.com (
xxx.yyy.zzz.aaa ) port 443 (#622)
|| qwerty.cc:123 |
2019-03-17 13:04:30.000|info |||0||Initializing NSS with certpath:
sql:/etc/pki/nssdb
|| qwerty.cc:123 |
2019-03-17 13:04:30.000|info |||0||Unable to initialize NSS database
|| qwerty.cc:123 |
2019-03-17 13:04:30.000|info |||0||Initializing NSS with certpath: none
|| qwerty.cc:123 |
2019-03-17 13:04:30.000|info |||0||Unable to initialize NSS
|| qwerty.cc:123 |
2019-03-17 13:04:30.000|info |||0||Closing connection 622
|| qwerty.cc:123 |

And the curl -V details is:-
$ curl -V
curl 7.29.0 (x86_64-redhat-linux-gnu) libcurl/7.29.0 NSS/3.34 zlib/1.2.7
libidn/1.28 libssh2/1.4.3
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3
pop3s rtsp scp sftp smtp smtps telnet tftp
Features: AsynchDNS GSS-Negotiate IDN IPv6 Largefile NTLM NTLM_WB SSL libz

Can you please help me to find out the reason for this behavior?

-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2019-04-26