Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-12899

Remote AS7 - an extra deployment scanner is added by default

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Critical Critical
    • 4.0.0.Beta2
    • 4.0.0.Beta1
    • server
    • Hide

      1. Set up a remote as7/eap6 server (choose Expose management port)
      2. Start the remote server
      3. Check standalone.xml on the remote server - you will see two deployment scanners pointing at the same location - FAIL

      Show
      1. Set up a remote as7/eap6 server (choose Expose management port) 2. Start the remote server 3. Check standalone.xml on the remote server - you will see two deployment scanners pointing at the same location - FAIL
    • Hide

      Remove/disable the redundant deployment scanner after the server has started, e.g. open the mbean of the new deployment scanner and remove it or set interval to 0 (thus disabling it).

      Show
      Remove/disable the redundant deployment scanner after the server has started, e.g. open the mbean of the new deployment scanner and remove it or set interval to 0 (thus disabling it).

      When you set up a remote as7/eap6 and start the server, a second deployment scanner is added to standalone.xml on the remote server. It is set for the same dir as the default one. Thus you end up with two deployment scanners pointing to the same dir which results in weird behavior of deployments.

      These are the two scanners that you can see in standalone.xml after the remote server is started:

                  <deployment-scanner path="deployments" relative-to="jboss.server.base.dir" scan-interval="5000"/>
                  <deployment-scanner name="jbosstoolsscanner1" path="/home/rasp/jbossqa/runtimes/jboss-as-7.1.1.Final/standalone/deployments/" scan-interval="5000"/>
      

      You can see the additional scanner was added right after server start:

      12:07:28,353 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015874: JBoss AS 7.1.1.Final "Brontes" started in 8013ms - Started 133 of 208 services (74 services are passive or on-demand)
      12:07:57,071 INFO  [org.jboss.as.server.deployment.scanner] (MSC service thread 1-2) JBAS015012: Started FileSystemDeploymentService for directory /home/rasp/jbossqa/runtimes/jboss-as-7.1.1.Final/standalone/deployments
      

      And this is what happens if you try to deploy a dynamic web project in this state:

      12:09:32,999 INFO  [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) JBAS015003: Found dynproj.war in deployment directory. To trigger deployment create a file called dynproj.war.dodeploy
      12:09:37,316 INFO  [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) JBAS015003: Found dynproj.war in deployment directory. To trigger deployment create a file called dynproj.war.dodeploy
      12:09:37,340 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015876: Starting deployment of "dynproj.war"
      12:09:38,060 INFO  [org.jboss.web] (MSC service thread 1-1) JBAS018210: Registering web context: /dynproj
      12:09:38,222 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018559: Deployed "dynproj.war"
      12:09:38,228 ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 2) {"JBAS014653: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-1" => "JBAS014803: Duplicate resource [(\"deployment\" => \"dynproj.war\")]"}}
      12:09:48,308 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015877: Stopped deployment dynproj.war in 70ms
      12:09:48,461 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018558: Undeployed "dynproj.war"
      12:09:53,464 INFO  [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 2) JBAS015003: Found dynproj.war in deployment directory. To trigger deployment create a file called dynproj.war.dodeploy
      

      As you can see you have two scanners noticing this war and both try to deploy it. The result is non-deterministic. Sometimes you end up with the module deployed, sometimes undeployed.

      Note that this only happens if you set up the management port for the remote server. Because if you don't do that, no management connection is made to the server and so the additional deployment scanner won't be added.

            rob.stryker Rob Stryker (Inactive)
            exd-mmalina Martin Malina
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: