Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Maven clean install unauthorized error

Avatar

Avatar
Validate 1
Level 2
rajnishkaushik
Level 2

Likes

7 likes

Total Posts

14 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
View profile

Avatar
Validate 1
Level 2
rajnishkaushik
Level 2

Likes

7 likes

Total Posts

14 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
View profile
rajnishkaushik
Level 2

15-12-2017

When running the maven clean install command:

mvn clean install -PautoInstallPackage -Daem.host=remoteserver -Daem.port=4502 -Dsling.user=admin -Dsling.password=<password>

I am getting:

[DEBUG] Authorization required

[DEBUG] Supported authentication schemes in the order of preference: [ntlm, digest, basic]

[DEBUG] Challenge for ntlm authentication scheme not available

[DEBUG] Challenge for digest authentication scheme not available

[INFO] basic authentication scheme selected

[DEBUG] Using authentication scheme: basic

[DEBUG] Authorization challenge processed

[DEBUG] Authentication scope: BASIC 'Sling (Development)'@remoteserver:4502

[DEBUG] Credentials required

[DEBUG] Credentials provider not available

[INFO] Failure authenticating with BASIC 'Sling (Development)'@remoteserver:4502

[ERROR] Request to http://remoteserver:4502/crx/packmgr/service.jsp failed, response=Unauthorized

[DEBUG] Should close connection in response to directive: close

[DEBUG] Releasing connection back to connection manager.

Surprisingly the curl call to the same server, with exact same credentials is successful:

curl -u admin:<password> http://remoteserver:4502/crx/packmgr/service.jsp?cmd=ls

I tried to find the logs in error.log, access.log, and request.log for either calls, but AEM does not seem to be keeping the logs for call to /crx/packmgr/service.jsp

Is there anyway, I can setup the AEM to log the calls to /crx/packmgr/service.jsp?

Thanks you very much for looking at my question. Would greatly appreciate a suggestion.

Accepted Solutions (0)

Answers (8)

Answers (8)

Avatar

Avatar
Give Back 5
Employee
abhishekagg19
Employee

Likes

8 likes

Total Posts

33 posts

Correct Reply

5 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back
Boost 5
Boost 3
View profile

Avatar
Give Back 5
Employee
abhishekagg19
Employee

Likes

8 likes

Total Posts

33 posts

Correct Reply

5 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back
Boost 5
Boost 3
View profile
abhishekagg19
Employee

15-12-2017

Have you checked this thread - Request to http://localhost:4502/crx/packmgr/service.jsp failed, response=Unauthorized

Not sure if your pom file are customized after Archetype generation.

Avatar

Avatar
Validate 1
Level 2
rajnishkaushik
Level 2

Likes

7 likes

Total Posts

14 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
View profile

Avatar
Validate 1
Level 2
rajnishkaushik
Level 2

Likes

7 likes

Total Posts

14 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
View profile
rajnishkaushik
Level 2

15-12-2017

Praveen- It is default pom.xml with default host, port, user, and password. However, since I am using

mvn clean install -PautoInstallPackage -Daem.host=remoteserver -Daem.port=4502 -Dsling.user=admin -Dsling.password=<password>

the default credentials would be overridden.

Avatar

Avatar
Validate 1
Level 2
rajnishkaushik
Level 2

Likes

7 likes

Total Posts

14 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
View profile

Avatar
Validate 1
Level 2
rajnishkaushik
Level 2

Likes

7 likes

Total Posts

14 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
View profile
rajnishkaushik
Level 2

15-12-2017

Abhishek- The pom.xml properties are default properties as created by the maven archetype 10. Kindly seem my other post

Avatar

Avatar
Validate 1
Level 2
rajnishkaushik
Level 2

Likes

7 likes

Total Posts

14 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
View profile

Avatar
Validate 1
Level 2
rajnishkaushik
Level 2

Likes

7 likes

Total Posts

14 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
View profile
rajnishkaushik
Level 2

15-12-2017

Scott-

Locally, it works perfectly well. No errors when executing:

mvn -PautoInstallPackage install

It even works well on the AEM instance that is on another VM on local network

Avatar

Avatar
Validate 1
Level 2
rajnishkaushik
Level 2

Likes

7 likes

Total Posts

14 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
View profile

Avatar
Validate 1
Level 2
rajnishkaushik
Level 2

Likes

7 likes

Total Posts

14 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
View profile
rajnishkaushik
Level 2

15-12-2017

Scott- the mvn -PautoInstallPackage install completes with success

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

Avatar

Avatar
Give Back 5
Employee
abhishekagg19
Employee

Likes

8 likes

Total Posts

33 posts

Correct Reply

5 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back
Boost 5
Boost 3
View profile

Avatar
Give Back 5
Employee
abhishekagg19
Employee

Likes

8 likes

Total Posts

33 posts

Correct Reply

5 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back
Boost 5
Boost 3
View profile
abhishekagg19
Employee

15-12-2017

Hi,

Please verify following properties are defined in your POM file:

aem.host

aem.port

sling.user

sling.password

Also check targetURL is properly defined under content-package-maven-plugin in autoInstallPackage profile

Avatar

Avatar
Validate 1
Level 10
edubey
Level 10

Likes

273 likes

Total Posts

1,502 posts

Correct Reply

392 solutions
Top badges earned
Validate 1
Give Back 50
Give Back 5
Give Back 3
Give Back 25
View profile

Avatar
Validate 1
Level 10
edubey
Level 10

Likes

273 likes

Total Posts

1,502 posts

Correct Reply

392 solutions
Top badges earned
Validate 1
Give Back 50
Give Back 5
Give Back 3
Give Back 25
View profile
edubey
Level 10

15-12-2017

can you share properties defined in pom.xml for host/credentials

I mean you can surely hide host name and password but I wanted to look at the property names

Avatar

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,406 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,406 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile
smacdonald2008
Level 10

15-12-2017

WHen you run this command from the same machine - does it work?

mvn -PautoInstallPackage install