Hi,
For the below error observed, here is some analysis done. And my queries are
listed below the analysis.
$HOME/apache-cloudstack-4.15.0.0-src/plugins/user-authenticators/ldap/src/test/java/org/apache/cloudstack/ldap/LdapUnitConnectionTest.java
static final int PORT =11389;
public class LdapUnitConnectionTest {
@Before
public void setUp() {
directoryTester = new DirectoryTester("localhost", PORT, BIND_DN,
SECRET);
}
@Test
public void testLdapInteface() throws Exception {
directoryTester.assertDNExists("dc=am,dc=echt,dc=net");
}
$HOME/apache-cloudstack-4.15.0.0-src/plugins/user-authenticators/ldap/target/surefire-reports/TEST-org.apache.cloudstack.ldap.LdapUnitConnectionTest.xml
<testcase name="testLdapInteface"
classname="org.apache.cloudstack.ldap.LdapUnitConnectionTest" time="10.097">
<error message="An error occurred while attempting to connect to server
35.186.238.101:11389: IOException(LDAPException(resultCode=91 (connect error),
errorMessage='Unable to establish a connection to server
/35.186.238.101:11389 within the configured timeout of 10000 milliseconds
Here I see in the file LdapUnitConnectionTest.java from where it is throwing
the error, it is connecting to "localhost" and port 11389 and not to
35.186.238.101 ip address as shown in the logs which actually is hardcoded in
TEST-org.apache.cloudstack.ldap.LdapUnitConnectionTest.xml file. Hence it was
misleading.
Questions :
1) If it is connecting to localhost and port 11389, then there are no ldap
services running on that port on my localhost. Should any setup be done ? If
so, can you please share the steps to setup LDAP on that port ?
2) While doing source build why testing scripts like connection is included as
part of source build instead of just compilation and RPM build alone ?
3) If we need to skip any of the test cases like these for which setup is not
done, in which file should we comment ?
4) I am not seeing anyone who seemed to have faced this issue. Didn't find any
google search results for my errors. Am I doing something wrong or missing any
steps ?
Thanks in advance,
Hema