dev@glassfish.java.net

Re: cluster_helloworld quicklook test fails

From: Hong Zhang <hong.hz.zhang_at_oracle.com>
Date: Wed, 27 Mar 2013 09:10:57 -0400

Seems like the server somehow got into an inconsistent state. I just
tried to deploy an application just to domain (with no reference to any
target) and then undeploy it from domain, the undeployment was
successful. If we have a set of steps which could reproduce this, I
could look into it..

On 3/26/2013 11:48 PM, Bill Shannon wrote:
> Looks like you're right. How am I supposed to undeploy it?
>
> $ asadmin list-applications domain
> helloworld <web>
> $ asadmin undeploy helloworld
> remote failure: Application helloworld is not deployed on this target [server]
> $ asadmin undeploy --target domain helloworld
> helloworld disabled failed
> Application not registered
> $ asadmin list-applications domain
> helloworld <web>
>
> I deleted the domain and recreated and started over.
> Now the app deploys, but the test still fails in the same
> way as below.
>
> There's no errors in the server.log.
>
> It looks like it's time to debug the test... :-(
>
>
> Hong Zhang wrote on 03/26/2013 06:15 PM:
>> The error message says "Application helloworld is already deployed in this
>> domain" which could mean any target in this domain or domain itself. You can use
>> "asadmin list-applications domain" to show the applications deployed to this
>> domain. It's possible that the previous failure had the application partially
>> registered in the domain.xml (with application entry created in the domain.xml
>> but no application-ref entry), you mentioned you saw a NPE when processing
>> config changes, I don't know if it's related.
>>
>> You can try to install a fresh build to see if you still see this failure when
>> you just run this single test.
>>
>> On 3/26/2013 5:47 PM, Bill Shannon wrote:
>>> I tried to run just the cluster helloworld test.
>>>
>>> I started the server, I run clustersetup, which worked.
>>> I then ran cluster/helloworld, which failed:
>>>
>>> Buildfile:
>>> /home/shannon/gf/v3/appserver/tests/quicklook/cluster/helloworld/build.xml
>>>
>>> build:
>>>
>>> compile-tests:
>>> [echo] compiling test client to ../../classes/test
>>> [echo] Listing of source files: hellocluster/ClusterHelloworldTest.java
>>> [javac]
>>> /home/shannon/gf/v3/appserver/tests/quicklook/gfproject/build-impl.xml:141:
>>> warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last;
>>> set to false for repeatable builds
>>> [javac] Compiling 1 source file to
>>> /home/shannon/gf/v3/appserver/tests/quicklook/classes/test
>>> [javac] warning: [options] bootstrap class path not set in conjunction with
>>> -source 1.5
>>> [javac] 1 warning
>>>
>>> build-impl:
>>>
>>> archive-type:
>>> [echo] archive-type is war
>>>
>>> build-war:
>>> [echo] Now creating a war file ../../dist/hellocluster/helloworld.war
>>> [delete] Deleting directory
>>> /home/shannon/gf/v3/appserver/tests/quicklook/classes/hellocluster/app
>>> [delete] Deleting directory
>>> /home/shannon/gf/v3/appserver/tests/quicklook/dist/hellocluster
>>> [mkdir] Created dir:
>>> /home/shannon/gf/v3/appserver/tests/quicklook/classes/hellocluster/app
>>> [mkdir] Created dir:
>>> /home/shannon/gf/v3/appserver/tests/quicklook/dist/hellocluster
>>> [javac]
>>> /home/shannon/gf/v3/appserver/tests/quicklook/gfproject/build-impl.xml:220:
>>> warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last;
>>> set to false for repeatable builds
>>> [mkdir] Created dir:
>>> /home/shannon/gf/v3/appserver/tests/quicklook/classes/hellocluster/app/META-INF
>>> [copy] Warning: Could not find file
>>> /home/shannon/gf/v3/appserver/tests/quicklook/cluster/helloworld/metadata/persistence.xml
>>>
>>> to copy.
>>> [war] Building war:
>>> /home/shannon/gf/v3/appserver/tests/quicklook/dist/hellocluster/helloworld.war
>>>
>>> archive-type:
>>> [echo] archive-type is war
>>>
>>> build-ear:
>>>
>>> archive-type:
>>> [echo] archive-type is war
>>>
>>> build-appclient-ear:
>>>
>>> archive-type:
>>> [echo] archive-type is war
>>>
>>> build-jar:
>>>
>>> runtest:
>>>
>>> runtest-impl:
>>>
>>> setOSConditions:
>>>
>>> asenv-unix:
>>>
>>> asenv-windows:
>>>
>>> checkTestNGXML:
>>>
>>> runtest-impl-class:
>>> [echo] =============Starting TestNG test at ../../classes/test
>>> ============
>>> [testng] [Parser] Running:
>>> [testng] hellocluster
>>> [testng]
>>> [testng] ######### FAILURE #########
>>> [testng] asadmin --host localhost --port 4848 --user admin
>>> --interactive=false --echo=true --terse=true deploy --force=false
>>> --precompilejsp=false --verify=false --generatermistubs=false
>>> --availabilityenabled=false --asyncreplication=true --target eec1
>>> --keepreposdir=false --keepfailedstubs=false --isredeploy=false
>>> --logreportederrors=true --_classicstyle=false
>>> /home/shannon/gf/v3/appserver/tests/quicklook/cluster/helloworld/../../dist/hellocluster/helloworld.war
>>>
>>> [testng]
>>> [testng] remote failure: Error occurred during deployment: Application
>>> helloworld is already deployed in this domain. Please use create-application-ref
>>> command to create application reference on target eec1. Please see server.log
>>> for more details.
>>> [testng]
>>> [testng] FAILED: clusterDeployTest
>>> [testng] java.lang.AssertionError: Cluster deployment failed ...
>>> expected:<true> but was:<false>
>>> [testng] at
>>> test.hellocluster.ClusterHelloworldTest.clusterDeployTest(ClusterHelloworldTest.java:72)
>>>
>>> [testng] ... Removed 26 stack frames
>>> [testng] SKIPPED: clusterHelloWorldTest
>>> [testng] SKIPPED: clusterUnDeployTest
>>> [testng]
>>> [testng] ===============================================
>>> [testng] cluster_hello
>>> [testng] Tests run: 3, Failures: 1, Skips: 2
>>> [testng] ===============================================
>>> [testng]
>>> [testng]
>>> [testng] ===============================================
>>> [testng] hellocluster
>>> [testng] Total tests run: 3, Failures: 1, Skips: 2
>>> [testng] ===============================================
>>> [testng]
>>>
>>> setOSConditions:
>>>
>>> asenv-unix:
>>>
>>> asenv-windows:
>>>
>>> checkTestNGXML:
>>>
>>> runtest-impl-xml:
>>>
>>> all:
>>>
>>> BUILD SUCCESSFUL
>>> Total time: 2 seconds
>>>
>>>
>>> The server.log says:
>>>
>>> [2013-03-26T13:57:55.027-0700] [glassfish 4.0] [SEVERE] [] [javax.enterprise.sys
>>> tem.core] [tid: _ThreadID=40 _ThreadName=admin-listener(3)] [timeMillis: 1364331
>>> 475027] [levelValue: 1000] [[
>>> Application helloworld is already deployed in this domain. Please use create-a
>>> pplication-ref command to create application reference on target eec1]]
>>>
>>>
>>> As far as I can tell, helloworld is *not* already deployed to the cluster.
>>> "list-applications eec1" shows nothing.