'Error in Jenkins deployment :: [cargo.remote.username] [cargo.remote.password] properties are mandatory
I am amused to see this error suddenly appearing in a jenkins deployment jobs which was working more than few months. While I didn't change any tomcat configuration and the setup needed to build and move a war file
like tomcat-user setup was done long back and didnt see any issue there.
What could be the reason. If someone can provide insight.
20:52:11 ERROR: Build step failed with exception
20:52:11 org.codehaus.cargo.container.ContainerException: The [cargo.remote.username] and [cargo.remote.password] properties are mandatory and need to be defined in your configuration.
20:52:11 at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.createManager(AbstractTomcatManagerDeployer.java:318)
20:52:11 at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.getTomcatManager(AbstractTomcatManagerDeployer.java:83)
20:52:11 at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.redeploy(AbstractTomcatManagerDeployer.java:173)
20:52:11 at hudson.plugins.deploy.CargoContainerAdapter.deploy(CargoContainerAdapter.java:77)
Solution 1:[1]
Its my bad that I didn't see the configuration [username/password] in jenkins' for "Deploy war/ear to container" is muted.
Below image displays what has been missed
After setting correct username and password It is resolved.
Where to look for password:-> Path :- /apache-tomcat-7.0.39/conf/tomcat-users.xml Below line allows tomcatuser to depploy war file in webapps directory.
If this is not present in tomcat-users.xml then add one here, and verify if in unix/windows the user has proper access for file system of tomcat server.
Solution 2:[2]
If still have same issue ,please check Credentials key settings in Jenkins -> Configure Credentials -update Type select Jenkins credential provider
Solution 3:[3]
- add manager user in tomcat , if you already configured that ok , copy and save in notepad . enter image description here
- in Jenkins , in post build add tomcat version and in credential select Jenkins add/paste the tomcat username and password
here you need to select enter image description here
then save it now try to Build now it think it will works !
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Vishy Anand |
Solution 2 | Sree.Bh |
Solution 3 | Gajangi Sagar |