I have used Ubuntu 20.04 LTS VM rkubgl02 for this installation. In this VM I have installed Gluu.
I can connect to VM rkubgl02 like this: ssh root@rkubgl02. In the VM I have installed LDAP tools from Ubuntu repository (apt install ldap-tools). These are OpenLDAP tools. I have got the error above even if I connect to this tool locally from this VM. If I am locally on the VM, this means, that the port 1636 for instance is open. So I do not need any SSH tunnel. But ldapsearch still produces TLS connect error. So I have copied opendj certificate from the container and provided it to the VM. I have also set it in /etc/ldap/ldap.conf. But I still have got the errors.
If I connect from the VM to container (/sbin/gluu-server login), then I use ldapsearch from the container. This works without any problems. So the problem is not with LDAP server itself. I assume, the problem with TLS certificate. Do you have any steps how to copy this certificate and set up /etc/ldap/ldap.conf file on Ubuntu?