LDAP test connection unspecified error

LDAP server is AD 2008R2, port is standard (389). testing connection gives an unspecified error with nothing shown in /var/logs/openfire/. telnet on that host and port works, so it’s not a problem with network connectivity. how can i troubleshoot this problem?

EDIT: Openfire 4.1.6 (was the same with 4.1.5) installed on Ubuntu 16.04 x64 via official .deb file, JRE: openjdk-8-jre, database: Postgres.

UPD: AD configuration was pretty messed up from the beginning (not my fault, i swear), so i had to use magic ™.

  1. local AD uses companyname.com domain which is present in the internet also. when i disabled internet for the openfire server, it started to give out proper error messages. fair enough, i don’t need internet for the jabber server anyway.

  2. changed base DN to cn=Users,dc=companyname,dc=com.