Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-3697

Deployment scanner logs ERROR when server is shutting down

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 7.1.0.DR1
    • 7.0.0.ER7, 7.0.0.CR1
    • Deployment Scanner
    • None
    • DR1
    • Hide
      1. change deployment scanner interval to 10ms <deployment-scanner scan-interval="10" ...}
      2. define byteman rule which holds down an unbound of a datasource for a bit
        1. add to standalone.conf byteman to be loaded [2]
        2. script.btm rule will be kind of [1]
      3. deploy some simple app which uses ExampleDS datasource
      4. start server and stop server (CTRL+C)
      5. you should see the exception from deployment scanner

      [1]

      RULE stop unbound ds
      INTERFACE ConnectorLogger
      METHOD unboundDataSource
      AT EXIT
      IF true
      DO 
        System.out.println("I'm byteman and waiting for 5s");
        Thread.sleep(5 * 1000);
      ENDRULE
      

      [2]

      JAVA_OPTS="-javaagent:/PATH_TO_BYTEMAN_DOWNLOAD/lib/byteman.jar=script:/PATH_TO_BTM_SCRIPT/script.btm -Djboss.modules.system.pkgs=org.jboss.byteman ${JAVA_OPTS}"
      
      Show
      change deployment scanner interval to 10ms <deployment-scanner scan-interval="10" ... } define byteman rule which holds down an unbound of a datasource for a bit add to standalone.conf byteman to be loaded [2] script.btm rule will be kind of [1] deploy some simple app which uses ExampleDS datasource start server and stop server ( CTRL+C ) you should see the exception from deployment scanner [1] RULE stop unbound ds INTERFACE ConnectorLogger METHOD unboundDataSource AT EXIT IF true DO System .out.println( "I'm byteman and waiting for 5s" ); Thread .sleep(5 * 1000); ENDRULE [2] JAVA_OPTS= "-javaagent:/PATH_TO_BYTEMAN_DOWNLOAD/lib/byteman.jar=script:/PATH_TO_BTM_SCRIPT/script.btm -Djboss.modules.system.pkgs=org.jboss.byteman ${JAVA_OPTS}"

      It happens time to time that deployment scanner can throw and log error [1] when server is shutting down.
      It's in case of clean startup and clean shutdown when error messages should not be shown. I can hit it when unbounding a datasource takes a bit longer and scan of deployment scanner hits that time.

      [1]

      ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) WFLYDS0012: Scan of /mnt/hudson_workspace/workspace/eap-70-jbossts-crashrec-tests-mssql2014/90fac01f/eap-tests-transactions/jbossts/target/jbossas-jbossts/standalone/deployments threw Exception: java.lang.RuntimeException: WFLYDS0036: Deployment model operation failed. WFLYCTL0271: Operation cancelled
      	at org.jboss.as.server.deployment.scanner.DefaultDeploymentOperations.getDeploymentsStatus(DefaultDeploymentOperations.java:83)
      	at org.jboss.as.server.deployment.scanner.FileSystemDeploymentService$ScanContext.<init>(FileSystemDeploymentService.java:1614)
      	at org.jboss.as.server.deployment.scanner.FileSystemDeploymentService$ScanContext.<init>(FileSystemDeploymentService.java:1563)
      	at org.jboss.as.server.deployment.scanner.FileSystemDeploymentService.scan(FileSystemDeploymentService.java:568)
      	at org.jboss.as.server.deployment.scanner.FileSystemDeploymentService.scan(FileSystemDeploymentService.java:489)
      	at org.jboss.as.server.deployment.scanner.FileSystemDeploymentService$DeploymentScanRunnable.run(FileSystemDeploymentService.java:250)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
      	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
      	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:745)
      	at org.jboss.threads.JBossThread.run(JBossThread.java:320)
      

              psotirop@redhat.com Panagiotis Sotiropoulos (Inactive)
              ochaloup@redhat.com Ondrej Chaloupka (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: