Skip to main content

Jboss 7 auto deploy plugin cannot connect to localhost:8080



I configured the plugin in maven as shown below







<plugin>

<groupId>org.jboss.as.plugins</groupId>

<artifactId>jboss-as-maven-plugin</artifactId>

<version>7.0.2.Final</version>

<configuration>

<hostname>localhost</hostname>

<port>8080</port>

<filename>target/TestApp.war</filename>

</configuration>

<executions>

<execution>

<phase>package</phase>

<goals>

<goal>deploy</goal>

</goals>

</execution>

</executions>

</plugin>







I then trigger it using maven using







mvn -U clean install package







It does build and everything works fine but fails when it starts the auto deployment.







INFO]

INFO] --- jboss-as-maven-plugin:7.0.2.Final:deploy (default) @ TestApp ---

INFO] Executing goal deploy on server localhost (127.0.0.1) port 8080.

9-Feb-2012 16:18:46 org.jboss.remoting3.EndpointImpl <clinit>

NFO: JBoss Remoting version 3.2.0.Beta2

9-Feb-2012 16:18:46 org.xnio.Xnio <clinit>

NFO: XNIO Version 3.0.0.Beta2

9-Feb-2012 16:18:46 org.xnio.nio.NioXnio <clinit>

NFO: XNIO NIO Implementation Version 3.0.0.Beta2

INFO] ------------------------------------------------------------------------

INFO] BUILD FAILURE

INFO] ------------------------------------------------------------------------

INFO] Total time: 58.768s

INFO] Finished at: Thu Feb 09 16:18:52 GMT 2012

INFO] Final Memory: 7M/18M

INFO] ------------------------------------------------------------------------

ERROR] Failed to execute goal org.jboss.as.plugins:jboss-as-maven-plugin:7.0.2.Final:deploy (default) on project TestApp: Could not execute goal deploy on TestApp.war. Reason: Could not connect to remote://localhost:8080 in 5000ms. Make sure the server is running and/or consider setting a longer timeout by setting -Dorg.jboss.as.client.connect.timeout=<timeout in ms>. -> [Help 1]

ERROR]

ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.

ERROR] Re-run Maven using the -X switch to enable full debug logging.

ERROR]







The error seems to suggest that it could not connect to the application server on localhost:8080. It is running and i can access it. Any ideas?





Jboss version is 7.0.2 Maven version is 3.0.4


Comments

  1. By default port 8080 is not the management port. The plugin requires you to use the management which is 9999 by default.

    Also your filename element isn't quite right. Adding target at the beginning will cause the file not to be found.

    The plugin looks in the build directory by default for the file name. In most cases the filename element doesn't even need to be used. The plugin will assume the file name is the ${project.build.finalName}.${project.packaging} by default, which will likely work in your case.

    Assuming you haven't changed the default management port you'd want it to look something like this.

    <plugin>
    <groupId>org.jboss.as.plugins</groupId>
    <artifactId>jboss-as-maven-plugin</artifactId>
    <version>7.0.2.Final</version>
    <executions>
    <execution>
    <phase>package</phase>
    <goals>
    <goal>deploy</goal>
    </goals>
    </execution>
    </executions>
    </plugin>

    ReplyDelete
  2. According to this page, you should not specify the web port (8080), but the administration port (defaults to 9999), which is the one used for deployments.

    ReplyDelete

Post a Comment

Popular posts from this blog

Why is this Javascript much *slower* than its jQuery equivalent?

I have a HTML list of about 500 items and a "filter" box above it. I started by using jQuery to filter the list when I typed a letter (timing code added later): $('#filter').keyup( function() { var jqStart = (new Date).getTime(); var search = $(this).val().toLowerCase(); var $list = $('ul.ablist > li'); $list.each( function() { if ( $(this).text().toLowerCase().indexOf(search) === -1 ) $(this).hide(); else $(this).show(); } ); console.log('Time: ' + ((new Date).getTime() - jqStart)); } ); However, there was a couple of seconds delay after typing each letter (particularly the first letter). So I thought it may be slightly quicker if I used plain Javascript (I read recently that jQuery's each function is particularly slow). Here's my JS equivalent: document.getElementById('filter').addEventListener( 'keyup', function () { var jsStart = (new Date).getTime()...

Is it possible to have IF statement in an Echo statement in PHP

Thanks in advance. I did look at the other questions/answers that were similar and didn't find exactly what I was looking for. I'm trying to do this, am I on the right path? echo " <div id='tabs-".$match."'> <textarea id='".$match."' name='".$match."'>". if ($COLUMN_NAME === $match) { echo $FIELD_WITH_COLUMN_NAME; } else { } ."</textarea> <script type='text/javascript'> CKEDITOR.replace( '".$match."' ); </script> </div>"; I am getting the following error message in the browser: Parse error: syntax error, unexpected T_IF Please let me know if this is the right way to go about nesting an IF statement inside an echo. Thank you.