You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cloudstack.apache.org by Hema <he...@cimware.in> on 2021/06/05 11:12:54 UTC

Re: Cloudstack source code compilation - RPMs build failed - LDAP

Hi,

I installed and configured LDAP as per the steps provided in the below link.
https://computingforgeeks.com/install-configure-openldap-server-centos/

[root@centos8 openldap]# netstat -ltnp | grep slapd
Active Internet connections (only servers) 
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name     
tcp        0      0 0.0.0.0:636             0.0.0.0:*               LISTEN      516121/slapd         
tcp        0      0 0.0.0.0:389             0.0.0.0:*               LISTEN      516121/slapd         
tcp6       0      0 :::389                  :::*                    LISTEN      516121/slapd         
tcp6       0      0 :::3306                 :::*                    LISTEN      1869/mysqld          

The slapd service seem to be running on 389 port whereas the code was referring to 11389 port. So I tried modifying the hard coded value from 11389 to 389 in the below file,

$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 
to 
static final int PORT = 389

Now I am getting the error as,
<<< ERROR! 
com.unboundid.ldap.sdk.LDAPException: An error occurred while attempting to start listener 'default':  BindException(Address already in use (Bind failed)),

What is expected to be done then to resolve the error initially posted ? 

Is LDAP connection a pre-requisite for the source to be built ?

Thanks,
Hema







Re: Cloudstack source code compilation - RPMs build failed - LDAP

Posted by Hema <he...@cimware.in>.
Hi David,

Thank you for your response and pointers. For now with your suggestion, as a work around, I was able to skip the test and proceed with just source build by adding -DskipTests in mvn command in cloud.spec file. It helped. 

There are some java version mismatch errors in the source build in package 121/124 which I am debugging though pre-requisite was given as Java 11 but expecting Java 8. 
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.UnsupportedClassVersionError: com/cloud/api/doc/ApiXmlDocWriter has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0

Will keep you posted once the RPMs are successfully built. I will revisit the test scripts error after completing the source build.

Regards,
Hema

Re: Cloudstack source code compilation - RPMs build failed - LDAP

Posted by David Jumani <Da...@shapeblue.com>.
Hi Hema,

If it helps you can try and build it from source skipping the tests.
You can modify the cloud.spec to add the skip tests flag
________________________________
From: Hema <he...@cimware.in>
Sent: Saturday, June 5, 2021 4:42 PM
To: users@cloudstack.apache.org <us...@cloudstack.apache.org>
Subject: Re: Cloudstack source code compilation - RPMs build failed - LDAP

Hi,

I installed and configured LDAP as per the steps provided in the below link.
https://computingforgeeks.com/install-configure-openldap-server-centos/

[root@centos8 openldap]# netstat -ltnp | grep slapd
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:636             0.0.0.0:*               LISTEN      516121/slapd
tcp        0      0 0.0.0.0:389             0.0.0.0:*               LISTEN      516121/slapd
tcp6       0      0 :::389                  :::*                    LISTEN      516121/slapd
tcp6       0      0 :::3306                 :::*                    LISTEN      1869/mysqld

The slapd service seem to be running on 389 port whereas the code was referring to 11389 port. So I tried modifying the hard coded value from 11389 to 389 in the below file,

$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
to
static final int PORT = 389

Now I am getting the error as,
<<< ERROR!
com.unboundid.ldap.sdk.LDAPException: An error occurred while attempting to start listener 'default':  BindException(Address already in use (Bind failed)),

What is expected to be done then to resolve the error initially posted ?

Is LDAP connection a pre-requisite for the source to be built ?

Thanks,
Hema