Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deployment Timeout while waiting for "test" ApplicationMBean #94

Open
hantsy opened this issue Feb 7, 2021 · 5 comments
Open

Deployment Timeout while waiting for "test" ApplicationMBean #94

hantsy opened this issue Feb 7, 2021 · 5 comments

Comments

@hantsy
Copy link

hantsy commented Feb 7, 2021

In the former plain Jakarta EE 8 codes, just included some simple CDI codes, the Arquillian liberty managed container worked well.

In the latest days, I am trying to add EJB and JMS samples found OpenLIberty does not follow the default resources rule (DefaultDataSource, DefaultJMSConnectionFactory) as other application servers, and also did not support portable resource configuration eg @JMSDestinationDefinition in codes, etc.

I added a simple ejb branch to taste EJB features on the popular application servers, but OpenLiberty does not work as expected. I have already added DefaultDataSource configuration in the server.xml file.

But I can not make the test passed, and always got an error DeploymentException: Timeout while waiting for "test" ApplicationMBean to reach STARTED. Actual state: STARTING, when running the test:

mvn clean verify -Parq-liberty-managed -Dit.test=BasketEjbTest

I described the issue on StackOverflow, check here and this jms topic.

@scottkurz
Copy link
Member

@hantsy have you tried increasing the appDeployTimeout in your src/test/arq-liberty-managed/arquillian.xml file?
E.g.

         <configuration>
             ...
             <property name="appDeployTimeout">120</property>
         </configuration>

Your example seemed to work for me once I added that.

@hantsy
Copy link
Author

hantsy commented Feb 10, 2021

@scottkurz Yeah, increasing the app deploy time resolved the issue. But from the log, there is an error like this.

8823 FINER: AppMBean for test is in state STARTING 8824 
[ERROR ] CWWKZ0013E: It is not possible to start two applications called test

It was deployed twice? I have searched this error, it seems it is also occured in the ci.maven Github issues.

@scottkurz
Copy link
Member

[ERROR ] CWWKZ0013E: It is not possible to start two applications called test

@hantsy, I didn't observe that myself. Usually this comes up if you deploy the app to dropins and also explicitly configure it in server.xml. From your branch config I don't see the app configured in server.xml, it looks like you're only using one deployment to dropins. So I'm not sure why this would happen. Did you try a mvn clean first?

This has been an issue in ci.maven (liberty-maven-plugin)... however that's not directly relevant. In liberty-maven-plugin we handle deployment across three cases: dropins, apps with existing config, and we offer a third case where the plugin will generate config....and the issues you're probably seeing have been a couple bugs where we generated the app config but shouldn't have.

Again, I'm not sure that's directly relevant, but maybe some background context that can help.

@hantsy
Copy link
Author

hantsy commented Feb 11, 2021

@scottkurz Thanks. Nevertheless, it resolved my issues.

@hantsy
Copy link
Author

hantsy commented Feb 11, 2021

Personally, I hope Liberty Arquillian can provide more friendly exception info to guide developers to fix it.

Such as:

App deployment timeout....try adding a `appDeployTimeout` into the *arquillian.xml* to increase the deployment timeout

Secondly, hope the Liberty arquillian project internally applies a retry rule to reset the timeout counter and try again to check the deployment status if it is timeout. Some adapters have a retries property.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants