how to solve org.codehaus.cargo.container.ContainerException

9k Views Asked by At

whenever I up the application by through CMD it is getting up, but the same code if I run through eclipse, getting the below mentioned error...

[DEBUG] [URLDeployableMonitor] Checking URL [http://localhost:8080/cargocpc/index.html] for status using a timeout of [120000] ms...
[DEBUG] [URLDeployableMonitor] URL [http://localhost:8080/cargocpc/index.html] is not responding: 400 Cycle Detected
[DEBUG] [URLDeployableMonitor] Notifying monitor listener [org.codehaus.cargo.container.spi.deployer.DeployerWatchdog@a55f49]
[INFO] [yer.DeployerWatchdog] Deployable [http://localhost:8080/cargocpc/index.html] failed to finish deploying within the timeout period [120000]. The Deployable state is thus unknown.
[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to start the Tomcat 6.x container.
Deployable [http://localhost:8080/cargocpc/index.html] failed to finish deploying within the timeout period [120000]. The Deployable state is thus unknown.
[INFO] ------------------------------------------------------------------------
[DEBUG] Trace
org.codehaus.cargo.container.ContainerException: Failed to start the Tomcat 6.x container.
.
.
.
.

Caused by: org.codehaus.cargo.container.ContainerException: Deployable [http://localhost:8080/cargocpc/index.html] failed to finish deploying within the timeout period [120000]. The Deployable state is thus unknown.

at org.codehaus.cargo.container.spi.deployer.DeployerWatchdog.watch (DeployerWatchdog.java:111)**

but if I run through command prompt its getting up... why in eclipse am facing this issue and how to solve that? Thanks in Advance.

4

There are 4 best solutions below

3
Jigar Joshi On
  • Open the servers view
  • double click your tomcat server
  • click on Timeouts section
  • increase start up time out
0
Marcus Berro On

NOTE: Edited from original to add context.

You can try increasing the timeout value that Cargo uses while waiting for Tomcat to start/stop.

Example:

<container>
  [...]
  <timeout>180000</timeout>
  [...]
</container>

Check this description in Cargo website:

https://codehaus-cargo.github.io/cargo/Container+Timeout.html

0
OAM On

If you're using Hibernate, make sure your database connection details in your properties file are correct. In my case cargo was timing out because my database username and password were incorrect.

0
darraghmurphy On

Set timeout to 0 in the execution portion of the Maven Cargo plugin config to disable the URL Deployable Monitor. Also comment out the pingURL & pingTimeout elements

        <plugin>
            <groupId>org.codehaus.cargo</groupId>
            <artifactId>cargo-maven3-plugin</artifactId>
            <version>1.10.8</version>
            <configuration>
                <containerId>tomcat9x</containerId>
                <containerUrl>file:///C://APPS/tomcat-9.0.29.zip</containerUrl>
                <container>
                    <containerId>tomcat9x</containerId>
                    <type>standalone</type>
                </container>
                <deployables>
                    <deployable>
                        <artifactId>MYAPP</artifactId>
                        <groupId>com.example</groupId>
                        <type>war</type>
                        <location>deploy/generic/jclass/MYAPP.war</location>
                        <!-- <pingURL>http://127.0.0.1:8080/MYAPP/index.jsp</pingURL> -->
                        <!-- <pingTimeout>150000</pingTimeout> -->
                    </deployable>
                </deployables>
            </configuration>
            <executions>
                <execution>
                    <id>start-server</id>
                    <phase>pre-integration-test</phase>
                    <goals>
                        <goal>start</goal>
                    </goals>
                    <configuration>
                        <container>
                            <timeout>0</timeout>
                        </container>
                    </configuration>
                </execution>
                <execution>
                    <id>stop-server</id>
                    <phase>post-integration-test</phase>
                    <goals>
                        <goal>stop</goal>
                    </goals>
                    <configuration>
                        <container>
                            <timeout>0</timeout>
                        </container>
                    </configuration>
                </execution>
            </executions>
        </plugin>