Facing error while deploying artifacts on tomcat from Jenkins.
Can someone please suggest what needs to be changed in tomcat-users.xml & context.xml ?
Below is the error,
ERROR: Build step failed with exception
org.codehaus.cargo.container.ContainerException: Failed to redeploy
[/var/lib/jenkins/workspace/taxi-booking-app/taxi-booking/target/taxi-booking-1.0.1.war]
at PluginClassLoader for
deploy//org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.redeploy(AbstractTomcatManagerDeployer.java:176)
at PluginClassLoader for
deploy//hudson.plugins.deploy.CargoContainerAdapter.deploy(CargoContainerAdapter.java:81)
at PluginClassLoader for
deploy//hudson.plugins.deploy.CargoContainerAdapter$DeployCallable.invoke(CargoContainerAdapter.java:167)
at PluginClassLoader for
deploy//hudson.plugins.deploy.CargoContainerAdapter$DeployCallable.invoke(CargoContainerAdapter.java:136)
at hudson.FilePath.act(FilePath.java:1235) at
hudson.FilePath.act(FilePath.java:1218) at PluginClassLoader for
deploy//hudson.plugins.deploy.CargoContainerAdapter.redeployFile(CargoContainerAdapter.java:133)
at PluginClassLoader for
deploy//hudson.plugins.deploy.PasswordProtectedAdapterCargo.redeployFile(PasswordProtectedAdapterCargo.java:95)
at PluginClassLoader for
deploy//hudson.plugins.deploy.DeployPublisher.perform(DeployPublisher.java:113)
at jenkins.tasks.SimpleBuildStep.perform(SimpleBuildStep.java:123)
at
hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:80)
at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:47)
at
hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:818)
at
hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:767)
at PluginClassLoader for
maven-plugin//hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.post2(MavenModuleSetBuild.java:1072)
at
hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:711)
at hudson.model.Run.execute(Run.java:1917) at PluginClassLoader for
maven-plugin//hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:543)
at
hudson.model.ResourceController.execute(ResourceController.java:101)
at hudson.model.Executor.run(Executor.java:446) Caused by:
org.codehaus.cargo.container.tomcat.internal.TomcatManagerException:
The username you provided is not allowed to use the text-based Tomcat
Manager (error 403) at PluginClassLoader for
deploy//org.codehaus.cargo.container.tomcat.internal.TomcatManager.invoke(TomcatManager.java:710)
at PluginClassLoader for
deploy//org.codehaus.cargo.container.tomcat.internal.TomcatManager.list(TomcatManager.java:882)
at PluginClassLoader for
deploy//org.codehaus.cargo.container.tomcat.internal.TomcatManager.getStatus(TomcatManager.java:895)
at PluginClassLoader for
deploy//org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.redeploy(AbstractTomcatManagerDeployer.java:161)
… 19 more Caused by: java.io.IOException: Server returned HTTP
response code: 403 for URL:
http://13.232.70.117:8080/manager/text/list at
java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1945)
at
java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1541)
at PluginClassLoader for
deploy//org.codehaus.cargo.container.tomcat.internal.TomcatManager.invoke(TomcatManager.java:577)
… 22 more
org.codehaus.cargo.container.tomcat.internal.TomcatManagerException:
The username you provided is not allowed to use the text-based Tomcat
Manager (error 403)
Thanks,
Piyush