maven - Continuous Deployment: Tomcat: Connection Refused -


i trying setup continuous integration , deployment using jenkins, maven , tomcat. after configuring necessary thing getting error connection refused

any suggestion helpful:

following pom.xml file:

<project xmlns="http://maven.apache.org/pom/4.0.0" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance"     xsi:schemalocation="http://maven.apache.org/pom/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">     <modelversion>4.0.0</modelversion>     <groupid>com.in28minutes</groupid>     <artifactid>in28minutes-first-webapp</artifactid>     <version>0.0.1-snapshot</version>     <packaging>war</packaging>      <dependencies>         <dependency>             <groupid>javax</groupid>             <artifactid>javaee-web-api</artifactid>             <version>6.0</version>             <scope>provided</scope>         </dependency>          <dependency>             <groupid>org.springframework</groupid>             <artifactid>spring-webmvc</artifactid>             <version>4.2.2.release</version>         </dependency>      </dependencies>      <repositories>     <repository>       <id>repo1</id>       <name>project</name>       <url>https://github.com/sav89989/project</url>     </repository>       </repositories>      <profiles>     <profile>         <id>localhost:8080</id>         <activation>             <activebydefault>true</activebydefault>         </activation>         <properties>             <tomcat-server>localhost:8080</tomcat-server>             <tomcat-url>http://localhost:8080/manager/text</tomcat-url>         </properties>     </profile> </profiles>        <build>         <pluginmanagement>             <plugins>                  <plugin>                     <groupid>org.apache.maven.plugins</groupid>                     <artifactid>maven-compiler-plugin</artifactid>                     <version>3.2</version>                     <configuration>                         <verbose>true</verbose>                         <source>1.8</source>                         <target>1.8</target>                         <showwarnings>true</showwarnings>                     </configuration>                 </plugin>                   <plugin>                     <groupid>org.apache.tomcat.maven</groupid>                     <artifactid>tomcat7-maven-plugin</artifactid>                     <version>2.2</version>                     <configuration>                     <url>http://localhost:8080/manager/text</url>                     <path>webapp</path>                     <username>admin</username>                     <password>admin</password>                         <server>localhost:8080</server>                         <contextreloadable>true</contextreloadable>                     </configuration>                 </plugin>                  <plugin>                 <artifactid>maven-war-plugin</artifactid>                 <version>2.4</version>                 <configuration>                     <warsourcedirectory>webcontent</warsourcedirectory>                     <failonmissingwebxml>false</failonmissingwebxml>                 </configuration>             </plugin>               </plugins>         </pluginmanagement>     </build> </project> 

following tomcat-user.xml file:

<tomcat-users xmlns="http://tomcat.apache.org/xml"               xmlns:xsi="http://www.w3.org/2001/xmlschema-instance"               xsi:schemalocation="http://tomcat.apache.org/xml tomcat-users.xsd"               version="1.0">                 <role rolename="manager-gui"/>               <role rolename="manager-script"/>               <role rolename="manager-jmx"/>               <role rolename="manager-status"/>               <role rolename="admin-script"/>               <user username="admin" password="admin" roles="admin-script, manager-gui, manager-script, manager-jmx, manager-status"/>                <user username="admin" password="admin" roles="manager-script,manager-gui,admin-script"/>  </tomcat-users> 

following setting.xml file:

<servers>      <server>       <id>localhost:8080</id>       <username>admin</username>       <password>admin</password>     </server>  </servers> 

when run build job in jenkins return me following logs:

    started user admin building on master in workspace c:\users\john\.jenkins\workspace\first7steps  > git.exe rev-parse --is-inside-work-tree # timeout=10 fetching changes remote git repository  > git.exe config remote.origin.url https://github.com/sav19734/project.git # timeout=10 fetching upstream changes https://github.com/sav19734/project.git  > git.exe --version # timeout=10  > git.exe fetch --tags --progress https://github.com/sav19734/project.git +refs/heads/*:refs/remotes/origin/*  > git.exe rev-parse "refs/remotes/origin/master^{commit}" # timeout=10  > git.exe rev-parse "refs/remotes/origin/origin/master^{commit}" # timeout=10 checking out revision a3cd5e6d9a4d9302e60154343f6af772031658ce (refs/remotes/origin/master) commit message: "new fiels added"  > git.exe config core.sparsecheckout # timeout=10  > git.exe checkout -f a3cd5e6d9a4d9302e60154343f6af772031658ce  > git.exe rev-list a3cd5e6d9a4d9302e60154343f6af772031658ce # timeout=10 parsing poms established tcp socket on 60571 [first7steps] $ java -cp c:\users\john\.jenkins\plugins\maven-plugin\web-inf\lib\maven35-agent-1.11.jar;c:\users\john\.jenkins\tools\hudson.tasks.maven_maveninstallation\c_directory_apache-maven-3.5.0\boot\plexus-classworlds-2.5.2.jar;c:\users\john\.jenkins\tools\hudson.tasks.maven_maveninstallation\c_directory_apache-maven-3.5.0/conf/logging jenkins.maven3.agent.maven35main c:\users\john\.jenkins\tools\hudson.tasks.maven_maveninstallation\c_directory_apache-maven-3.5.0 c:\users\john\.jenkins\war\web-inf\lib\remoting-3.7.jar c:\users\john\.jenkins\plugins\maven-plugin\web-inf\lib\maven35-interceptor-1.11.jar c:\users\john\.jenkins\plugins\maven-plugin\web-inf\lib\maven3-interceptor-commons-1.11.jar 60571 <===[jenkins remoting capacity]===>channel started executing maven:  -b -f c:\users\john\.jenkins\workspace\first7steps\pom.xml tomcat7:deploy [info] scanning projects... [info]  [info] ------------------------------------------------------------------------ [info] building in28minutes-first-webapp 0.0.1-snapshot [info] ------------------------------------------------------------------------ [info]  [info] >>> tomcat7-maven-plugin:2.2:deploy (default-cli) > package @ in28minutes-first-webapp >>> [info]  [info] --- maven-resources-plugin:2.6:resources (default-resources) @ in28minutes-first-webapp --- [warning] using platform encoding (cp1252 actually) copy filtered resources, i.e. build platform dependent! [info] skip non existing resourcedirectory c:\users\john\.jenkins\workspace\first7steps\src\main\resources [info]  [info] --- maven-compiler-plugin:3.2:compile (default-compile) @ in28minutes-first-webapp --- [info] changes detected - recompiling module! [warning] file encoding has not been set, using platform encoding cp1252, i.e. build platform dependent! [info] compiling 2 source files c:\users\john\.jenkins\workspace\first7steps\target\classes [parsing started regularfileobject[c:\users\john\.jenkins\workspace\first7steps\src\main\java\webapp\loginservlet.java]] [parsing completed 62ms] [parsing started regularfileobject[c:\users\john\.jenkins\workspace\first7steps\src\main\java\webapp\loginservice.java]] [parsing completed 0ms] [search path source files: c:\users\john\.jenkins\workspace\first7steps\src\main\java,c:\users\john\.jenkins\workspace\first7steps\target\generated-sources\annotations] [search path class files: c:\program files (x86)\java\jre1.8.0_131\lib\resources.jar,c:\program files (x86)\java\jre1.8.0_131\lib\rt.jar,c:\program files (x86)\java\jre1.8.0_131\lib\sunrsasign.jar,c:\program files (x86)\java\jre1.8.0_131\lib\jsse.jar,c:\program files (x86)\java\jre1.8.0_131\lib\jce.jar,c:\program files (x86)\java\jre1.8.0_131\lib\charsets.jar,c:\program files (x86)\java\jre1.8.0_131\lib\jfr.jar,c:\program files (x86)\java\jre1.8.0_131\classes,c:\program files (x86)\java\jre1.8.0_131\lib\ext\access-bridge-32.jar,c:\program files (x86)\java\jre1.8.0_131\lib\ext\cldrdata.jar,c:\program files (x86)\java\jre1.8.0_131\lib\ext\dnsns.jar,c:\program files (x86)\java\jre1.8.0_131\lib\ext\jaccess.jar,c:\program files (x86)\java\jre1.8.0_131\lib\ext\jfxrt.jar,c:\program files (x86)\java\jre1.8.0_131\lib\ext\localedata.jar,c:\program files (x86)\java\jre1.8.0_131\lib\ext\nashorn.jar,c:\program files (x86)\java\jre1.8.0_131\lib\ext\sunec.jar,c:\program files (x86)\java\jre1.8.0_131\lib\ext\sunjce_provider.jar,c:\program files (x86)\java\jre1.8.0_131\lib\ext\sunmscapi.jar,c:\program files (x86)\java\jre1.8.0_131\lib\ext\sunpkcs11.jar,c:\program files (x86)\java\jre1.8.0_131\lib\ext\zipfs.jar,c:\users\john\.jenkins\workspace\first7steps\target\classes,c:\users\john\.m2\repository\javax\javaee-web-api\6.0\javaee-web-api-6.0.jar,.] [loading zipfileindexfileobject[c:\program files (x86)\java\jre1.8.0_131\lib\rt.jar(java/io/ioexception.class)]] [loading zipfileindexfileobject[c:\users\john\.m2\repository\javax\javaee-web-api\6.0\javaee-web-api-6.0.jar(javax/servlet/servletexception.class)]] [loading zipfileindexfileobject[c:\users\john\.m2\repository\javax\javaee-web-api\6.0\javaee-web-api-6.0.jar(javax/servlet/annotation/webservlet.class)]] [loading zipfileindexfileobject[c:\users\john\.m2\repository\javax\javaee-web-api\6.0\javaee-web-api-6.0.jar(javax/servlet/http/httpservlet.class)]] [loading zipfileindexfileobject[c:\users\john\.m2\repository\javax\javaee-web-api\6.0\javaee-web-api-6.0.jar(javax/servlet/http/httpservletrequest.class)]] [loading zipfileindexfileobject[c:\users\john\.m2\repository\javax\javaee-web-api\6.0\javaee-web-api-6.0.jar(javax/servlet/http/httpservletresponse.class)]] [loading zipfileindexfileobject[c:\program files (x86)\java\jre1.8.0_131\lib\rt.jar(java/io/serializable.class)]] [loading zipfileindexfileobject[c:\program files (x86)\java\jre1.8.0_131\lib\rt.jar(java/lang/object.class)]] [loading zipfileindexfileobject[c:\users\john\.m2\repository\javax\javaee-web-api\6.0\javaee-web-api-6.0.jar(javax/servlet/genericservlet.class)]] [loading zipfileindexfileobject[c:\users\john\.m2\repository\javax\javaee-web-api\6.0\javaee-web-api-6.0.jar(javax/servlet/servlet.class)]] [loading zipfileindexfileobject[c:\users\john\.m2\repository\javax\javaee-web-api\6.0\javaee-web-api-6.0.jar(javax/servlet/servletconfig.class)]] [loading zipfileindexfileobject[c:\program files (x86)\java\jre1.8.0_131\lib\rt.jar(java/lang/string.class)]] [loading zipfileindexfileobject[c:\program files (x86)\java\jre1.8.0_131\lib\rt.jar(java/lang/annotation/target.class)]] [loading zipfileindexfileobject[c:\program files (x86)\java\jre1.8.0_131\lib\rt.jar(java/lang/annotation/elementtype.class)]] [loading zipfileindexfileobject[c:\program files (x86)\java\jre1.8.0_131\lib\rt.jar(java/lang/annotation/retention.class)]] [loading zipfileindexfileobject[c:\program files (x86)\java\jre1.8.0_131\lib\rt.jar(java/lang/annotation/retentionpolicy.class)]] [loading zipfileindexfileobject[c:\program files (x86)\java\jre1.8.0_131\lib\rt.jar(java/lang/annotation/annotation.class)]] [loading zipfileindexfileobject[c:\program files (x86)\java\jre1.8.0_131\lib\rt.jar(java/lang/override.class)]] [checking webapp.loginservlet] [loading zipfileindexfileobject[c:\program files (x86)\java\jre1.8.0_131\lib\rt.jar(java/util/enumeration.class)]] [loading zipfileindexfileobject[c:\program files (x86)\java\jre1.8.0_131\lib\rt.jar(java/lang/error.class)]] [loading zipfileindexfileobject[c:\program files (x86)\java\jre1.8.0_131\lib\rt.jar(java/lang/exception.class)]] [loading zipfileindexfileobject[c:\program files (x86)\java\jre1.8.0_131\lib\rt.jar(java/lang/throwable.class)]] [loading zipfileindexfileobject[c:\program files (x86)\java\jre1.8.0_131\lib\rt.jar(java/lang/runtimeexception.class)]] [loading zipfileindexfileobject[c:\program files (x86)\java\jre1.8.0_131\lib\rt.jar(java/lang/autocloseable.class)]] [loading zipfileindexfileobject[c:\program files (x86)\java\jre1.8.0_131\lib\rt.jar(java/lang/byte.class)]] [loading zipfileindexfileobject[c:\program files (x86)\java\jre1.8.0_131\lib\rt.jar(java/lang/character.class)]] [loading zipfileindexfileobject[c:\program files (x86)\java\jre1.8.0_131\lib\rt.jar(java/lang/short.class)]] [loading zipfileindexfileobject[c:\program files (x86)\java\jre1.8.0_131\lib\rt.jar(java/lang/long.class)]] [loading zipfileindexfileobject[c:\program files (x86)\java\jre1.8.0_131\lib\rt.jar(java/lang/float.class)]] [loading zipfileindexfileobject[c:\program files (x86)\java\jre1.8.0_131\lib\rt.jar(java/lang/integer.class)]] [loading zipfileindexfileobject[c:\program files (x86)\java\jre1.8.0_131\lib\rt.jar(java/lang/double.class)]] [loading zipfileindexfileobject[c:\program files (x86)\java\jre1.8.0_131\lib\rt.jar(java/lang/boolean.class)]] [loading zipfileindexfileobject[c:\program files (x86)\java\jre1.8.0_131\lib\rt.jar(java/lang/void.class)]] [loading zipfileindexfileobject[c:\users\john\.m2\repository\javax\javaee-web-api\6.0\javaee-web-api-6.0.jar(javax/servlet/servletrequest.class)]] [loading zipfileindexfileobject[c:\users\john\.m2\repository\javax\javaee-web-api\6.0\javaee-web-api-6.0.jar(javax/servlet/requestdispatcher.class)]] [loading zipfileindexfileobject[c:\users\john\.m2\repository\javax\javaee-web-api\6.0\javaee-web-api-6.0.jar(javax/servlet/servletresponse.class)]] [wrote regularfileobject[c:\users\john\.jenkins\workspace\first7steps\target\classes\webapp\loginservlet.class]] [checking webapp.loginservice] [loading zipfileindexfileobject[c:\program files (x86)\java\jre1.8.0_131\lib\rt.jar(java/lang/comparable.class)]] [loading zipfileindexfileobject[c:\program files (x86)\java\jre1.8.0_131\lib\rt.jar(java/lang/charsequence.class)]] [wrote regularfileobject[c:\users\john\.jenkins\workspace\first7steps\target\classes\webapp\loginservice.class]] [total 297ms] [info]  [info] --- maven-resources-plugin:2.6:testresources (default-testresources) @ in28minutes-first-webapp --- [warning] using platform encoding (cp1252 actually) copy filtered resources, i.e. build platform dependent! [info] skip non existing resourcedirectory c:\users\john\.jenkins\workspace\first7steps\src\test\resources [info]  [info] --- maven-compiler-plugin:3.2:testcompile (default-testcompile) @ in28minutes-first-webapp --- [info] no sources compile [info]  [info] --- maven-surefire-plugin:2.12.4:test (default-test) @ in28minutes-first-webapp --- [info] no tests run. [jenkins] recording test results [info]  [info] --- maven-war-plugin:2.2:war (default-war) @ in28minutes-first-webapp --- [info] packaging webapp [info] assembling webapp [in28minutes-first-webapp] in [c:\users\john\.jenkins\workspace\first7steps\target\in28minutes-first-webapp-0.0.1-snapshot] [info] processing war project [info] copying webapp resources [c:\users\john\.jenkins\workspace\first7steps\src\main\webapp] [info] webapp assembled in [68 msecs] [info] building war: c:\users\john\.jenkins\workspace\first7steps\target\in28minutes-first-webapp-0.0.1-snapshot.war [info] web-inf\web.xml added, skipping [warning] failed getclass org.apache.tomcat.maven.plugin.tomcat7.deploy.deploymojo [info]  [info] <<< tomcat7-maven-plugin:2.2:deploy (default-cli) < package @ in28minutes-first-webapp <<< [info]  [info]  [info] --- tomcat7-maven-plugin:2.2:deploy (default-cli) @ in28minutes-first-webapp --- [info] deploying war http://localhost:8080/   [info] ------------------------------------------------------------------------ [info] build failure [info] ------------------------------------------------------------------------ [info] total time: 5.692 s [info] finished at: 2017-07-25t17:55:17-04:00 [info] final memory: 21m/49m [info] ------------------------------------------------------------------------ [error] failed execute goal org.apache.tomcat.maven:tomcat7-maven-plugin:2.2:deploy (default-cli) on project in28minutes-first-webapp: cannot invoke tomcat manager: connection refused: connect -> [help 1] [error]  [error] see full stack trace of errors, re-run maven -e switch. [error] re-run maven using -x switch enable full debug logging. [error]  [jenkins] archiving c:\users\john\.jenkins\workspace\first7steps\pom.xml com.in28minutes/in28minutes-first-webapp/0.0.1-snapshot/in28minutes-first-webapp-0.0.1-snapshot.pom [error] more information errors , possible solutions, please read following articles: [error] [help 1] http://cwiki.apache.org/confluence/display/maven/mojoexecutionexception channel stopped [first7steps] $ cmd.exe /c "c:\users\john\.jenkins\tools\hudson.tasks.maven_maveninstallation\c_directory_apache-maven-3.5.0\bin\mvn.cmd tomcat7:redeploy && exit %%errorlevel%%" [info] scanning projects... [info]  [info] ------------------------------------------------------------------------ [info] building in28minutes-first-webapp 0.0.1-snapshot [info] ------------------------------------------------------------------------ [info]  [info] >>> tomcat7-maven-plugin:2.2:redeploy (default-cli) > package @ in28minutes-first-webapp >>> [info]  [info] --- maven-resources-plugin:2.6:resources (default-resources) @ in28minutes-first-webapp --- [warning] using platform encoding (cp1252 actually) copy filtered resources, i.e. build platform dependent! [info] skip non existing resourcedirectory c:\users\john\.jenkins\workspace\first7steps\src\main\resources [info]  [info] --- maven-compiler-plugin:3.2:compile (default-compile) @ in28minutes-first-webapp --- [info] nothing compile - classes date [info]  [info] --- maven-resources-plugin:2.6:testresources (default-testresources) @ in28minutes-first-webapp --- [warning] using platform encoding (cp1252 actually) copy filtered resources, i.e. build platform dependent! [info] skip non existing resourcedirectory c:\users\john\.jenkins\workspace\first7steps\src\test\resources [info]  [info] --- maven-compiler-plugin:3.2:testcompile (default-testcompile) @ in28minutes-first-webapp --- [info] no sources compile [info]  [info] --- maven-surefire-plugin:2.12.4:test (default-test) @ in28minutes-first-webapp --- [info] no tests run. [info]  [info] --- maven-war-plugin:2.2:war (default-war) @ in28minutes-first-webapp --- [info] packaging webapp [info] assembling webapp [in28minutes-first-webapp] in [c:\users\john\.jenkins\workspace\first7steps\target\in28minutes-first-webapp-0.0.1-snapshot] [info] processing war project [info] copying webapp resources [c:\users\john\.jenkins\workspace\first7steps\src\main\webapp] [info] webapp assembled in [62 msecs] [info] building war: c:\users\john\.jenkins\workspace\first7steps\target\in28minutes-first-webapp-0.0.1-snapshot.war [info] web-inf\web.xml added, skipping [info]  [info] <<< tomcat7-maven-plugin:2.2:redeploy (default-cli) < package @ in28minutes-first-webapp <<< [info]  [info]  [info] --- tomcat7-maven-plugin:2.2:redeploy (default-cli) @ in28minutes-first-webapp --- [info] deploying war http://localhost:8080/   [info] ------------------------------------------------------------------------ [info] build failure [info] ------------------------------------------------------------------------ [info] total time: 5.326 s [info] finished at: 2017-07-25t17:55:24-04:00 [info] final memory: 16m/197m [info] ------------------------------------------------------------------------ [error] failed execute goal org.apache.tomcat.maven:tomcat7-maven-plugin:2.2:redeploy (default-cli) on project in28minutes-first-webapp: cannot invoke tomcat manager: connection refused: connect -> [help 1] [error]  [error] see full stack trace of errors, re-run maven -e switch. [error] re-run maven using -x switch enable full debug logging. [error]  [error] more information errors , possible solutions, please read following articles: [error] [help 1] http://cwiki.apache.org/confluence/display/maven/mojoexecutionexception build step 'invoke top-level maven targets' marked build failure finished: failure 

have tried replacing tomcat url "http://localhost:8080/manager/html" 'text' 'html'. may try this, can solve issue , check whether tomcat running.


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -