<p>It seems to be an issue with Tomcat URL you are using. Either you are using "HTTP" in deployment when server is expecting HTTPS or vice versa.</p>

<blockquote>
  <p>hudson.model.Executor.run(Executor.java:428) Caused by: javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?</p>
</blockquote>

<p>Have a look at this answer <a href="https://stackoverflow.com/questions/6532273/unrecognized-ssl-message-plaintext-connection-exception">unrecognized-ssl-message-plaintext-connection-exception</a></p>

CC BY-SA 4.0
2020-02-11T10:23:11.540Z
Thanks for the answer, you were right. It was the URL.
nakul s
CC BY-SA 4.0
2020-02-07T12:44:00.523Z
2020-02-07T12:44:00.523Z
haroon
<p>I have been trying to work on Jenkins and I'm able to Build the code but unable to deploy on to the Tomcat server. Have checked the users.xml file and </p>

<pre><code>Started by user nakul
Running as SYSTEM
Building in workspace /home/ubuntu/.jenkins/workspace/Development
using credential 1da4e373-a6ab-4c02-8231-6c3040786f0b
 &gt; git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 &gt; git config remote.origin.url https://github.com/nakul-crypto/maven.git # timeout=10
Fetching upstream changes from https://github.com/nakul-crypto/maven.git
 &gt; git --version # timeout=10
using GIT_ASKPASS to set credentials 
 &gt; git fetch --tags --progress -- https://github.com/nakul-crypto/maven.git +refs/heads/*:refs/remotes/origin/* # timeout=10
 &gt; git rev-parse refs/remotes/origin/master^{commit} # timeout=10
 &gt; git rev-parse refs/remotes/origin/origin/master^{commit} # timeout=10
Checking out Revision 7599ae0e083b03eb84d05b6606b3dc0df36b45f8 (refs/remotes/origin/master)
 &gt; git config core.sparsecheckout # timeout=10
 &gt; git checkout -f 7599ae0e083b03eb84d05b6606b3dc0df36b45f8 # timeout=10
Commit message: "maven"
 &gt; git rev-list --no-walk 7599ae0e083b03eb84d05b6606b3dc0df36b45f8 # timeout=10
[Development] $ mvn package
[[1;34mINFO[m] Scanning for projects...
[[1;33mWARNING[m] 
[[1;33mWARNING[m] Some problems were encountered while building the effective model for com.example.maven-project:server:jar:1.0-SNAPSHOT
[[1;33mWARNING[m] Reporting configuration should be done in &lt;reporting&gt; section, not in maven-site-plugin &lt;configuration&gt; as reportPlugins parameter.
[[1;33mWARNING[m] 
[[1;33mWARNING[m] Some problems were encountered while building the effective model for com.example.maven-project:webapp:war:1.0-SNAPSHOT
[[1;33mWARNING[m] Reporting configuration should be done in &lt;reporting&gt; section, not in maven-site-plugin &lt;configuration&gt; as reportPlugins parameter.
[[1;33mWARNING[m] 
[[1;33mWARNING[m] Some problems were encountered while building the effective model for com.example.maven-project:maven-project:pom:1.0-SNAPSHOT
[[1;33mWARNING[m] Reporting configuration should be done in &lt;reporting&gt; section, not in maven-site-plugin &lt;configuration&gt; as reportPlugins parameter. @ line 56, column 24
[[1;33mWARNING[m] 
[[1;33mWARNING[m] It is highly recommended to fix these problems because they threaten the stability of your build.
[[1;33mWARNING[m] 
[[1;33mWARNING[m] For this reason, future Maven versions might no longer support building such malformed projects.
[[1;33mWARNING[m] 
[[1;33mWARNING[m] The project com.example.maven-project:maven-project:pom:1.0-SNAPSHOT uses prerequisites which is only intended for maven-plugin projects but not for non maven-plugin projects. For such purposes you should use the maven-enforcer-plugin. See https://maven.apache.org/enforcer/enforcer-rules/requireMavenVersion.html
[[1;34mINFO[m] [1m------------------------------------------------------------------------[m
[[1;34mINFO[m] [1mReactor Build Order:[m
[[1;34mINFO[m] 
[[1;34mINFO[m] Maven Project                                                      [pom]
[[1;34mINFO[m] Server                                                             [jar]
[[1;34mINFO[m] Webapp                                                             [war]
[[1;34mINFO[m] 
[[1;34mINFO[m] [1m--------------&lt; [0;36mcom.example.maven-project:maven-project[0;1m &gt;---------------[m
[[1;34mINFO[m] [1mBuilding Maven Project 1.0-SNAPSHOT                                [1/3][m
[[1;34mINFO[m] [1m--------------------------------[ pom ]---------------------------------[m
[[1;34mINFO[m] 
[[1;34mINFO[m] [1m------------------&lt; [0;36mcom.example.maven-project:server[0;1m &gt;------------------[m
[[1;34mINFO[m] [1mBuilding Server 1.0-SNAPSHOT                                       [2/3][m
[[1;34mINFO[m] [1m--------------------------------[ jar ]---------------------------------[m
[[1;34mINFO[m] 
[[1;34mINFO[m] [1m--- [0;32mmaven-resources-plugin:2.5:resources[m [1m(default-resources)[m @ [36mserver[0;1m ---[m
[debug] execute contextualize
[[1;34mINFO[m] Using 'utf-8' encoding to copy filtered resources.
[[1;34mINFO[m] skip non existing resourceDirectory /home/ubuntu/.jenkins/workspace/Development/server/src/main/resources
[[1;34mINFO[m] 
[[1;34mINFO[m] [1m--- [0;32mmaven-compiler-plugin:2.3.2:compile[m [1m(default-compile)[m @ [36mserver[0;1m ---[m
[[1;34mINFO[m] Nothing to compile - all classes are up to date
[[1;34mINFO[m] 
[[1;34mINFO[m] [1m--- [0;32mmaven-resources-plugin:2.5:testResources[m [1m(default-testResources)[m @ [36mserver[0;1m ---[m
[debug] execute contextualize
[[1;34mINFO[m] Using 'utf-8' encoding to copy filtered resources.
[[1;34mINFO[m] skip non existing resourceDirectory /home/ubuntu/.jenkins/workspace/Development/server/src/test/resources
[[1;34mINFO[m] 
[[1;34mINFO[m] [1m--- [0;32mmaven-compiler-plugin:2.3.2:testCompile[m [1m(default-testCompile)[m @ [36mserver[0;1m ---[m
[[1;34mINFO[m] Nothing to compile - all classes are up to date
[[1;34mINFO[m] 
[[1;34mINFO[m] [1m--- [0;32mmaven-surefire-plugin:2.11:test[m [1m(default-test)[m @ [36mserver[0;1m ---[m
[[1;34mINFO[m] Surefire report directory: /home/ubuntu/.jenkins/workspace/Development/server/target/surefire-reports

-------------------------------------------------------
 T E S T S
-------------------------------------------------------

Running com.example.TestGreeter
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.116 sec

Results :

Tests run: 2, Failures: 0, Errors: 0, Skipped: 0

[[1;34mINFO[m] 
[[1;34mINFO[m] [1m--- [0;32mmaven-jar-plugin:2.4:jar[m [1m(default-jar)[m @ [36mserver[0;1m ---[m
[[1;34mINFO[m] 
[[1;34mINFO[m] [1m------------------&lt; [0;36mcom.example.maven-project:webapp[0;1m &gt;------------------[m
[[1;34mINFO[m] [1mBuilding Webapp 1.0-SNAPSHOT                                       [3/3][m
[[1;34mINFO[m] [1m--------------------------------[ war ]---------------------------------[m
[[1;34mINFO[m] 
[[1;34mINFO[m] [1m--- [0;32mmaven-resources-plugin:2.5:resources[m [1m(default-resources)[m @ [36mwebapp[0;1m ---[m
[debug] execute contextualize
[[1;34mINFO[m] Using 'utf-8' encoding to copy filtered resources.
[[1;34mINFO[m] skip non existing resourceDirectory /home/ubuntu/.jenkins/workspace/Development/webapp/src/main/resources
[[1;34mINFO[m] 
[[1;34mINFO[m] [1m--- [0;32mmaven-compiler-plugin:2.3.2:compile[m [1m(default-compile)[m @ [36mwebapp[0;1m ---[m
[[1;34mINFO[m] No sources to compile
[[1;34mINFO[m] 
[[1;34mINFO[m] [1m--- [0;32mmaven-resources-plugin:2.5:testResources[m [1m(default-testResources)[m @ [36mwebapp[0;1m ---[m
[debug] execute contextualize
[[1;34mINFO[m] Using 'utf-8' encoding to copy filtered resources.
[[1;34mINFO[m] skip non existing resourceDirectory /home/ubuntu/.jenkins/workspace/Development/webapp/src/test/resources
[[1;34mINFO[m] 
[[1;34mINFO[m] [1m--- [0;32mmaven-compiler-plugin:2.3.2:testCompile[m [1m(default-testCompile)[m @ [36mwebapp[0;1m ---[m
[[1;34mINFO[m] No sources to compile
[[1;34mINFO[m] 
[[1;34mINFO[m] [1m--- [0;32mmaven-surefire-plugin:2.11:test[m [1m(default-test)[m @ [36mwebapp[0;1m ---[m
[[1;34mINFO[m] No tests to run.
[[1;34mINFO[m] Surefire report directory: /home/ubuntu/.jenkins/workspace/Development/webapp/target/surefire-reports

-------------------------------------------------------
 T E S T S
-------------------------------------------------------

Results :

Tests run: 0, Failures: 0, Errors: 0, Skipped: 0

[[1;34mINFO[m] 
[[1;34mINFO[m] [1m--- [0;32mmaven-war-plugin:2.2:war[m [1m(default-war)[m @ [36mwebapp[0;1m ---[m
[[1;34mINFO[m] Packaging webapp
[[1;34mINFO[m] Assembling webapp [webapp] in [/home/ubuntu/.jenkins/workspace/Development/webapp/target/webapp]
[[1;34mINFO[m] Processing war project
[[1;34mINFO[m] Copying webapp resources [/home/ubuntu/.jenkins/workspace/Development/webapp/src/main/webapp]
[[1;34mINFO[m] Webapp assembled in [33 msecs]
[[1;34mINFO[m] Building war: /home/ubuntu/.jenkins/workspace/Development/webapp/target/webapp.war
[[1;34mINFO[m] WEB-INF/web.xml already added, skipping
[[1;34mINFO[m] [1m------------------------------------------------------------------------[m
[[1;34mINFO[m] [1mReactor Summary for Maven Project 1.0-SNAPSHOT:[m
[[1;34mINFO[m] 
[[1;34mINFO[m] Maven Project ...................................... [1;32mSUCCESS[m [  0.010 s]
[[1;34mINFO[m] Server ............................................. [1;32mSUCCESS[m [  2.344 s]
[[1;34mINFO[m] Webapp ............................................. [1;32mSUCCESS[m [  0.776 s]
[[1;34mINFO[m] [1m------------------------------------------------------------------------[m
[[1;34mINFO[m] [1;32mBUILD SUCCESS[m
[[1;34mINFO[m] [1m------------------------------------------------------------------------[m
[[1;34mINFO[m] Total time:  3.453 s
[[1;34mINFO[m] Finished at: 2020-02-06T19:47:13Z
[[1;34mINFO[m] [1m------------------------------------------------------------------------[m
[DeployPublisher][INFO] Attempting to deploy 1 war file(s)
[DeployPublisher][INFO] Deploying /home/ubuntu/.jenkins/workspace/Development/webapp/target/webapp.war to container Tomcat 8.x Remote with context testapp
ERROR: Build step failed with exception
org.codehaus.cargo.container.ContainerException: Failed to redeploy [/home/ubuntu/.jenkins/workspace/Development/webapp/target/webapp.war]
    at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.redeploy(AbstractTomcatManagerDeployer.java:188)
    at hudson.plugins.deploy.CargoContainerAdapter.deploy(CargoContainerAdapter.java:81)
    at hudson.plugins.deploy.CargoContainerAdapter$DeployCallable.invoke(CargoContainerAdapter.java:167)
    at hudson.plugins.deploy.CargoContainerAdapter$DeployCallable.invoke(CargoContainerAdapter.java:136)
    at hudson.FilePath.act(FilePath.java:1075)
    at hudson.FilePath.act(FilePath.java:1058)
    at hudson.plugins.deploy.CargoContainerAdapter.redeployFile(CargoContainerAdapter.java:133)
    at hudson.plugins.deploy.PasswordProtectedAdapterCargo.redeployFile(PasswordProtectedAdapterCargo.java:95)
    at hudson.plugins.deploy.DeployPublisher.perform(DeployPublisher.java:113)
    at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:78)
    at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45)
    at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:741)
    at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:690)
    at hudson.model.Build$BuildExecution.post2(Build.java:186)
    at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:635)
    at hudson.model.Run.execute(Run.java:1878)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
    at hudson.model.ResourceController.execute(ResourceController.java:97)
    at hudson.model.Executor.run(Executor.java:428)
Caused by: javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
    at sun.security.ssl.InputRecord.handleUnknownRecord(InputRecord.java:710)
    at sun.security.ssl.InputRecord.read(InputRecord.java:527)
    at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:975)
    at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1367)
    at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1395)
    at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1379)
    at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:559)
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
    at sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:167)
    at org.codehaus.cargo.container.tomcat.internal.TomcatManager.invoke(TomcatManager.java:567)
    at org.codehaus.cargo.container.tomcat.internal.TomcatManager.list(TomcatManager.java:882)
    at org.codehaus.cargo.container.tomcat.internal.TomcatManager.getStatus(TomcatManager.java:895)
    at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.redeploy(AbstractTomcatManagerDeployer.java:169)
    ... 18 more
javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
    at sun.security.ssl.InputRecord.handleUnknownRecord(InputRecord.java:710)
    at sun.security.ssl.InputRecord.read(InputRecord.java:527)
    at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:975)
    at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1367)
    at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1395)
    at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1379)
    at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:559)
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
    at sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:167)
    at org.codehaus.cargo.container.tomcat.internal.TomcatManager.invoke(TomcatManager.java:567)
    at org.codehaus.cargo.container.tomcat.internal.TomcatManager.list(TomcatManager.java:882)
    at org.codehaus.cargo.container.tomcat.internal.TomcatManager.getStatus(TomcatManager.java:895)
    at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.redeploy(AbstractTomcatManagerDeployer.java:169)
    at hudson.plugins.deploy.CargoContainerAdapter.deploy(CargoContainerAdapter.java:81)
    at hudson.plugins.deploy.CargoContainerAdapter$DeployCallable.invoke(CargoContainerAdapter.java:167)
    at hudson.plugins.deploy.CargoContainerAdapter$DeployCallable.invoke(CargoContainerAdapter.java:136)
    at hudson.FilePath.act(FilePath.java:1075)
    at hudson.FilePath.act(FilePath.java:1058)
    at hudson.plugins.deploy.CargoContainerAdapter.redeployFile(CargoContainerAdapter.java:133)
    at hudson.plugins.deploy.PasswordProtectedAdapterCargo.redeployFile(PasswordProtectedAdapterCargo.java:95)
    at hudson.plugins.deploy.DeployPublisher.perform(DeployPublisher.java:113)
    at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:78)
    at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45)
    at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:741)
    at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:690)
    at hudson.model.Build$BuildExecution.post2(Build.java:186)
    at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:635)
    at hudson.model.Run.execute(Run.java:1878)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
    at hudson.model.ResourceController.execute(ResourceController.java:97)
    at hudson.model.Executor.run(Executor.java:428)
Build step 'Deploy war/ear to a container' marked build as failure
Finished: FAILURE
</code></pre>

<jenkins><git><jenkins-plugins><java><tomcat>
Jenkins-Deployment failure, Build successful
nakul s
# Jenkins-Deployment failure, Build successful

(Asked by: username_0 on 2020-02-06)

I have been trying to work on Jenkins and I'm able to Build the code but unable to deploy on to the Tomcat server. Have checked the users.xml file and 
Started by user nakul
Running as SYSTEM
Building in workspace /home/ubuntu/.jenkins/workspace/Development
using credential 1da4e373-a6ab-4c02-8231-6c3040786f0b
 > git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > git config remote.origin.url https://github.com/nakul-crypto/maven.git # timeout=10
Fetching upstream changes from https://github.com/nakul-crypto/maven.git
 > git --version # timeout=10
using GIT_ASKPASS to set credentials 
 > git fetch --tags --progress -- https://github.com/nakul-crypto/maven.git +refs/heads/*:refs/remotes/origin/* # timeout=10
 > git rev-parse refs/remotes/origin/master^{commit} # timeout=10
 > git rev-parse refs/remotes/origin/origin/master^{commit} # timeout=10
Checking out Revision 7599ae0e083b03eb84d05b6606b3dc0df36b45f8 (refs/remotes/origin/master)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f 7599ae0e083b03eb84d05b6606b3dc0df36b45f8 # timeout=10
Commit message: "maven"
 > git rev-list --no-walk 7599ae0e083b03eb84d05b6606b3dc0df36b45f8 # timeout=10
[Development] $ mvn package
[[1;34mINFO[m] Scanning for projects...
[[1;33mWARNING[m] 
[[1;33mWARNING[m] Some problems were encountered while building the effective model for com.example.maven-project:server:jar:1.0-SNAPSHOT
[[1;33mWARNING[m] Reporting configuration should be done in  section, not in maven-site-plugin  as reportPlugins parameter.
[[1;33mWARNING[m] 
[[1;33mWARNING[m] Some problems were encountered while building the effective model for com.example.maven-project:webapp:war:1.0-SNAPSHOT
[[1;33mWARNING[m] Reporting configuration should be done in  section, not in maven-site-plugin  as reportPlugins parameter.
[[1;33mWARNING[m] 
[[1;33mWARNING[m] Some problems were encountered while building the effective model for com.example.maven-project:maven-project:pom:1.0-SNAPSHOT
[[1;33mWARNING[m] Reporting configuration should be done in  section, not in maven-site-plugin  as reportPlugins parameter. @ line 56, column 24
[[1;33mWARNING[m] 
[[1;33mWARNING[m] It is highly recommended to fix these problems because they threaten the stability of your build.
[[1;33mWARNING[m] 
[[1;33mWARNING[m] For this reason, future Maven versions might no longer support building such malformed projects.
[[1;33mWARNING[m] 
[[1;33mWARNING[m] The project com.example.maven-project:maven-project:pom:1.0-SNAPSHOT uses prerequisites which is only intended for maven-plugin projects but not for non maven-plugin projects. For such purposes you should use the maven-enforcer-plugin. See https://maven.apache.org/enforcer/enforcer-rules/requireMavenVersion.html
[[1;34mINFO[m] [1m------------------------------------------------------------------------[m
[[1;34mINFO[m] [1mReactor Build Order:[m
[[1;34mINFO[m] 
[[1;34mINFO[m] Maven Project                                                      [pom]
[[1;34mINFO[m] Server                                                             [jar]
[[1;34mINFO[m] Webapp                                                             [war]
[[1;34mINFO[m] 
[[1;34mINFO[m] [1m--------------< [0;36mcom.example.maven-project:maven-project[0;1m >---------------[m
[[1;34mINFO[m] [1mBuilding Maven Project 1.0-SNAPSHOT                                [1/3][m
[[1;34mINFO[m] [1m--------------------------------[ pom ]---------------------------------[m
[[1;34mINFO[m] 
[[1;34mINFO[m] [1m------------------< [0;36mcom.example.maven-project:server[0;1m >------------------[m
[[1;34mINFO[m] [1mBuilding Server 1.0-SNAPSHOT                                       [2/3][m
[[1;34mINFO[m] [1m--------------------------------[ jar ]---------------------------------[m
[[1;34mINFO[m] 
[[1;34mINFO[m] [1m--- [0;32mmaven-resources-plugin:2.5:resources[m [1m(default-resources)[m @ [36mserver[0;1m ---[m
[debug] execute contextualize
[[1;34mINFO[m] Using 'utf-8' encoding to copy filtered resources.
[[1;34mINFO[m] skip non existing resourceDirectory /home/ubuntu/.jenkins/workspace/Development/server/src/main/resources
[[1;34mINFO[m] 
[[1;34mINFO[m] [1m--- [0;32mmaven-compiler-plugin:2.3.2:compile[m [1m(default-compile)[m @ [36mserver[0;1m ---[m
[[1;34mINFO[m] Nothing to compile - all classes are up to date
[[1;34mINFO[m] 
[[1;34mINFO[m] [1m--- [0;32mmaven-resources-plugin:2.5:testResources[m [1m(default-testResources)[m @ [36mserver[0;1m ---[m
[debug] execute contextualize
[[1;34mINFO[m] Using 'utf-8' encoding to copy filtered resources.
[[1;34mINFO[m] skip non existing resourceDirectory /home/ubuntu/.jenkins/workspace/Development/server/src/test/resources
[[1;34mINFO[m] 
[[1;34mINFO[m] [1m--- [0;32mmaven-compiler-plugin:2.3.2:testCompile[m [1m(default-testCompile)[m @ [36mserver[0;1m ---[m
[[1;34mINFO[m] Nothing to compile - all classes are up to date
[[1;34mINFO[m] 
[[1;34mINFO[m] [1m--- [0;32mmaven-surefire-plugin:2.11:test[m [1m(default-test)[m @ [36mserver[0;1m ---[m
[[1;34mINFO[m] Surefire report directory: /home/ubuntu/.jenkins/workspace/Development/server/target/surefire-reports

-------------------------------------------------------
 T E S T S
-------------------------------------------------------

Running com.example.TestGreeter
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.116 sec

Results :

Tests run: 2, Failures: 0, Errors: 0, Skipped: 0

[[1;34mINFO[m] 
[[1;34mINFO[m] [1m--- [0;32mmaven-jar-plugin:2.4:jar[m [1m(default-jar)[m @ [36mserver[0;1m ---[m
[[1;34mINFO[m] 
[[1;34mINFO[m] [1m------------------< [0;36mcom.example.maven-project:webapp[0;1m >------------------[m
[[1;34mINFO[m] [1mBuilding Webapp 1.0-SNAPSHOT                                       [3/3][m
[[1;34mINFO[m] [1m--------------------------------[ war ]---------------------------------[m
[[1;34mINFO[m] 
[[1;34mINFO[m] [1m--- [0;32mmaven-resources-plugin:2.5:resources[m [1m(default-resources)[m @ [36mwebapp[0;1m ---[m
[debug] execute contextualize
[[1;34mINFO[m] Using 'utf-8' encoding to copy filtered resources.
[[1;34mINFO[m] skip non existing resourceDirectory /home/ubuntu/.jenkins/workspace/Development/webapp/src/main/resources
[[1;34mINFO[m] 
[[1;34mINFO[m] [1m--- [0;32mmaven-compiler-plugin:2.3.2:compile[m [1m(default-compile)[m @ [36mwebapp[0;1m ---[m
[[1;34mINFO[m] No sources to compile
[[1;34mINFO[m] 
[[1;34mINFO[m] [1m--- [0;32mmaven-resources-plugin:2.5:testResources[m [1m(default-testResources)[m @ [36mwebapp[0;1m ---[m
[debug] execute contextualize
[[1;34mINFO[m] Using 'utf-8' encoding to copy filtered resources.
[[1;34mINFO[m] skip non existing resourceDirectory /home/ubuntu/.jenkins/workspace/Development/webapp/src/test/resources
[[1;34mINFO[m] 
[[1;34mINFO[m] [1m--- [0;32mmaven-compiler-plugin:2.3.2:testCompile[m [1m(default-testCompile)[m @ [36mwebapp[0;1m ---[m
[[1;34mINFO[m] No sources to compile
[[1;34mINFO[m] 
[[1;34mINFO[m] [1m--- [0;32mmaven-surefire-plugin:2.11:test[m [1m(default-test)[m @ [36mwebapp[0;1m ---[m
[[1;34mINFO[m] No tests to run.
[[1;34mINFO[m] Surefire report directory: /home/ubuntu/.jenkins/workspace/Development/webapp/target/surefire-reports

-------------------------------------------------------
 T E S T S
-------------------------------------------------------

Results :

Tests run: 0, Failures: 0, Errors: 0, Skipped: 0

[[1;34mINFO[m] 
[[1;34mINFO[m] [1m--- [0;32mmaven-war-plugin:2.2:war[m [1m(default-war)[m @ [36mwebapp[0;1m ---[m
[[1;34mINFO[m] Packaging webapp
[[1;34mINFO[m] Assembling webapp [webapp] in [/home/ubuntu/.jenkins/workspace/Development/webapp/target/webapp]
[[1;34mINFO[m] Processing war project
[[1;34mINFO[m] Copying webapp resources [/home/ubuntu/.jenkins/workspace/Development/webapp/src/main/webapp]
[[1;34mINFO[m] Webapp assembled in [33 msecs]
[[1;34mINFO[m] Building war: /home/ubuntu/.jenkins/workspace/Development/webapp/target/webapp.war
[[1;34mINFO[m] WEB-INF/web.xml already added, skipping
[[1;34mINFO[m] [1m------------------------------------------------------------------------[m
[[1;34mINFO[m] [1mReactor Summary for Maven Project 1.0-SNAPSHOT:[m
[[1;34mINFO[m] 
[[1;34mINFO[m] Maven Project ...................................... [1;32mSUCCESS[m [  0.010 s]
[[1;34mINFO[m] Server ............................................. [1;32mSUCCESS[m [  2.344 s]
[[1;34mINFO[m] Webapp ............................................. [1;32mSUCCESS[m [  0.776 s]
[[1;34mINFO[m] [1m------------------------------------------------------------------------[m
[[1;34mINFO[m] [1;32mBUILD SUCCESS[m
[[1;34mINFO[m] [1m------------------------------------------------------------------------[m
[[1;34mINFO[m] Total time:  3.453 s
[[1;34mINFO[m] Finished at: 2020-02-06T19:47:13Z
[[1;34mINFO[m] [1m------------------------------------------------------------------------[m
[DeployPublisher][INFO] Attempting to deploy 1 war file(s)
[DeployPublisher][INFO] Deploying /home/ubuntu/.jenkins/workspace/Development/webapp/target/webapp.war to container Tomcat 8.x Remote with context testapp
ERROR: Build step failed with exception
org.codehaus.cargo.container.ContainerException: Failed to redeploy [/home/ubuntu/.jenkins/workspace/Development/webapp/target/webapp.war]
    at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.redeploy(AbstractTomcatManagerDeployer.java:188)
    at hudson.plugins.deploy.CargoContainerAdapter.deploy(CargoContainerAdapter.java:81)
    at hudson.plugins.deploy.CargoContainerAdapter$DeployCallable.invoke(CargoContainerAdapter.java:167)
    at hudson.plugins.deploy.CargoContainerAdapter$DeployCallable.invoke(CargoContainerAdapter.java:136)
    at hudson.FilePath.act(FilePath.java:1075)
    at hudson.FilePath.act(FilePath.java:1058)
    at hudson.plugins.deploy.CargoContainerAdapter.redeployFile(CargoContainerAdapter.java:133)
    at hudson.plugins.deploy.PasswordProtectedAdapterCargo.redeployFile(PasswordProtectedAdapterCargo.java:95)
    at hudson.plugins.deploy.DeployPublisher.perform(DeployPublisher.java:113)
    at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:78)
    at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45)
    at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:741)
    at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:690)
    at hudson.model.Build$BuildExecution.post2(Build.java:186)
    at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:635)
    at hudson.model.Run.execute(Run.java:1878)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
    at hudson.model.ResourceController.execute(ResourceController.java:97)
    at hudson.model.Executor.run(Executor.java:428)
Caused by: javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
    at sun.security.ssl.InputRecord.handleUnknownRecord(InputRecord.java:710)
    at sun.security.ssl.InputRecord.read(InputRecord.java:527)
    at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:975)
    at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1367)
    at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1395)
    at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1379)
    at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:559)
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
    at sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:167)
    at org.codehaus.cargo.container.tomcat.internal.TomcatManager.invoke(TomcatManager.java:567)
    at org.codehaus.cargo.container.tomcat.internal.TomcatManager.list(TomcatManager.java:882)
    at org.codehaus.cargo.container.tomcat.internal.TomcatManager.getStatus(TomcatManager.java:895)
    at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.redeploy(AbstractTomcatManagerDeployer.java:169)
    ... 18 more
javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
    at sun.security.ssl.InputRecord.handleUnknownRecord(InputRecord.java:710)
    at sun.security.ssl.InputRecord.read(InputRecord.java:527)
    at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:975)
    at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1367)
    at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1395)
    at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1379)
    at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:559)
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
    at sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:167)
    at org.codehaus.cargo.container.tomcat.internal.TomcatManager.invoke(TomcatManager.java:567)
    at org.codehaus.cargo.container.tomcat.internal.TomcatManager.list(TomcatManager.java:882)
    at org.codehaus.cargo.container.tomcat.internal.TomcatManager.getStatus(TomcatManager.java:895)
    at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.redeploy(AbstractTomcatManagerDeployer.java:169)
    at hudson.plugins.deploy.CargoContainerAdapter.deploy(CargoContainerAdapter.java:81)
    at hudson.plugins.deploy.CargoContainerAdapter$DeployCallable.invoke(CargoContainerAdapter.java:167)
    at hudson.plugins.deploy.CargoContainerAdapter$DeployCallable.invoke(CargoContainerAdapter.java:136)
    at hudson.FilePath.act(FilePath.java:1075)
    at hudson.FilePath.act(FilePath.java:1058)
    at hudson.plugins.deploy.CargoContainerAdapter.redeployFile(CargoContainerAdapter.java:133)
    at hudson.plugins.deploy.PasswordProtectedAdapterCargo.redeployFile(PasswordProtectedAdapterCargo.java:95)
    at hudson.plugins.deploy.DeployPublisher.perform(DeployPublisher.java:113)
    at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:78)
    at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45)
    at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:741)
    at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:690)
    at hudson.model.Build$BuildExecution.post2(Build.java:186)
    at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:635)
    at hudson.model.Run.execute(Run.java:1878)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
    at hudson.model.ResourceController.execute(ResourceController.java:97)
    at hudson.model.Executor.run(Executor.java:428)
Build step 'Deploy war/ear to a container' marked build as failure
Finished: FAILURE

**Tags:** jenkins, git, jenkins-plugins, java, tomcat


---

## 1 answers

### Answer by username_1 on 2020-02-07. Score: 3

It seems to be an issue with Tomcat URL you are using. Either you are using "HTTP" in deployment when server is expecting HTTPS or vice versa.

> hudson.model.Executor.run(Executor.java:428) Caused by: javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?

Have a look at this answer [unrecognized-ssl-message-plaintext-connection-exception](https://stackoverflow.com/questions/6532273/unrecognized-ssl-message-plaintext-connection-exception)

> **Comments:**
> **username_0**: Thanks for the answer, you were right. It was the URL.  

---

