Zend certified PHP/Magento developer

openssl connection issue to ldap server

I’m running following command in docker container(Ubuntu 20.04) :

openssl s_client -connect ldap-server:3269 < /dev/null

most of the time, it returns :

CONNECTED(00000003)
write:errno=0
---
no peer certificate available
---
No client certificate CA names sent
---
SSL handshake has read 0 bytes and written 312 bytes
Verification: OK
---
New, (NONE), Cipher is (NONE)
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
Early data was not sent
Verify return code: 0 (ok)

occasionally (lets say once in five), it returns full information about ldap server, like “Certificates Chains” and “Server Certificates, etc.

On Windows host, the command works fine.

How can I troubleshoot ?