Open mansingh opened 9 years ago
We have also tried passing the credentials explicitly in the plugin as http://admin:admin@xxxxx:4503/. But, even this doesn't seem to work.
In Publish, can you log in via the browser by using the CRX/de login widget? The Jenkins plugin doesn't use basic auth like you would with curl. It logs in via POST to /crx/j_security_check to establish a login-token cookie, in the same way your browser does when logging in to CRX/de lite.
Actually, no. I am unable to login as of now to the CRX/de. And you might be right !! I tried to validate the same by sending a POST request from the Jenkins server for installing a bundle to the publisher. And I received a http response as "302 Found", which is exactly what you are mentioning.
However, it does work for Author and am also able to access the Author CRX/de via browser.
The POST does not obviously...
We're also experiencing the same issue/confusion. Tried both credentials provided via Credentials plugin, and also using passing credentials as http://admin:admin@... Note that this is also on AEM 6.0, which may or may not be relevant.
Apologies, this instead turned out to be infrastructure configuration issues. The "Failed to deploy package: Failed to login with provided credentials" threw me. If this is a generic connection related message, then it'd be useful to have more detailed error feedback.
Really nice plugin - fits our requirements perfectly.
Hey Mark,
I am also getting an error from the plugin. In my case it is :
Deploying packages to http://x.x.x.x:4502 FATAL: Failed to deploy package: Failed to login to http://x.x.x.x:4502 java.io.IOException: Failed to login to http://x.x.x.x:4502 at org.jenkinsci.plugins.graniteclient.GraniteClientExecutor.execute(GraniteClientExecutor.java:89) at org.jenkinsci.plugins.graniteclient.DeployPackageCallable.invoke(DeployPackageCallable.java:128) at org.jenkinsci.plugins.graniteclient.DeployPackageCallable.invoke(DeployPackageCallable.java:47) at hudson.FilePath.act(FilePath.java:991) at hudson.FilePath.act(FilePath.java:969) at org.jenkinsci.plugins.graniteclient.DeployPackagesBuilder.perform(DeployPackagesBuilder.java:286) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779) at hudson.model.Build$BuildExecution.build(Build.java:205) at hudson.model.Build$BuildExecution.doRun(Build.java:162) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:537) at hudson.model.Run.execute(Run.java:1744) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:374) Build step 'Deploy Content Packages to CRX' changed build result to FAILURE Build step 'Deploy Content Packages to CRX' marked build as failure Finished: FAILURE
Environment details :-
AEM version : 6.0.x Jenkins version: 1.620 Plugin Version: 1.3.2 (latest) Jenkins OS: RHEL 6
The Jenkins server I am running the job from is on the local Lan not behind a proxy or AFAIK firewall rules that would prevent outbound connections (the AEM instance I testing with here is running on my local desktop). From the Jenkins server I can telnet to the IP and port successfully. I can also run other Jenkins jobs containing either curl requests or using the HTTP_Request plugin to the same AEM address and they too are successful (so it doesn't seem like a anything is blocking the traffic).
I am using the standard admin:admin credentials and have tried both with specific Jenkins credentials config and including them in the URL (same result). I did also set up and use another AEM admin account (same result)
I installed a Jenkins master locally on the SAME machine as AEM and in this case the plugin WORKS successfully with identical configuration !
Also on the LOCAL Jenkins (the one that works) I created a separate job to download a package. When configuring the job I did notice the connection to this URL when configuring the job (I put a TCP monitor on to forward to 4502 from 4555) :
POST //crx/j_security_check
However on the Jenkins box the one that does NOT (currently) work, I configured a similar download package job (pointing to the TCPMon port) but here I DON'T see the /j_security_check ?? which would indicate it either not getting off the box, reading from a local cache, or ... I don't know what. The job configuration page shows an error even before I attempt to run it :
Download Content Packages from CRX
Failed to login to http://x.x.x.x:4502 as admin
So ... totally stumped.
Any suggestions welcome.
Kind Regards
Fraser.
This is a little strange behavior.
On AEM 6.0, for deploying to Author its works fine. However, if we try deploying to Publisher we get to see the following exception:
Deploying packages to http://xxxxxxxxx:4503/ FATAL: Failed to deploy package: Failed to login with provided credentials java.io.IOException: Failed to login with provided credentials at net.adamcin.granite.client.packman.async.AsyncPackageManagerClient.login(AsyncPackageManagerClient.java:197) at org.jenkinsci.plugins.graniteclient.GraniteClientExecutor.doLoginPOST(GraniteClientExecutor.java:138) at org.jenkinsci.plugins.graniteclient.GraniteClientExecutor.doLogin(GraniteClientExecutor.java:103) at org.jenkinsci.plugins.graniteclient.GraniteClientExecutor.execute(GraniteClientExecutor.java:86) at org.jenkinsci.plugins.graniteclient.DeployPackageCallable.invoke(DeployPackageCallable.java:123) at org.jenkinsci.plugins.graniteclient.DeployPackageCallable.invoke(DeployPackageCallable.java:42) at hudson.FilePath.act(FilePath.java:989) at hudson.FilePath.act(FilePath.java:967) at org.jenkinsci.plugins.graniteclient.DeployPackagesBuilder.perform(DeployPackagesBuilder.java:273) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:770) at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.build(MavenModuleSetBuild.java:906) at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:857) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:533) at hudson.model.Run.execute(Run.java:1718) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:529) at hudson.model.ResourceController.execute(ResourceController.java:89) at hudson.model.Executor.run(Executor.java:240) Build step 'Deploy Content Packages to CRX' changed build result to FAILURE Build step 'Deploy Content Packages to CRX' marked build as failure
....... If we try to install the same package using CURL command with the default credentials of admin:admin, we receive success.
Not sure what credentials are getting passed.