Cargo
  1. Cargo
  2. CARGO-984

Remote redeploy does not work for Tomcat 7

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.1.0
    • Fix Version/s: 1.1.1
    • Component/s: Documentation, Tomcat
    • Labels:
      None
    • Environment:
      Tomcat 7.0.14
      Windows XP SP3
      Maven 3
    • Complexity:
      Intermediate
    • Number of attachments :
      4

      Description

      mvn cargo:redeploy a WAR is not successfully deployed to a remote Tomcat 7.0.14 container. The result of execution is in attachment

      mvn cargo:deploy works very well

      Any suggestion?

      my configuration is :

       
      <plugin>
      	<groupId>org.codehaus.cargo</groupId>
      	<artifactId>cargo-maven2-plugin</artifactId>
      	<version>1.1.0</version>				  
      	<configuration>
      		<container>
      			<containerId>tomcat7x</containerId>
      			<type>remote</type>
      		</container>
      		<configuration>
      			<type>runtime</type>
      			<properties>
      				<cargo.remote.uri>http://192.168.13.218:8080/manager/html</cargo.remote.uri>
      				<cargo.remote.username>tomcat</cargo.remote.username>
      				<cargo.remote.password>tomcat</cargo.remote.password>
      			</properties>
      		</configuration>
      		<deployer>
      			<type>remote</type>
      			<deployables>
      				<deployable>
      					<groupId>com.company.insgl</groupId>
      					<artifactId>insgl-core</artifactId>		
      					<type>war</type>
      					<pingURL>http://192.168.13.218:8080/${project.name}</pingURL>
      					<pingTimeout>20000</pingTimeout>
      				</deployable>
      			</deployables>
      		</deployer>
      	</configuration>
      </plugin>
      
      
      1. output.log
        26 kB
        Sergiusz Kierat

        Activity

        Hide
        Savas Ali Tokmen added a comment -

        Can you please run with the -X option for the full stack trace?

        Also, does cargo:undeploy work?

        Show
        Savas Ali Tokmen added a comment - Can you please run with the -X option for the full stack trace? Also, does cargo:undeploy work?
        Sergiusz Kierat made changes -
        Field Original Value New Value
        Attachment undeploy.zip [ 55302 ]
        Attachment redeploy.zip [ 55303 ]
        Hide
        Sergiusz Kierat added a comment -

        The result of undeploy is the same. The full stack traces have been attached.

        IMO the issue is within TomcatManager.java and that condition

        if (!response.startsWith("OK -")) {
          throw new TomcatManagerException(response);
        }
        

        Am I right?

        Show
        Sergiusz Kierat added a comment - The result of undeploy is the same. The full stack traces have been attached. IMO the issue is within TomcatManager.java and that condition if (!response.startsWith("OK -")) { throw new TomcatManagerException(response); } Am I right?
        Hide
        Savas Ali Tokmen added a comment - - edited

        Is there a special reason why you have set cargo.remote.uri>http://localhost:8080/manager/html/ ?

        AFAIK, it should be http://localhost:8080/manager/ (without /html)

        Show
        Savas Ali Tokmen added a comment - - edited Is there a special reason why you have set cargo.remote.uri> http://localhost:8080/manager/html/ ? AFAIK, it should be http://localhost:8080/manager/ (without /html)
        Hide
        Savas Ali Tokmen added a comment -

        Updated the documentation on http://cargo.codehaus.org/Tomcat+7.x to avoid this mistake.

        Show
        Savas Ali Tokmen added a comment - Updated the documentation on http://cargo.codehaus.org/Tomcat+7.x to avoid this mistake.
        Savas Ali Tokmen made changes -
        Fix Version/s 1.1.1 [ 17246 ]
        Fix Version/s 1.2.0 [ 17088 ]
        Hide
        Sergiusz Kierat added a comment -

        Yes, I've set the link http://192.168.13.218:8080/manager/html/, because that one works for mvn cargo:deploy command. I changed the cargo.remote.uri as you suggest (see: redeploy2.zip), but there is still the problem with redeployment.

        Show
        Sergiusz Kierat added a comment - Yes, I've set the link http://192.168.13.218:8080/manager/html/ , because that one works for mvn cargo:deploy command. I changed the cargo.remote.uri as you suggest (see: redeploy2.zip), but there is still the problem with redeployment.
        Sergiusz Kierat made changes -
        Attachment redeploy2.zip [ 55329 ]
        Hide
        Savas Ali Tokmen added a comment -

        Sorry for the confusion, can you please try with it should be http://localhost:8080/manager/text

        Show
        Savas Ali Tokmen added a comment - Sorry for the confusion, can you please try with it should be http://localhost:8080/manager/text
        Hide
        Sergiusz Kierat added a comment - - edited

        Everything is working now. Thanks a lot for your assist. Please close the issue.

        Show
        Sergiusz Kierat added a comment - - edited Everything is working now. Thanks a lot for your assist. Please close the issue.
        Savas Ali Tokmen made changes -
        Component/s Documentation [ 11434 ]
        Hide
        Savas Ali Tokmen added a comment -

        Excellent, documentation is now updated with this information as well.

        Show
        Savas Ali Tokmen added a comment - Excellent, documentation is now updated with this information as well.
        Savas Ali Tokmen made changes -
        Status Open [ 1 ] Closed [ 6 ]
        Assignee Savas Ali Tokmen [ alitokmen ]
        Resolution Fixed [ 1 ]
        Savas Ali Tokmen made changes -
        Fix Version/s 1.2.0 [ 17088 ]

          People

          • Assignee:
            Savas Ali Tokmen
            Reporter:
            Sergiusz Kierat
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: