Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Could not connect to remote://localhost:9999. The connection timed out Jboss 7.1.1 Final

Tags:

maven

jboss7.x

I am deploying builds to local and remote Jboss AS 7.1.1 Final at port 9999. Maven uses jboss plugin 'jboss-as-maven-plugin:7.1.1.Final' to manage builds to servers. I have confirmed that server is up and running and port is accessible at 9999. But "many times" build fails with following error for both local and remote Jboss. Jboss ic configured in Standalone mode single node cluster.

Stranglely build doesn't fail every time but most of the time. Not sure if we need to upgrade Maven plugin to higher version.

[INFO] o.h.m.e.h.MavenExecutionResultHandler - Build failed with exception(s) [INFO] o.h.m.e.h.MavenExecutionResultHandler - [1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.jboss.as.plugins:jboss-as-maven-plugin:7.1.1.Final:undeploy (default-cli) on project Test: Error executing UNDEPLOY [DEBUG] Closing connection to remote [ERROR] Failed to execute goal org.jboss.as.plugins:jboss-as-maven-plugin:7.1.1.Final:undeploy (default-cli) on project Test: Error executing UNDEPLOY: java.net.ConnectException: JBAS012144: Could not connect to remote://localhost:9999. The connection timed out -> [Help 1]

UPDATE

<plugin>
   <groupId>org.jboss.as.plugins</groupId>
   <artifactId>jboss-as-maven-plugin</artifactId>
   <version>7.1.1.Final</version>
   <configuration>
     <filename>${project.build.finalName}.jar</filename>
     <username>${userName}</username>
     <password>${password}</password>
   </configuration>
</plugin>

I am now using latest version of Maven plug-in but it seems that connection timeout error is more frequent now. I am starting to think if Jboss behaves differently when trying to make too many remote deployment with different sub projects of the application. I am having 21 sub projects being deployed from a master POM. Sample configuration is as follows

<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.master</groupId>
    <artifactId>master</artifactId>
    <version>1.0.0</version>
    <packaging>pom</packaging>
    <name>Master</name>
    <url>http://maven.apache.org</url>
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>
    <modules>
        <module>module1</module>
        <module>module2</module>
        <module>module3</module>
        <module>module4</module>
        <module>module5</module>
        <module>module6</module>
        <module>module7</module>
        <module>module8</module>
        <module>module9</module>
        <module>module10</module>
        <module>module11</module>
        <module>module12</module>
        <module>module13</module>
    </modules>
like image 848
Manish Devraj Avatar asked Apr 02 '13 06:04

Manish Devraj


1 Answers

First, check plugin configuration. For example:

    <plugin>
        <groupId>org.jboss.as.plugins</groupId>
        <artifactId>jboss-as-maven-plugin</artifactId>
        <version>7.9.Final</version>
        <inherited>true</inherited>
        <configuration>
            <hostname>${jboss.hostname}</hostname>
            <port>${jboss.port}</port>
            <username>${jboss.user}</username>
            <password>${jboss.pass}</password>
            <timeout>30000</timeout>
        </configuration>
    </plugin>

If hostname, port number(default 9999), username and password are ok, you can try increasing "timeout" (default is 5000ms, you can try with 30000ms). It worked for me.

like image 161
Ariel Carrera Avatar answered Oct 23 '22 10:10

Ariel Carrera