LDAP with Liferay - Unknown host where exists


April 2019


3 time


I have to integrate LDAP with two different services: exoPlatform and Liferay. So I set up an LDAP server via a Docker image with these configurations:

  • Server Name: openldap
  • Base Provider URL: ldap://openldap:389
  • Base DN: cn=users,ou=Platform,o=acme,dc=example,dc=org

My admin account is just: cn=admin

With exoPlatform, it works fine, I can log in with my LDAP accounts. Here the configurations in the picketlink-idm-openldap-config.xml:


But for Liferay, it tells me that the host is not known... Unable to bind to the LDAP server liferay | javax.naming.CommunicationException: openldap:389 [Root exception is java.net.UnknownHostException: openldap] Caused by: java.net.UnknownHostException: openldap

I don't know if it's related but I'll say it anyway just in case, I have 2 different docker-compose that I launch at the same time:

  • one that contains the images openldap, phpldapadmin, exoPlatform and mysql1
  • one that contains the liferay and mysql2 images

I am also behind a corporate proxy, but I don't remember having done anything special for exoPlatform. I simply added the proxy settings to Catalina Tomcat for my exoPlatform and Liferay images.

Also, I have set LDAP authentication to enabled in the Liferay control panel with the Bind method.

0 answers