Expand my Community achievements bar.

July 31st AEM Gems Webinar: Elevate your AEM development to master the integration of private GitHub repositories within AEM Cloud Manager.
SOLVED

[ERROR] Failed to execute goal com.day.jcr.vault:content-package-maven-plugin:1.0.2:install (install-package) on project aem-guides-wknd.all: Connection refused -> [Help 1]

Avatar

Level 1

I'm just following the tutorial here:

https://docs.adobe.com/content/help/en/experience-manager-learn/getting-started-wknd-tutorial-develo... 

and I launched the command :

 mvn -PautoInstallSinglePackage clean install
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for aem-guides-wknd 0.0.1-SNAPSHOT:
[INFO]
[INFO] aem-guides-wknd .................................... SUCCESS [  0.253 s]
[INFO] WKND Sites Project - Core .......................... SUCCESS [  4.976 s]
[INFO] WKND Sites Project - UI Frontend ................... SUCCESS [  8.875 s]
[INFO] WKND Sites Project - Repository Structure Package .. SUCCESS [  0.457 s]
[INFO] WKND Sites Project - UI apps ....................... SUCCESS [  2.534 s]
[INFO] WKND Sites Project - UI content .................... SUCCESS [  1.331 s]
[INFO] WKND Sites Project - All ........................... FAILURE [  0.318 s]
[INFO] WKND Sites Project - Integration Tests Bundles ..... SKIPPED
[INFO] WKND Sites Project - Integration Tests Launcher .... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  19.663 s
[INFO] Finished at: 2020-09-01T14:12:39+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.day.jcr.vault:content-package-maven-plugin:1.0.2:install (install-package) on project aem-guides-wknd.all: Connection refused -> [Help 1]

 

 I received the error:

Failed to execute goal com.day.jcr.vault:content-package-maven-plugin:1.0.2:install (install-package) on project aem-guides-wknd.all: Connection refused -> [Help 1]

 

How it's possible to follow a tutorial and receive an error? 

1 Accepted Solution

Avatar

Correct answer by
Level 4

Hello @danilo-delfio ,

The error indicates that the AEM instance is not accessible for package installation.
Please ensure you have an instance of AEM running locally on port 4502 and you have the corresponding port specified in pom.xml:

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

 
Regards

View solution in original post

8 Replies

Avatar

Correct answer by
Level 4

Hello @danilo-delfio ,

The error indicates that the AEM instance is not accessible for package installation.
Please ensure you have an instance of AEM running locally on port 4502 and you have the corresponding port specified in pom.xml:

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

 
Regards

Avatar

Level 1

Hi @Andrei_Dantsou 

 

What are the next steps if a local instance is running on port 4502 and the pom.xml file is correctly configured?

 

<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>

 

I can even see that the port number is open:

 

 

$ nc -zv localhost 4502

Connection to localhost port 4502 [tcp/*] succeeded!

 

 

I often have this problem on some computers and with tools such as aemsync not being able to connect. I'm thinking this might be a networking issue. 

 

My workaround is to install the snapshots via Package Manager manually.

 

Although, maybe my error is slightly different where localhost doesn't respond rather than refuses connection:

 

[ERROR] Failed to execute goal com.day.jcr.vault:content-package-maven-plugin:1.0.2:install (install-package) on project aem-guides-wknd-spa.react.all: The server localhost failed to respond -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.day.jcr.vault:content-package-maven-plugin:1.0.2:install (install-package) on project aem-guides-wknd-spa.react.all: The server localhost failed to respond

 

Charlie

Avatar

Community Advisor

Hey @danilo-delfio,

I have come across these types issues when I play around with port numbers and while build, i'm unable to clean the project. Please clean your project(mvn clean), delete the 'target' folders in your working directory and check the port number in your parent pom/xml. The port number should be the same in your pom.xml and localhost:4502. I believe this would resolve your issue.

Thanks, Bilal.

Avatar

Community Advisor

Hi @danilo-delfio 

There might be many reasons for this behavior. Some of them might be:

  • AEM instance is not up and running.
  • AEM instance might be running on different port than the one configured in your pom.xml file. In that case, you can change your pom port parameter or run aem on the same port mentioned in your file or use a different profile where you can pass the port.
  • check the credentials configured in your pom file is the valid credentials of your running aem instance.

 

Regards,

Arpit Varshney

 

Avatar

Community Advisor

@danilo-delfio Agree with all the above replies, the issue "Connection Refused" clearly points out that Maven was not able to establish connection to the AEM instance. Do check the port number mentioned in the main pom.xml file under 

 

<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>

.......

</properties>

 

Thanks

Veena

Avatar

Level 1

also you can update your port 

<!--    <aem.port>4502</aem.port>-->   ----------> defualt 

<aem.port>4052</aem.port> ---------> currently active port