After installing UR4 for SCOM 2019, that error changed to this one:
Signed certificate verification operation was not successful.
Which is a common error. In my case, for oracle Linux 8.6, the error did not help at all. I checked agent's log path (/var/opt/omi/log) and found this error:
SSL: No server certificate found in /etc/opt/omi/ssl/omi.pem. error:140AB18F:SSL routines:SSL_CTX_use_certificate:ee key too small.
After some research about this error I found a command which shows the crypto policy configuration on the server:
update-crypto-policies --show
This command showed that the crypto policy on the server was FUTURE. So I changed it to DEFAULT and the server discovered without any error.
update-crypto-policies --set DEFAULT
Finally, I compared these two policies (FUTURE and DEFAULT) and found that they have a config file named opensslcnf.txt. If we have to keep our policy to FUTURE we can change @SECLEVEL=3 to @SECLEVEL=2 in this file and after that we can discover the server without any problem.
You can find that file in this path: /usr/share/crypto-policies/FUTURE
After discovering, you can change that parameter to its default.