Hi, Can you try the following command to build the projects ?
mvn -P developer,systemvm clean install -Wei On Mon, 7 Jun 2021 at 08:19, Hema <h...@cimware.in> wrote: > Hi, > > I got this mail id from one of the GitHub issues. Please let me know if > you can help me resolve this issue posted in the users link ? > https://lists.apache.org/list.html?us...@cloudstack.apache.org:2021-6 < > https://lists.apache.org/list.html?us...@cloudstack.apache.org:2021-6> > > > > From: Hemalatha Pal <h...@cimware.in> > Subject: Cloudstack source code compilation - RPMs build failed - LDAP > Date: 2021/05/28 08:25:40 > List: us...@cloudstack.apache.org < > https://lists.apache.org/list.html?us...@cloudstack.apache.org> > Hi, > > I am new to this cloudstack. So I would need some pointers on how to > proceed with resolving the below error. > > I understand from the error that the build is looking for these jars in > https://repo.maven.apache.org/maven2 <https://repo.maven.apache.org/maven2> > link and it couldn't find the cloudstack directory under org.apache > directory. > > Questions : > 1) Why is cloudstack folder not found in the > https://repo.maven.apache.org/maven2 <https://repo.maven.apache.org/maven2> > - org.apache path provided in the source build files ? > 2) If not found in this link https://repo.maven.apache.org/maven2 < > https://repo.maven.apache.org/maven2> , then which url should I give for > accessing these files ? > 3) If I need to modify with the new url which has those jar files, then > which pom.xml file should I modify ? Since I don't see a common pom.xml > file which has both these jars (eg. cloud-server.jar) and url ( > https://repo.maven.apache.org/maven2 <https://repo.maven.apache.org/maven2> > ) referred in the same file ? > > Thanks in advance for your guidance. > > Regards, > Hema > > [root@centos8 ldap]# pwd > /home/hema/apache-cloudstack-4.15.0.0-src/plugins/user-authenticators/ldap > [root@centos8 ldap]# > > [root@centos8 ldap]# ls -lrt > total 12 > drwxrwxr-x. 4 hema hema 30 Jan 5 10:51 src > -rw-rw-r--. 1 hema hema 9515 Jan 5 10:51 pom.xml > > [root@centos8 ldap]# mvn -X install > Apache Maven 3.8.1 (05c21c65bdfed0f71a2f2ada8b84da59348c4c5d) > Maven home: /home/hema/cloudstack/apache-maven-3.8.1 > Java version: 11.0.11, vendor: Red Hat, Inc., runtime: > /usr/lib/jvm/java-11-openjdk-11.0.11.0.9-0.el8_3.x86_64 > Default locale: en_IN, platform encoding: UTF-8 > OS name: "linux", version: "4.18.0-240.22.1.el8_3.x86_64", arch: "amd64", > family: "unix" > [DEBUG] Created new class realm maven.api > > [DEBUG] Using mirror maven-default-http-blocker (http://0.0.0.0/) for > maven2-repository.dev.java.net (http://download.java.net/maven/2/ < > http://download.java.net/maven/2/>). > [WARNING] The POM for org.apache.cloudstack:cloud-server:jar:4.15.0.0 is > missing, no dependency information available > [WARNING] The POM for org.apache.cloudstack:cloud-api:jar:4.15.0.0 is > missing, no dependency information available > [WARNING] The POM for org.apache.cloudstack:cloud-utils:jar:4.15.0.0 is > missing, no dependency information available > [WARNING] The POM for > org.apache.cloudstack:cloud-framework-config:jar:4.15.0.0 is missing, no > dependency information available > [WARNING] The POM for org.apache.cloudstack:cloud-api:jar:tests:4.15.0.0 > is missing, no dependency information available > > > [ERROR] Failed to execute goal on project > cloud-plugin-user-authenticator-ldap: Could not resolve dependencies for > project org.apache.cloudstack:cloud-plugin-user-authenticator-ldap:jar: > 4.15.0.0: The following artifacts could not be resolved: > org.apache.cloudstack:cloud-server:jar:4.15.0.0, > org.apache.cloudstack:cloud-api:jar:4.15.0.0, > org.apache.cloudstack:cloud-utils:jar:4.15.0.0, > org.apache.cloudstack:cloud-framework-config:jar:4.15.0.0, > org.apache.cloudstack:cloud-api:jar:tests:4.15.0.0: > org.apache.cloudstack:cloud-server:jar:4.15.0.0 was not found in > https://repo.maven.apache.org/maven2 <https://repo.maven.apache.org/maven2> > during a previous attempt. This failure was cached in the local repository > and resolution is not reattempted until the update interval of central has > elapsed or updates are forced -> > Reply Permalink < > https://lists.apache.org/thread.html/ra60b208daaf9e74f88680aa2bb4e604a731980b40a02cfc37e2dbb4f%40%3Cusers.cloudstack.apache.org%3E> > View Source < > https://lists.apache.org/api/source.lua/ra60b208daaf9e74f88680aa2bb4e604a731980b40a02cfc37e2dbb4f@%3Cusers.cloudstack.apache.org%3E> > <> > From: Suresh Anaparti <suresh.anapa...@shapeblue.com> > Subject: Re: Cloudstack source code compilation - RPMs build failed - LDAP > Date: 2021/05/28 09:30:01 > List: us...@cloudstack.apache.org < > https://lists.apache.org/list.html?us...@cloudstack.apache.org> > Hi Hemalatha Pal, > > You can refer to the following wiki pages, to setup dev environment and > build process. The CloudStack build, using mavin (mvn), would download the > required dependencies from the maven repo. Only need to download external > dependency jars manually, copy to 'deps' folder and 'mvn install' (check > 'deps/install-non-oss.sh'). > > > https://cwiki.apache.org/confluence/display/CLOUDSTACK/Setting+up+CloudStack+Development+Environment > < > https://cwiki.apache.org/confluence/display/CLOUDSTACK/Setting+up+CloudStack+Development+Environment > > > > > https://cwiki.apache.org/confluence/display/CLOUDSTACK/How+to+build+CloudStack#HowtobuildCloudStack-InstallingMaven > < > https://cwiki.apache.org/confluence/display/CLOUDSTACK/How+to+build+CloudStack#HowtobuildCloudStack-InstallingMaven > > > > Regards, > Suresh > > > Reply Permalink < > https://lists.apache.org/thread.html/rd4e19c816fe4d698deaf4e0d75666a8852c00277fdbaaac6bef6c504%40%3Cusers.cloudstack.apache.org%3E> > View Source < > https://lists.apache.org/api/source.lua/rd4e19c816fe4d698deaf4e0d75666a8852c00277fdbaaac6bef6c504@%3Cusers.cloudstack.apache.org%3E> > <> > From: Hemalatha Pal <h...@cimware.in> > Subject: Re: Cloudstack source code compilation - RPMs build failed - LDAP > Date: 2021/05/29 09:26:50 > List: us...@cloudstack.apache.org < > https://lists.apache.org/list.html?us...@cloudstack.apache.org> > Hi Suresh, > > Thanks for your response and the links. But I didnt find answers for my > specific questions from that link. I am following the below Cloudstack > documentation to build the source and generate RPMS. > > https://docs.cloudstack.apache.org/en/latest/installguide/index.html#building-from-source > < > https://docs.cloudstack.apache.org/en/latest/installguide/index.html#building-from-source > > > > In the link that you have provided, it has dependent jars required for > vmware but I didnt find the jars that I need for LDAP where the build is > failing. Same with deps/install-non-oss.sh too, where dependent jars > required for vmware is only present. I am not sure where to find equivalent > jars required for LDAP to resolve the error which I have mentioned in my > post and thats why raised it. > > Regards, > Hema > > Reply Permalink < > https://lists.apache.org/thread.html/r7180e0e9bcb777c5c17d2d7216d015951fc6804a5098167a45e5c7a5%40%3Cusers.cloudstack.apache.org%3E> > View Source < > https://lists.apache.org/api/source.lua/r7180e0e9bcb777c5c17d2d7216d015951fc6804a5098167a45e5c7a5@%3Cusers.cloudstack.apache.org%3E> > <> > From: Hema <h...@cimware.in> > Subject: Re: Cloudstack source code compilation - RPMs build failed - LDAP > Date: 2021/05/30 02:39:34 > List: us...@cloudstack.apache.org < > https://lists.apache.org/list.html?us...@cloudstack.apache.org> > Hi, > > One of the changes that I was trying to make as mentioned below blindly, > has generated the dependent jar files. Same lines were added for cloud-api, > cloud-utils and cloud-framework-config for which it was throwing dependency > errors. Not sure which file's changes helped in generating.. since when I > moved the generated files and tried to generate it again with modified > files one by one, it didnt generate the jar files. > > > $HOME/apache-cloudstack-4.15.0.0-src/plugins/user-authenticators/ldap/pom.xml > <dependency> > <groupId>org.apache.cloudstack</groupId> > <artifactId>cloud-server</artifactId> > <version>${project.version}</version> > </dependency> > > $HOME/apache-cloudstack-4.15.0.0-src/deps/install-non-oss.sh > mvn install:install-file -Dfile=cloud-server.jar > -DgroupId=org.apache.cloudstack -DartifactId=cloud-server > -Dversion=4.15.0.0 -Dpackaging=jar > > /root/.m2/repository/org/apache/cloudstack/cloud-server/4.15.0.0 > [root@centos8 4.15.0.0]# ls -lrt *.jar > total 3140 > -rw-r--r--. 1 root root 3188078 May 29 06:56 cloud-server-4.15.0.0.jar > /root/.m2/repository/org/apache/cloudstack/cloud-api > /root/.m2/repository/org/apache/cloudstack/cloud-util > /root/.m2/repository/org/apache/cloudstack/cloud-framework-config > > Now, the below error has come up and currently debugging it. Any pointers > for the same will be helpful. > > Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 10.688 s > <<< FAILURE! - in org.apache.cloudstack.ldap.LdapUnitConnectionTest > testLdapInteface(org.apache.cloudstack.ldap.LdapUnitConnectionTest) Time > elapsed: 10.688 s <<< ERROR! > com.unboundid.ldap.sdk.LDAPException: 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.', ldapSDKVersion=4.0.14, > revision=c0fb784eebf9d36a67c736d0428fb3577f2e25bb)) > Caused by: java.io.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.', ldapSDKVersion=4.0.14, > revision=c0fb784eebf9d36a67c736d0428fb3577f2e25bb) > Caused by: com.unboundid.ldap.sdk.LDAPException: Unable to establish a > connection to server /35.186.238.101:11389 within the configured timeout > of 10000 milliseconds. > > Thanks in advance, > Hema > Reply Permalink < > https://lists.apache.org/thread.html/r10f5cca58832d593583f3745bf9402062f45a067c7434f136b060b9f%40%3Cusers.cloudstack.apache.org%3E> > View Source < > https://lists.apache.org/api/source.lua/r10f5cca58832d593583f3745bf9402062f45a067c7434f136b060b9f@%3Cusers.cloudstack.apache.org%3E> > <> > From: Hema <h...@cimware.in> > Subject: Re: Cloudstack source code compilation - RPMs build failed - LDAP > Date: 2021/05/30 10:30:21 > List: us...@cloudstack.apache.org < > https://lists.apache.org/list.html?us...@cloudstack.apache.org> > 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 > > > > Reply Permalink < > https://lists.apache.org/thread.html/ra5f23875f08acaa163369f95226fada09469dd1765d03ff45a2b75af%40%3Cusers.cloudstack.apache.org%3E> > View Source < > https://lists.apache.org/api/source.lua/ra5f23875f08acaa163369f95226fada09469dd1765d03ff45a2b75af@%3Cusers.cloudstack.apache.org%3E> > <> > From: Hema <h...@cimware.in> > Subject: Re: Cloudstack source code compilation - RPMs build failed - LDAP > Date: 2021/06/05 11:12:54 > List: us...@cloudstack.apache.org < > https://lists.apache.org/list.html?us...@cloudstack.apache.org> > Hi, > > I installed and configured LDAP as per the steps provided in the below > link. > https://computingforgeeks.com/install-configure-openldap-server-centos/ < > 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 > > > >