Specification of javax.management.MBeanPermission in permissions.xml ineffective in JBoss EAP 7.4 - jboss

I have a war file that I run under JBoss EAP 7.4. That war file contains a permissions.xml file that has the following:
<permissions version="7">
<!-- additional permissions omitted for brevity -->
<permission>
<class-name>javax.management.MBeanPermission</class-name>
<name>*</name>
<actions>queryNames,registerMBean,unregisterMBean</actions>
</permission>
</permissions>
Yet, when I run JBoss, I see the following error in the server.log, apparently caused by some hawtio code:
2022-11-17 19:36:30,507 ERROR
[org.jboss.as.controller.management-operation] (Controller Boot
Thread) WFLYCTL0013: Operation ("deploy") failed - address:
([("deployment" =>
"hawtio-wildfly-2.0.0.fuse-sb2-7_11_0-00036-redhat-00001.war")]) -
failure description: {"WFLYCTL0080: Failed services" =>
{"jboss.deployment.unit."hawtio-wildfly-2.0.0.fuse-sb2-7_11_0-00036-redhat-00001.war".undertow-deployment"
=> "java.lang.RuntimeException: java.lang.RuntimeException: java.security.AccessControlException: WFSM000001: Permission check
failed (permission "("javax.management.MBeanPermission"
"io.hawt.jmx.About#-[hawtio:type=About]" "registerMBean")" in
code source
"(vfs:/content/hawtio-wildfly-2.0.0.fuse-sb2-7_11_0-00036-redhat-00001.war/WEB-INF/lib/hawtio-system-2.0.0.fuse-sb2-7_11_0-00036-redhat-00001.jar
)" of "ModuleClassLoader for Module
"deployment.hawtio-wildfly-2.0.0.fuse-sb2-7_11_0-00036-redhat-00001.war"
from Service Module Loader")
It looks like there was a Red Hat Fuse defect similar to mine that got addressed around 2018. Why might I still be facing this problem? Is there something I can do on my end to resolve it? (I don't want to give all permissions.)

Related

Wildfly 22 - WFLYCTL0180: Services with missing/unavailable dependencies

In Wildfly 22.0.0 or later, the following error occurs.
2022-08-24 15:59:43,380 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([("deployment" => "shcm")]) - failure description: {
"WFLYCTL0412: Required services that are not installed:" => [
"org.wildfly.clustering.cache.group.web.default-server",
"org.wildfly.clustering.cache.registry.web.default-server"
],
"WFLYCTL0180: Services with missing/unavailable dependencies" =>
["org.wildfly.clustering.web.route-locator.\"shcmupdate.war\" is missing
[org.wildfly.clustering.cache.registry.web.default-server,
org.wildfly.clustering.cache.group.web.default-server]"]
}
I have clustering configuration in web.xml and jboss-web.xml in my application.
if use standalone-ha.xml, it works normally.
but subsystem error occurs when standalone.xml is used from Wildfly 22.0.0 or later.
What changes were made in Wildfly 22?
Seems like it was never supported to be enable for non-standalone.xml builds, so it was likely removed in this PR (distributable-web.xml includes an Infinispan cache that distributable-web-local.xml does not).
The WildFly HA docs should be able to help you migrate to WF 22.
This was really unfortunate decision. It is killing EAP v. 7.4.5 (7.4.6) deployments.
I had replication-config as a part of jboss-web.xml file, that causes this issue. The application runs in ha mode in production, so the configuration is needed, but for the development there is no reason to maintain the whole cluster so I was happy the setting was ignored.
<jboss-web xmlns="http://www.jboss.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee http://www.jboss.org/j2ee/schema/jboss-web_10_0.xsd"
version="10.0">
<context-root>my-application</context-root>
<!--
<replication-config>
<replication-granularity>ATTRIBUTE</replication-granularity>
</replication-config> -->
</jboss-web>
Commented out configuration is the part, that was causing the issue.

WildFly server issue duplicate data sources

I'm running an application on WildFly server version 19.0.0.Final on CentOS 7. This application was working fine, but I run this almost 2 months later, and I'm getting this error where I didn't find any duplicate data sources in standalone.xml
14:21:06,641 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([("deployment" => "application.war")]) - failure description: "WFLYCTL0212: Duplicate resource [("deployment" => "application.war")]"
14:21:06,647 FATAL [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0056: Server boot has failed in an unrecoverable manner; exiting. See previous messages for details.
From the stack trace which you have provided, it seems the issue is related to the deployment and not related to the data source.
if multiple deployment-scanner are defined then make sure that they are pointing to different locations
If Multiple deployment-scanner would be defined pointing to the same path or parent directory's path, which results in multiple deployment attempts of the same war file causing the exception.

Operation "read-attribute" failed during JBoss EAP 7 startup

I have deployed my application on JBoss EAP 7 in SSL mode.
My application gets deployed and runs successfully but during start up,
I get following error on console every time when server starts up and WAR is simultaneously deployed, no exception is thrown.
11:28:11,402 ERROR [org.jboss.as.controller.management-operation] (ServerService Thread Pool -- 92) WFLYCTL0013: Operation ("read-attribute") failed - address: ([
("subsystem" => "undertow"),
("server" => "default-server"),
("https-listener" => "defaultssl")
]) - failure description: "WFLYCTL0216: Management resource '[(\"subsystem\" => \"undertow\")]' not found"
I have been searching Red Hat JBoss Knowledgebase, but have not found any solution to this issue.
This issue is not reproduced, if I deploy my WAR after the application server completely starts up and is initialised.
This issue does not affect my application though.
This issue is not reproduced on JBoss EAP 6.x, JBoss AS 7.1.x and Wildfly.
What can be the reason of such issue?
I observed the behavior of the JBoss EAP 7 application server. The undertow subsystem is not loaded during the server initialization. This issue occurs when application tries to access the details of the undertow subsystem during startup. When the application is deployed after server has started this issue does not occur.

jasper server war deployment over jboss getting failed

I am trying to deploy jaserserver war on jsboss but its getting failded
war putted at location #location
`D:\Software\jboss-as-7.1.1.Final\standalone\deployments
jboss server log Server
15:18:24,371 ERROR [org.jboss.as.controller.management-operation] (Cont*roller Boot Thread) JBAS01461
2: Operation ("deploy") failed - address: ([("deployment" => "jasperserver.war")]) - failure descrip
tion: {"JBAS014771: Services with missing/unavailable dependencies" => ["jboss.naming.context.java.m
odule.jasperserver.jasperserver.env.jdbc.jasperserver is missing [jboss.naming.context.java.jdbc.jas
perserver]"]}*
I any clue what is going wrong ? i am running jboss server using standalone.bat (run as a administrator )

Deploy JAR file on WildFly 8.2

I want to deploy an EJB Maven project and when I try so, an error message appears like this.
The error message :
17:45:21,005 ERROR [org.jboss.as.controller.management-operation] (DeploymentScanner-threads - 2) JBAS014613: Operation ("deploy") failed - address: ([("deployment" => "dashboard-ejb.jar")]) - failure description: {"JBAS014771: Services with missing/unavailable dependencies" => ["jboss.persistenceunit.\"dashboard-ejb.jar#dashboard-ejb\".FIRST_PHASE is missing [jboss.naming.context.java.dsOoredoo]"]}
To note, I've created a datasource called dsOoredoo.
Does anyone have an idea?