Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Qt Warning] QSslSocket lines at the beginning #132

Closed
twofaktor opened this issue Aug 27, 2022 · 8 comments
Closed

[Qt Warning] QSslSocket lines at the beginning #132

twofaktor opened this issue Aug 27, 2022 · 8 comments

Comments

@twofaktor
Copy link

twofaktor commented Aug 27, 2022

Hello,

After starting Fulcrum at the 2 first lines, logs shows me the next 2 warnings lines [Qt Warning] QSslSocket:

--> Aug 27 14:18:23 Fulcrum[2152]: [2022-08-27 14:18:23.158] [Qt Warning] QSslSocket: cannot resolve EVP_PKEY_base_id (:0, )
--> Aug 27 14:18:23 Fulcrum[2152]: [2022-08-27 14:18:23.158] [Qt Warning] QSslSocket: cannot resolve SSL_get_peer_certificate (:0, )
Aug 27 14:18:23 Fulcrum[2152]: [2022-08-27 14:18:23.164] Loaded SSL certificate: Internet Widgits Pty Ltd  expires: Tue August 24 2032 14:14:11
Aug 27 14:18:23 Fulcrum[2152]: [2022-08-27 14:18:23.164] Loaded key type: private algorithm: RSA
Aug 27 14:18:23 Fulcrum[2152]: [2022-08-27 14:18:23.164] Enabled JSON parser: simdjson
Aug 27 14:18:23 Fulcrum[2152]: [2022-08-27 14:18:23.164] simdjson implementations:
Aug 27 14:18:23 Fulcrum[2152]: [2022-08-27 14:18:23.164]     haswell: Intel/AMD AVX2  [supported]
Aug 27 14:18:23 Fulcrum[2152]: [2022-08-27 14:18:23.164]     westmere: Intel/AMD SSE4.2  [supported]
Aug 27 14:18:23 Fulcrum[2152]: [2022-08-27 14:18:23.164]     fallback: Generic fallback implementation  [supported]
Aug 27 14:18:23 Fulcrum[2152]: [2022-08-27 14:18:23.164] active implementation: haswell
Aug 27 14:18:23 Fulcrum[2152]: [2022-08-27 14:18:23.165] jemalloc: version 5.2.1-0-gea6b3e9
Aug 27 14:18:23 Fulcrum[2152]: [2022-08-27 14:18:23.165] Qt: version 5.15.2
Aug 27 14:18:23 Fulcrum[2152]: [2022-08-27 14:18:23.165] rocksdb: version 6.14.6-ed43161
Aug 27 14:18:23 Fulcrum[2152]: [2022-08-27 14:18:23.165] simdjson: version 0.6.0
Aug 27 14:18:23 Fulcrum[2152]: [2022-08-27 14:18:23.165] ssl: OpenSSL 3.0.2 15 Mar 2022
Aug 27 14:18:23 Fulcrum[2152]: [2022-08-27 14:18:23.165] zmq: libzmq version: 4.3.3, cppzmq version: 4.7.1
Aug 27 14:18:23 Fulcrum[2152]: [2022-08-27 14:18:23.165] Fulcrum 1.7.0 (Release 4ee413a) - Sat Aug 27, 2022 14:18:23.165 UTC - starting up ...
Aug 27 14:18:23 Fulcrum[2152]: [2022-08-27 14:18:23.165] Max open files: 524288 (increased from default: 1024)
Aug 27 14:18:23 Fulcrum[2152]: [2022-08-27 14:18:23.166] Loading database ...
Aug 27 14:18:23 Fulcrum[2152]: [2022-08-27 14:18:23.259] DB memory: 512.00 MiB
Aug 27 14:18:23 Fulcrum[2152]: [2022-08-27 14:18:23.260] Verifying headers ...
Aug 27 14:18:23 Fulcrum[2152]: [2022-08-27 14:18:23.260] BitcoinDMgr: starting 3 bitcoin RPC clients ...
Aug 27 14:18:23 Fulcrum[2152]: [2022-08-27 14:18:23.260] BitcoinDMgr: started ok
Aug 27 14:18:23 Fulcrum[2152]: [2022-08-27 14:18:23.281] <BitcoinDMgr> Coin: BTC
Aug 27 14:18:23 Fulcrum[2152]: [2022-08-27 14:18:23.387] <Controller> Chain: main
Aug 27 14:18:23 Fulcrum[2152]: [2022-08-27 14:18:23.387] <Controller> Block height 751382, downloading new blocks ...
Aug 27 14:18:23 Fulcrum[2152]: [2022-08-27 14:18:23.387] <Controller> fast-sync: Enabled; UTXO cache size set to 2048000000 bytes (available physical RAM: 7167188992 bytes)
Aug 27 14:18:23 Fulcrum[2152]: [2022-08-27 14:18:23.554] <Controller> Processed height: 1000, 0.1%, 6856.2 blocks/sec, 6986.3 txs/sec, 7164.4 addrs/sec
Aug 27 14:18:23 Fulcrum[2152]: [2022-08-27 14:18:23.701] <Controller> Processed height: 2000, 0.3%, 6802.7 blocks/sec, 6877.6 txs/sec, 7415.0 addrs/sec

At this moment I show this status in logs of Fulcrum, so I think everything is fine for now.:

Aug 27 14:53:42 Fulcrum[2152]: [2022-08-27 14:53:42.465] <Controller> Processed height: 367000, 48.8%, 35.1 blocks/sec, 27209.4 txs/sec, 104345.2 addrs/sec
Aug 27 14:53:57 Fulcrum[2152]: [2022-08-27 14:53:57.260] <Controller> Storage UTXO Cache: Flushing to DB ...
Aug 27 14:54:19 Fulcrum[2152]: [2022-08-27 14:54:19.900] <Controller> Storage UTXO Cache: Flushing to DB ...
Aug 27 14:54:55 Fulcrum[2152]: [2022-08-27 14:54:55.428] <Controller> Processed height: 368000, 49.0%, 13.7 blocks/sec, 12060.4 txs/sec, 73893.4 addrs/sec
Aug 27 14:55:22 Fulcrum[2152]: [2022-08-27 14:55:22.155] <Controller> Storage UTXO Cache: Flushing to DB ...
Aug 27 14:55:37 Fulcrum[2152]: [2022-08-27 14:55:37.773] <Controller> Processed height: 369000, 49.1%, 23.6 blocks/sec, 19467.8 txs/sec, 112166.8 addrs/sec
Aug 27 14:55:44 Fulcrum[2152]: [2022-08-27 14:55:44.906] <Controller> Storage UTXO Cache: Flushing to DB ...

But, this warning, could affect the proper functioning of the service in the future as SSL connections to wallets for example? do you know the reason and how to fix it?

PD: I have installed:
Ubuntu 22.04.1 LTS amd64 / binaries: Fulcrum-1.7.0-x86_64-linux.tar.gz
openssl 3.0.2-0ubuntu1.6

Thanks!

Captura222

Edit:

The initial sync has finished, now I show only these logs when I connect a wallet to Fulcrum or BTC RPC Explorer:

Aug 28 05:36:48 Fulcrum[2152]: [2022-08-28 05:36:48.125] <Controller> 750 mempool txs involving 3461 addresses
Aug 28 05:37:58 Fulcrum[2152]: [2022-08-28 05:37:58.125] <Controller> 836 mempool txs involving 3788 addresses
Aug 28 05:39:05 Fulcrum[2152]: [2022-08-28 05:39:05.836] <SslSrv 0.0.0.0:50002> [Qt Warning] QSslSocket: cannot call unresolved function SSL_get_peer_certificate (:0, )
Aug 28 05:39:05 Fulcrum[2152]: [2022-08-28 05:39:05.836] <SslSrv 0.0.0.0:50002> New SSL Client.1530628 192.168.0.30:59992, 1 client total
Aug 28 05:39:08 Fulcrum[2152]: [2022-08-28 05:39:08.123] <Controller> 941 mempool txs involving 5110 addresses
Aug 28 05:39:09 Fulcrum[2152]: [2022-08-28 05:39:09.554] <SslSrv 0.0.0.0:50002> [Qt Warning] QSslSocket: cannot call unresolved function SSL_get_peer_certificate (:0, )
Aug 28 05:39:09 Fulcrum[2152]: [2022-08-28 05:39:09.554] <SslSrv 0.0.0.0:50002> New SSL Client.1530646 192.168.0.30:59996, 1 client total
Aug 28 05:39:15 Fulcrum[2152]: [2022-08-28 05:39:15.019] <SslSrv 0.0.0.0:50002> [Qt Warning] QSslSocket: cannot call unresolved function SSL_get_peer_certificate (:0, )
Aug 28 05:39:15 Fulcrum[2152]: [2022-08-28 05:39:15.019] <SslSrv 0.0.0.0:50002> New SSL Client.1530668 192.168.0.30:59999, 1 client total
Aug 28 05:50:17 Fulcrum[2152]: [2022-08-28 05:50:17.399] <SslSrv 0.0.0.0:50002> [Qt Warning] QSslSocket: cannot call unresolved function SSL_get_peer_certificate (:0, )
Aug 28 05:50:17 Fulcrum[2152]: [2022-08-28 05:50:17.399] <SslSrv 0.0.0.0:50002> New SSL Client.1532630 192.168.0.30:60133, 3 clients total

Despite these logs, I have not experienced connection or scanning errors, or any kind of failure to connect the wallets.

@EchterAgo
Copy link
Collaborator

Missing SSL_get_peer_certificate does not matter, the server does not need it, I'm not sure about EVP_PKEY_base_id though.

There seems to be an issue on the Qt bug tracker:

https://bugreports.qt.io/browse/QTBUG-103820

@chuegel
Copy link

chuegel commented Sep 8, 2022

Can confirm warning message...same versions as OP
It doesn't seem to affect the TLS functionality though..can connect perfectly fine with sparrow wallet

@cculianu
Copy link
Owner

cculianu commented Sep 14, 2022

@chuegel is your server able to connect to other Electrum protocol server peers? E.g. does ./FulcrumAdmin -p <admin_port> peers work ok?

@cculianu
Copy link
Owner

Hmm ok, I reproduced the error on a newer Ubuntu system. Yes I can conclude that while the message is super-annoying, it is safe to ignore. My server accepts SSL connections ok, and is able to peer ok with other SSL peers.

Sorry about the error -- I'll try and think of a way to fix this. I observed that if I built Fulcrum locally the error disappears (presumably the locally installed Qt5 knows how to find the symbols it needs, etc). This is an artifact of the fact that the static Qt linked into the static binary does dynamic lookup of openssl.

A fix would be to install opernssl1.1 and see about adding it to LD_LIBRARY_PATH somehow but that may interfere with your system.

I'll try and come up with a fix for this but it's a bit of an onion -- the current build system builds a very compatible binary (supports older openssl1.1 systems, etc). If I force Qt to use newer openssl it may break on older systems.. :/

Of course.. I could always statically-link-in an OpenSSL into the Fulcrum binary I release but I hesitate to do that on account of the fact that system openssl is more likely to contain latest bugfixes.

Hmm. A bit of a catch-22. Alternatively I could release a binary that filters these messages out intentionally... Hmm.

@cculianu
Copy link
Owner

Ok, I added a commit to suppress these messages for now. I will issue a Fulcrum release later today (v1.8.0) that will contain this fix. Closing issue as resolved ...

@twofaktor
Copy link
Author

@cculianu Still me appearing these logs in the new release 1.8.0 after the update:

admin /tmp B > Fulcrum --version
[2022-09-15 19:49:21.302] [Qt Warning] QSslSocket: cannot resolve EVP_PKEY_base_id (:0, )
[2022-09-15 19:49:21.302] [Qt Warning] QSslSocket: cannot resolve SSL_get_peer_certificate (:0, )
Fulcrum 1.8.0 (Release 4e7102a)
compiled: gcc 7.5.0
jemalloc: version 5.2.1-0-gea6b3e9
Qt: version 5.15.2
rocksdb: version 6.14.6-ed43161
simdjson: version 0.6.0
ssl: OpenSSL 3.0.2 15 Mar 2022
zmq: libzmq version: 4.3.3, cppzmq version: 4.7.1
Sep 15 19:51:46 systemd[1]: Started Fulcrum.
Sep 15 19:51:46 Fulcrum[1688637]: [2022-09-15 19:51:46.998] [Qt Warning] QSslSocket: cannot resolve EVP_PKEY_base_id (:0, )
Sep 15 19:51:47 Fulcrum[1688637]: [2022-09-15 19:51:46.998] [Qt Warning] QSslSocket: cannot resolve SSL_get_peer_certificate (:0, )
Sep 15 19:51:47 Fulcrum[1688637]: [2022-09-15 19:51:47.005] Loaded SSL certificate: Internet Widgits Pty Ltd  expires: Tue August 24 2032 14:14:11
Sep 15 19:51:47 Fulcrum[1688637]: [2022-09-15 19:51:47.005] Loaded key type: private algorithm: RSA
Sep 15 19:51:47 Fulcrum[1688637]: [2022-09-15 19:51:47.005] Enabled JSON parser: simdjson
Sep 15 19:51:47 Fulcrum[1688637]: [2022-09-15 19:51:47.005] simdjson implementations:
Sep 15 19:51:47 Fulcrum[1688637]: [2022-09-15 19:51:47.005]     haswell: Intel/AMD AVX2  [supported]
Sep 15 19:51:47 Fulcrum[1688637]: [2022-09-15 19:51:47.005]     westmere: Intel/AMD SSE4.2  [supported]
Sep 15 19:51:47 Fulcrum[1688637]: [2022-09-15 19:51:47.005]     fallback: Generic fallback implementation  [supported]
Sep 15 19:51:47 Fulcrum[1688637]: [2022-09-15 19:51:47.005] active implementation: haswell
Sep 15 19:51:47 Fulcrum[1688637]: [2022-09-15 19:51:47.007] jemalloc: version 5.2.1-0-gea6b3e9
Sep 15 19:51:47 Fulcrum[1688637]: [2022-09-15 19:51:47.007] Qt: version 5.15.2
Sep 15 19:51:47 Fulcrum[1688637]: [2022-09-15 19:51:47.007] rocksdb: version 6.14.6-ed43161
Sep 15 19:51:47 Fulcrum[1688637]: [2022-09-15 19:51:47.007] simdjson: version 0.6.0
Sep 15 19:51:47 Fulcrum[1688637]: [2022-09-15 19:51:47.007] ssl: OpenSSL 3.0.2 15 Mar 2022
Sep 15 19:51:47 Fulcrum[1688637]: [2022-09-15 19:51:47.007] zmq: libzmq version: 4.3.3, cppzmq version: 4.7.1
Sep 15 19:51:47 Fulcrum[1688637]: [2022-09-15 19:51:47.007] Fulcrum 1.8.0 (Release 4e7102a) - Thu Sep 15, 2022 19:51:47.007 UTC - starting up ...
Sep 15 19:51:47 Fulcrum[1688637]: [2022-09-15 19:51:47.007] Max open files: 524288 (increased from default: 1024)
Sep 15 19:51:47 Fulcrum[1688637]: [2022-09-15 19:51:47.007] Loading database ...
Sep 15 19:51:47 Fulcrum[1688637]: [2022-09-15 19:51:47.564] DB memory: 512.00 MiB
Sep 15 19:51:47 Fulcrum[1688637]: [2022-09-15 19:51:47.564] Coin: BTC
Sep 15 19:51:47 Fulcrum[1688637]: [2022-09-15 19:51:47.564] Chain: main
Sep 15 19:51:47 Fulcrum[1688637]: [2022-09-15 19:51:47.565] Verifying headers ...
Sep 15 19:51:49 Fulcrum[1688637]: [2022-09-15 19:51:49.628] Initializing header merkle cache ...
Sep 15 19:51:50 Fulcrum[1688637]: [2022-09-15 19:51:50.540] Checking tx counts ...
Sep 15 19:51:57 Fulcrum[1688637]: [2022-09-15 19:51:57.054] 764804649 total transactions
Sep 15 19:51:57 Fulcrum[1688637]: [2022-09-15 19:51:57.060] UTXO set: 84066719 utxos, 7061.604 MB
Sep 15 19:51:57 Fulcrum[1688637]: [2022-09-15 19:51:57.578] BitcoinDMgr: starting 3 bitcoin RPC clients ...
Sep 15 19:51:57 Fulcrum[1688637]: [2022-09-15 19:51:57.579] BitcoinDMgr: started ok
Sep 15 19:51:57 Fulcrum[1688637]: [2022-09-15 19:51:57.693] <Controller> Block height 754252, downloading new blocks ..
[...]

Are you sure this issue was fixed?
Thanks

@cculianu
Copy link
Owner

Hey guys thanks for the feedback. @twofaktor Yeah the "cannot resolve" message was left in there intentionally -- it only happens once at startup. The reason I left it in is so that I don't forget about this and so that I am reminded there is an issue with older Qt and newer openssl. I hope to resolve this -- my current plan is just to offer a a separate linux static build -- one for newer Ubuntu. Alternatively I could actually see about just statically linking OpenSSL into the app directly.

tl;dr: I hope to actually solve this. For now I am just "suppressing" the messages that would have appeared with every new SSL connection (which would have filled the log with noise) -- but the initial "cannot resolve X" I am leaving in... until I have a "real" solution.

@cculianu
Copy link
Owner

PS: Just to be clear the symbols that Qt's openssl engine cannot find are not actually used by Fulcrum -- so it's safe to ignore the message at startup... just to be clear.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants