AEM6.3 POM related Deployment issues | Community
Skip to main content
Adobeaspirant
Level 3
September 11, 2017

AEM6.3 POM related Deployment issues

  • September 11, 2017
  • 6 replies
  • 7788 views

I have successfully deploying the code in local. When it comes to dev environment my deployment team say they want clean install. I suggested to have profiles of each server in pom. But they are looking for clean install. I am getting connection refused error. Can some one help me in this?

I/O exception (java.net.ConnectException) caught when processing request: Connection refused: connect

[INFO] Retrying request

This is my ui-apps pom profiles

<profiles>

        <profile>

            <id>autoInstallPackage</id>

            <build>

                <plugins>

                    <plugin>

                        <groupId>com.day.jcr.vault</groupId>

                        <artifactId>content-package-maven-plugin</artifactId>

                        <executions>

                            <execution>

                                <id>install-content-package</id>

                                <phase>install</phase>

                                <goals>

                                    <goal>install</goal>

                                </goals>

                                <configuration>

                                    <targetURL>http://${aem.host}:${aem.port}/crx/packmgr/service.jsp</targetURL>

                                    <serviceURL>http://${aem.host}:${aem.port}/crx/packmgr/service.json</serviceURL>

                                    <userId>${sling.user}</userId>

                                    <username>${sling.user}</username>

                                    <password>${sling.password}</password>

                                    <relaxedSSLCheck>true</relaxedSSLCheck>

                                </configuration>

                            </execution>

                        </executions>

                    </plugin>

                </plugins>

            </build>

        </profile>

        <profile>

            <id>autoInstallPackagePublish</id>

            <build>

                <plugins>

                    <plugin>

                        <groupId>com.day.jcr.vault</groupId>

                        <artifactId>content-package-maven-plugin</artifactId>

                        <executions>

                            <execution>

                                <id>install-content-package-publish</id>

                                <phase>install</phase>

                                <goals>

                                    <goal>install</goal>

                                </goals>

                                <configuration>

                                    <targetURL>http://${aem.publish.host}:${aem.publish.port}/crx/packmgr/service.jsp</targetURL>

                                    <serviceURL>http://$aem.publish.host}:${aem.publish.port}/crx/packmgr/service/.json</serviceURL>

                                    <username>${sling.user}</username>

                                    <userId>${sling.user}</userId>

                                    <password>${sling.password}</password>

                                </configuration>

                            </execution>

                        </executions>

                    </plugin>

                </plugins>

            </build>

        </profile>

    </profiles>

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

6 replies

joerghoh
Adobe Employee
Adobe Employee
September 11, 2017

"Connection refused" means that on the specific combination of hostname and port no application is listening. Is the AEM instance started and ready? Are your variables "aem.host"/"aem.port" or "aem.publish.host"/"aem.publish.port" set correctly?

Kind regards,

Jörg

Adobeaspirant
Level 3
September 12, 2017

Aem Instance is started and it is ready.

Please find below variables.

<properties>

        <aem.host>localhost</aem.host>

        <aem.port>4502</aem.port>

        <aem.publish.host>localhost</aem.publish.host>

        <aem.publish.port>4503</aem.publish.port>

        <sling.user>admin</sling.user>

        <sling.password>admin</sling.password>

        <vault.user>admin</vault.user>

        <vault.password>admin</vault.password>

        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

    </properties>

joerghoh
Adobe Employee
Adobe Employee
September 12, 2017

Can you please also provide the complete error?

"Connection refused" in your case could mean, that the CI server tries to deploy to "localhost:4502", where very likely no AEM instance is running.

Jörg

Diego_Fontan
Level 4
September 11, 2017

This also could happen when you have some communication issue with the AEM Instance or it's still down. Normally, this error appears when you are running your CI process(deployment) from Jenkins or other servers, it's resolved triggering one more time because you have too many job running concurrency.

Below Thre  is a simple example to test this scenario;  We only have to build and deploy thru maven our app with AEM down and result will be the image attached as you have it above.

Adobeaspirant
Level 3
September 13, 2017

I passing this command mvn -Daem.host=localhost -Daem.port=8080 clean install -PautoInstallPackage but the error says autoInstallPackage doesn't exist.

Adobeaspirant
Level 3
September 13, 2017

It got resolved and working fine now. I have run the command at parent level.

Adobeaspirant
Level 3
September 13, 2017

<profiles>

        <profile>

            <id>autoInstallBundle</id>

            <build>

                <plugins>

                    <plugin>

                        <groupId>org.apache.sling</groupId>

                        <artifactId>maven-sling-plugin</artifactId>

                        <executions>

                            <execution>

                                <id>install-bundle</id>

                                <goals>

                                    <goal>install</goal>

                                </goals>

                            </execution>

                        </executions>

                    </plugin>

                </plugins>

            </build>

        </profile>

    </profiles>

  <modules>

    <module>bundle</module>

    <module>content</module>

  </modules>

Instead of running a maven command how can we deploy code from build machine? Is there any use in main pom having this autoinstallBundle in parent?

Adobeaspirant
Level 3
September 18, 2017

Failed to execute goal com.day.jcr.vault:content-package-maven-plugin:0.0.24:install (install-content-package) on project amicacom.ui.apps: Execution install-content-package of goal com.day.jcr.vault:content-package-maven-plugin:0.0.24:install failed: Invalid uri '${crx.protocol}://${crx.host}:${crx.port}/crx/packmgr/service.jsp'

VeenaVikraman
Community Advisor
Community Advisor
September 18, 2017

do you have mentioned this protocol host and port in your pom.xml ?

Adobeaspirant
Level 3
September 18, 2017

<properties>

        <aem.host>localhost</aem.host>

        <aem.port>4502</aem.port>

        <aem.publish.host>localhost</aem.publish.host>

        <aem.publish.port>4503</aem.publish.port>

        <sling.user>admin</sling.user>

        <sling.password>admin</sling.password>

        <vault.user>admin</vault.user>

        <vault.password>admin</vault.password>

        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

    </properties>    Is this causing the issue?

Adobeaspirant
Level 3
September 18, 2017

Thanks Jorg and Veena for your help. Issue resolved.