5 Replies Latest reply on Jan 24, 2013 2:37 AM by Wolf-Dieter Fink

    how to deploy a war to JBoss AS7 running on local machine through jboss-as-maven-plugin

    atiyou Newbie

      Hi ,

       

      As i didn't fount a jenkins plugin that could deploy to JBOSS EAP 6 i'm trying to use jboss-as maven plugin to do it durring install phase of my build...

      First i would like to mention that JBOSS is located at the same machine (i don't have to do remote deploy..)

      But when i launch the jenkins build i get errors,  no matter if i mention (host, port, user & password) or not, elsewhere i get  nothing from JBoss console side

       

      So i'm using  SUSE Linux Enterprise Server 11 SP2  (x86_64)

       

      I started my jboss like this :

      jboss@devsaa:~/domain/bin> ./domain.sh -Djboss.bind.address.management=10.69.57.96 -Djboss.bind.address=10.69.57.96

      My plugin configuration is like this :

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

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

               <version>7.3.Final</version>

               <configuration>

                       <!-- optional configuration as we make a local deploy

                      <host>10.69.57.96</host>

                      <port>9999</port>

                      <name>jboss</name>

                      <password>******</password> -->

                      <domain>

                              <server-groups>

                                  <server-group>main-server-group</server-group>

                              </server-groups>

                      </domain>

               </configuration>

               <executions>

                          <execution>

                              <phase>install</phase>

                              <goals>

                                  <goal>deploy</goal>

                              </goals>

                          </execution>

               </executions>

       

      And i got those errors :

       

      11 janv. 2013 11:53:26 hudson.maven.ExecutedMojo <init>

      WARNING: Failed to getClass for org.jboss.as.plugin.deployment.Deploy

      mojoStarted org.jboss.as.plugins:jboss-as-maven-plugin:7.3.Final(default)

      [INFO]

      [INFO] --- jboss-as-maven-plugin:7.3.Final:deploy (default) @ foo-foundation-webapp ---

      11 janv. 2013 11:53:27 org.xnio.Xnio <clinit>
      INFO: XNIO Version 3.0.7.GA
      11 janv. 2013 11:53:27 org.xnio.nio.NioXnio <clinit>
      INFO: XNIO NIO Implementation Version 3.0.7.GA
      11 janv. 2013 11:53:27 org.jboss.remoting3.EndpointImpl <clinit>
      INFO: JBoss Remoting version 3.2.12.GA

      mojoFailed org.jboss.as.plugins:jboss-as-maven-plugin:7.3.Final(default)

      projectFailed fr.foo.foundation:foo-foundation-webapp:1.0-SNAPSHOT

      sessionEnded

      [INFO] ------------------------------------------------------------------------

      [INFO] BUILD FAILURE

      [INFO] ------------------------------------------------------------------------

      [INFO] Total time: 44.717s

      [INFO] Finished at: Fri Jan 11 11:53:33 CET 2013

      [INFO] Final Memory: 72M/120M
      [INFO] ------------------------------------------------------------------------
      mavenExecutionResult exceptions not empty
      message : Failed to execute goal org.jboss.as.plugins:jboss-as-maven-plugin:7.3.Final:deploy (default) on project foo-foundation-webapp: Could not execute goal deploy on /pic/dev/workspace_jenkins/foundation-webapp/workspace/target/foo-foundation-webapp.war. Reason: Error could not execute operation '{
      "address" => [],
      "operation" => "read-attribute",
      "name" => "launch-type" }'.
      cause : Could not execute goal deploy on /pic/dev/workspace_jenkins/foundation-webapp/workspace/target/foo-foundation-webapp.war. Reason: Error could not execute operation '{ "address" => [], "operation" => "read-attribute", "name" => "launch-type" }'. Stack trace : org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.jboss.as.plugins:jboss-as-maven-plugin:7.3.Final:deploy (default) on project foo-foundation-webapp: Could not execute goal deploy on /pic/dev/workspace_jenkins/foundation-webapp/workspace/target/foo-foundation-webapp.war. Reason: Error could not execute operation '{ "address" => [], "operation" => "read-attribute", "name" => "launch-type" }'. at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153
      ..........................
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
      .............................

      Caused by: java.io.IOException: java.net.ConnectException: JBAS012144: Could not connect to remote://localhost:9999. The connection timed out
      at org.jboss.as.controller.client.impl.AbstractModelControllerClient.executeForResult(AbstractModelControllerClient.java:129)
      at org.jboss.as.controller.client.impl.AbstractModelControllerClient.execute(AbstractModelControllerClient.java:71)
      at org.jboss.as.plugin.common.AbstractServerConnection.isDomainServer(AbstractServerConnection.java:181) ... 35 more

      channel stopped

      Finished: FAILURE



      So even when i mention the host address 10.69.X.X, i see in the log file Could not connect to remote://localhost:9999 !

      At this moment, i just want to make simple deploy in the same machine

       

      Plz find the full logs in attached file

       

      Thanks for  feedback

        • 1. Re: how to deploy a war to JBoss AS7 running on local machine through jboss-as-maven-plugin
          Nicklas Karlsson Master

          Can you show the server log, that should show what it's really listening on?

          What if you edit the actual value in standalone.xml management interface?

          • 2. Re: how to deploy a war to JBoss AS7 running on local machine through jboss-as-maven-plugin
            atiyou Newbie

            Hi Nicklas,

             

             

            I just have modifiyed thread to put the server logs, so i tested again with standlone mode and still have the same error on maven console side

             

            So as you said, i modified standalone.xml to put plain address like this :

             

            <interfaces>

                    <interface name="management">

                        <inet-address value="10.69.57.96"/>

                    </interface>

                    <interface name="public">

                        <inet-address value="${jboss.bind.address:127.0.0.1}"/>

                    </interface>

                    <interface name="unsecure">

                        <inet-address value="${jboss.bind.address.unsecure:127.0.0.1}"/>

                    </interface>

                </interfaces>

             

            and i start the server like this : ~ #./standalone.sh -Djboss.bind.address=10.69.57.96

             

            But nothing changed.

            • 3. Re: how to deploy a war to JBoss AS7 running on local machine through jboss-as-maven-plugin
              Kepa Uriarte Newbie

              We are having a similar problem at our Production Box, while we are deploying ok at Development Box with the same setup.

               

               

              [DEBUG] Configuring mojo org.jboss.as.plugins:jboss-as-maven-plugin:7.3.Final:deploy from plugin realm ClassRealm[plugin>org.jboss.as.plugins:jboss-as-maven-plugin:7.3.Final, parent: sun.misc.Launcher$AppClassLoader@35ce36]

              [DEBUG] Configuring mojo 'org.jboss.as.plugins:jboss-as-maven-plugin:7.3.Final:deploy' with basic configurator -->

              [DEBUG]   (f) checkPackaging = false

              [DEBUG]   (f) serverGroups = [misumi-group]

              [DEBUG]   (f) profiles = [default, ha, full, full-ha]

              [DEBUG]   (f) domain = org.jboss.as.plugin.deployment.domain.Domain@578dfb

              [DEBUG]   (f) filename = MISUMI-ear.ear

              [DEBUG]   (f) force = true

              [DEBUG]   (f) hostname = slx00010479.xxxxxxxx.es

              [DEBUG]   (f) password = xxxxxx

              [DEBUG]   (f) port = 9999

              [DEBUG]   (f) project = MavenProject: es.xxxxxxx:MISUMI:1.0-SNAPSHOT @ /home/ic/jenkins/jenkins_home/workspace/misumi_kepa_desa/pom.xml

              [DEBUG]   (f) skip = false

              [DEBUG]   (f) targetDir = /home/ic/jenkins/jenkins_home/workspace/misumi_kepa_desa/target

              [DEBUG]   (f) username = admin

              [DEBUG] -- end configuration --

              Current policy properties:

                      mmc.sess_pe_act.block_unsigned: false

                      window.num_max: 5

                      jscan.sess_applet_act.sig_trusted: pass

                      file.destructive.state: disabled

                      jscan.sess_applet_act.block_all: false

                      window.num_limited: true

                      jscan.sess_applet_act.unsigned: instrument

                      mmc.sess_pe_act.action: validate

                      jscan.session.daemon_protocol: http

                      file.read.state: enabled

                      mmc.sess_pe_act.block_invalid: true

                      mmc.sess_pe_act.block_blacklisted: false

                      net.bind_enable: false

                      jscan.session.policyname: TU1DIERlZmF1bHQgUG9saWN5

                      mmc.sess_cab_act.block_unsigned: false

                      file.nondestructive.state: disabled

                      jscan.session.origin_uri: http://repo1.maven.org/maven2/org/jboss/as/plugins/jboss-as-maven-plugin/7.3.Final/jboss-as-maven-plugin-7.3.Final.jar

                      mmc.sess_cab_act.action: validate

                      net.connect_other: false

                      jscan.session.user_ipaddr: 127.0.0.1

                      jscan.sess_applet_act.sig_invalid: block

                      mmc.sess_cab_act.block_invalid: true

                      thread.thread_num_max: 8

                      jscan.sess_applet_act.sig_blacklisted: block

                      net.connect_src: true

                      thread.thread_num_limited: true

                      jscan.sess_applet_act.stub_out_blocked_applet: true

                      mmc.sess_cab_act.block_blacklisted: false

                      mmc.sess_pe_act.enforce_for_com_objects_only: true

                      thread.threadgroup_create: false

                      file.write.state: enabled

              23-ene-2013 15:21:19 org.xnio.Xnio <clinit>

              INFO: XNIO Version 3.0.7.GA

              23-ene-2013 15:21:19 org.xnio.nio.NioXnio <clinit>

              INFO: XNIO NIO Implementation Version 3.0.7.GA

              23-ene-2013 15:21:19 org.jboss.remoting3.EndpointImpl <clinit>

              INFO: JBoss Remoting version 3.2.12.GA

              [INFO] ------------------------------------------------------------------------

              [INFO] Reactor Summary:

              [INFO]

              [INFO] MISUMI Maven Enterprise Application ............... FAILURE [6.670s]

              [INFO] MISUMI-web Java EE 6 Webapp ....................... SKIPPED

              [INFO] MISUMI-ear JavaEE6 Assembly ....................... SKIPPED

              [INFO] ------------------------------------------------------------------------

              [INFO] BUILD FAILURE

              [INFO] ------------------------------------------------------------------------

              [INFO] Total time: 7.215s

              [INFO] Finished at: Wed Jan 23 15:21:25 CET 2013

              [INFO] Final Memory: 7M/16M

              [INFO] ------------------------------------------------------------------------

              [ERROR] Failed to execute goal org.jboss.as.plugins:jboss-as-maven-plugin:7.3.Final:deploy (default-cli) on project MISUMI: Could not execute goal deploy on /home/ic/jenkins/jenkins_home/workspace/misumi_kepa_desa/target/MISUMI-ear.ear. Reason: Error could not execute operation '{

              [ERROR] "address" => [],

              [ERROR] "operation" => "read-attribute",

              [ERROR] "name" => "launch-type"

              [ERROR] }'. java.net.ConnectException: JBAS012144: Could not connect to remote://slx00010479.xxxxxxx.es:9999. The connection timed out

              [ERROR] -> [Help 1]

               

               

               

              If we use "<force>true</force> then we get this error....but if we do not use <force> at pom.xml , then we get this :

               

               

              Current policy properties:

                      mmc.sess_pe_act.block_unsigned: false

                      window.num_max: 5

                      jscan.sess_applet_act.sig_trusted: pass

                      file.destructive.state: disabled

                      jscan.sess_applet_act.block_all: false

                      window.num_limited: true

                      jscan.sess_applet_act.unsigned: instrument

                      mmc.sess_pe_act.action: validate

                      jscan.session.daemon_protocol: http

                      file.read.state: enabled

                      mmc.sess_pe_act.block_invalid: true

                      mmc.sess_pe_act.block_blacklisted: false

                      net.bind_enable: false

                      jscan.session.policyname: TU1DIERlZmF1bHQgUG9saWN5

                      mmc.sess_cab_act.block_unsigned: false

                      file.nondestructive.state: disabled

                      jscan.session.origin_uri: http://repo1.maven.org/maven2/org/jboss/as/plugins/jboss-as-maven-plugin/7.3.Final/jboss-as-maven-plugin-7.3.Final.jar

                      mmc.sess_cab_act.action: validate

                      net.connect_other: false

                      jscan.session.user_ipaddr: 127.0.0.1

                      jscan.sess_applet_act.sig_invalid: block

                      mmc.sess_cab_act.block_invalid: true

                      thread.thread_num_max: 8

                      jscan.sess_applet_act.sig_blacklisted: block

                      net.connect_src: true

                      thread.thread_num_limited: true

                      jscan.sess_applet_act.stub_out_blocked_applet: true

                      mmc.sess_cab_act.block_blacklisted: false

                      mmc.sess_pe_act.enforce_for_com_objects_only: true

                      thread.threadgroup_create: false

                      file.write.state: enabled

              23-ene-2013 15:28:56 org.xnio.Xnio <clinit>

              INFO: XNIO Version 3.0.7.GA

              23-ene-2013 15:28:56 org.xnio.nio.NioXnio <clinit>

              INFO: XNIO NIO Implementation Version 3.0.7.GA

              23-ene-2013 15:28:56 org.jboss.remoting3.EndpointImpl <clinit>

              INFO: JBoss Remoting version 3.2.12.GA

               

               

               

              and the process remains for ever.....

               

               

              This is our configuration, properties are overwritten by Maven settings.xml

               

               

                                             <plugin>

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

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

                                                      <version>7.3.Final</version>

                                                      <inherited>false</inherited>

                                                      <configuration>

                                                                  <!-- <force>true</force> -->

                                                                  <hostname>${misumi_hostname}</hostname>

                                                                  <port>${misumi_port}</port>

                                                                  <username>${misumi_username}</username>

                                                                  <password>${misumi_password}</password>

                                                                  <filename>MISUMI-ear.ear</filename>

                                                                  <domain>

                                                                          <server-groups>

                                                                                    <server-group>${misumi_grupo}</server-group>

                                                                          </server-groups>

                                                                  <profiles>

                                                                     <profile>default</profile>

                                                                    <profile>ha</profile>

                                                                    <profile>full</profile>

                                                                    <profile>full-ha</profile>

                                                                 </profiles>

                                                                </domain>

                                                                <checkPackaging>false</checkPackaging>

                                                       </configuration>

                                            </plugin>

               


              Could anybody help ?

              • 4. Re: how to deploy a war to JBoss AS7 running on local machine through jboss-as-maven-plugin
                Nicklas Karlsson Master

                atiyou: what does the log say it's listening on?

                 

                kampa nita: please don't hijack (espcially, not-answered) threads, start a new one.

                • 5. Re: how to deploy a war to JBoss AS7 running on local machine through jboss-as-maven-plugin
                  Wolf-Dieter Fink Master

                  Maybe examples help.

                  You find several quickstarts which should have all the 'jboss-as:deploy' part.

                  With properties you are able to overwrite the default host:port, see jboss maven plugin