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

[韓日関係] 首相含む大幅な内閣改造の可能性…早ければ来月10日ごろ=韓国

div not scrolling properly with slimScroll plugin

I am using the slimScroll plugin for jQuery by Piotr Rochala Which is a great plugin for nice scrollbars on most browsers but I am stuck because I am using it for a chat box and whenever the user appends new text to the boxit does scroll using the .scrollTop() method however the plugin's scrollbar doesnt scroll with it and when the user wants to look though the chat history it will start scrolling from near the top. I have made a quick demo of my situation http://jsfiddle.net/DY9CT/2/ Does anyone know how to solve this problem?

Why does this javascript based printing cause Safari to refresh the page?

The page I am working on has a javascript function executed to print parts of the page. For some reason, printing in Safari, causes the window to somehow update. I say somehow, because it does not really refresh as in reload the page, but rather it starts the "rendering" of the page from start, i.e. scroll to top, flash animations start from 0, and so forth. The effect is reproduced by this fiddle: http://jsfiddle.net/fYmnB/ Clicking the print button and finishing or cancelling a print in Safari causes the screen to "go white" for a sec, which in my real website manifests itself as something "like" a reload. While running print button with, let's say, Firefox, just opens and closes the print dialogue without affecting the fiddle page in any way. Is there something with my way of calling the browsers print method that causes this, or how can it be explained - and preferably, avoided? P.S.: On my real site the same occurs with Chrome. In the ex