JBoss 5.1.0 disabled HDScanner, undeploying post restart doesn't work - jboss5.x

I have disabled the HDScanner bean (by removing JBOSS_HOME/deploy/hdscanner-jboss-beans.xml) in JBoss 5.1.0 so that I must do all deployments to running instances through Twiddle (applications found in the deployment directory are automatically deployed on startup).
After I have done this I can deploy and undeploy a war by using the following commands:
twiddle.sh -s localhost invoke "jboss.system:service=MainDeployer" deploy "file:/path/to/my.war"
twiddle.sh -s localhost invoke "jboss.system:service=MainDeployer" undeploy "file:/path/to/my.war"
This works fine.
However, if I restart JBoss between the deploy and the undeploy, when I try to undeploy the app using twiddle, the app remains deployed and the JBoss logs display :
2011-04-18 14:30:41,318 WARN [org.jboss.deployment.MainDeployer] (WorkerThread#0[10.21.4.61:43700]) undeploy 'file:/path/to/my.war' : package not deployed
Am I doing something wrong, expecting something that's not possible, or is this a bug in JBoss?
If I am doing something wrong, what is the correct way to undeploy an app that has been deployed using twiddle on an instance of JBoss that has been subsequently restarted?
Edit
Without looking at the source code of JBoss, it seems to me that apps that are deployed on startup are managed in a different place from those deployed through Twiddle. Ie if an app is deployed at startup it is not known of by the mechanism accessed through Twiddle, hence the "package not deployed" error.
So, is there a way to access this other deployment manager through Twiddle such that apps that are present at startup can still be undeployed?

I have done a lot of testing on this, and basically apps that are found at startup are (rightly) considered to be part of the JBoss 'core' and are therefore deployed automatically as part of the startup process. This applies for things such as the jmx-console, and therefore applies for other .wars too. Whether through design or through consequence, these resources that have been automatically deployed during startup cannot be managed by twiddle invokations.

Related

Controlling Wildfly undeploy

We have an issue with undeploying an enterprise archive from Wildfly in a controlled matter. So the issue is that we automatically undeploy and deploy a new enterprise archive to Wildfly (Wildfly is also restarted). However, the issue is that we need to make sure that system goes down in a controlled matter so that state is not lost of corrupted.
This is normally done with a shutdown-hook, but that does not work well with Wildfly. When undeploy executes the shutdown-hook is executed, but Wildfly will not respect it. It will not give enough time to system to do clean up and threads to terminate.
So is there anyway to pause the undeploy or force Wildfly wait longer for the system to terminate before killing it?

JBoss 4.0 HotDeploy

good day.
I am trying to enable hot deploy on my JBoss 4.0.
I have tried to access to localhost:9990, but it doesn't work.
Is there any alternative way to enable it?
Thanks in advance.
JBoss 4.0 contradicts to port 9990.
The port 9990 is the management console access for JBossAS7 and WildFly.
JBoss 4.0 might have a JMX console which is accessible via 8080.
You can simpel use localhost:8080 and navigate from the welcome page.
Note that hot deploy is not recommended for productional JBossAS4/5 instances because of class loading issues, OOM errors.
You might use it for development.
Also JBossAS4 does not have managed deployments, simple drop the file to server/yourProfile/deploy and it will be picked up and deployed.

Jboss EAP 6.4 Server logs are not properly updated

JBoss startup and Server logs are not getting updated completely like started in XXXX ms. But all the services are being deployed successfully. Is there any way to debug why the logs are not printing?
Thanks,
Kusuma
Just check on your the logging subsystem configuration in your standalone.xml.
If that's not the issue, this is probably a problem with your application configuration and not JBoss, probably you just have to exclude some logging libraries in your jboss-deployment-structure.xml, to use the provided and not the jboss instance libs.

How can I configure JBoss so that I have to manually start and stop the server after deploying?

I want to configure this so that it doesn't restart automatically, but I have to manually start and stop it. Is this possible?
I am not sure if I understand you correct: you just don't want to hot deploy application. You would like that application should be deployed only during starting the JBoss server?
If yes, you can disable the hot deploy service just by removing the hdscanner-jboss-beans.xml from deploy directory.
PS. It works for JBoss AS 5.1.

Can a deployed JBoss web application simply disappear?

A strange problem occurred yesterday on a production system which has been running fine for weeks on a JBoss 4.2.3 application server: the JAR file containing the web application was no longer in the deployment folder (so the clients could no longer access the application). The server is running on a Windows box.
There was no indication of undeployment in the server logs. Normally JBoss detects if somebody deletes (or moves) a deployed web application file and executes the standard undeployment procedure, so there would be a log entry in this case.
Other web applications on the same system continued to run fine, so it was only this JAR file which simply disappeared.
Has somebody seen a similar problem with web applications on JBoss?
I'd bet my shoes that's not possible to happen spontaneously.
Check your security settings - didn't you leave JMX console accessible? Etc.