logging - 一旦开始部署 5.3.8 版本的 cas.war,jboss-eap-7.1.0 就会停止记录服务器启动日志

标签 logging log4j log4j2 cas jboss-eap-7

我已在 JBOSS EAP 7.1.0 中部署了 CAS 5.3.8 WAR 文件。但是在serverstartup上,一旦JBOSS开始部署CAS WAR,它就会停止记录启动信息,下面是启动日志,

14:19:30,699 INFO  [org.jboss.modules] (main) JBoss Modules version 1.6.0.Final-redhat-1
14:19:31,108 INFO  [org.jboss.msc] (main) JBoss MSC version 1.2.7.SP1-redhat-1
14:19:31,258 INFO  [org.jboss.as] (MSC service thread 1-8) WFLYSRV0049: JBoss EAP 7.1.0.GA (WildFly Core 3.0.10.Final-redhat-1) starting
14:19:32,466 INFO  [org.jboss.as.controller.management-deprecated] (Controller Boot Thread) WFLYCTL0028: Attribute 'security-realm' in the resource at address '/core-service=management/management-interface=http-interface' is deprecated, and may be removed in future version. See the attribute description in the output of the read-resource-description operation to learn more about the deprecation.
14:19:32,481 INFO  [org.wildfly.security] (ServerService Thread Pool -- 22) ELY00001: WildFly Elytron version 1.1.7.Final-redhat-1
14:19:32,483 INFO  [org.jboss.as.controller.management-deprecated] (ServerService Thread Pool -- 27) WFLYCTL0028: Attribute 'security-realm' in the resource at address '/subsystem=undertow/server=default-server/https-listener=https' is deprecated, and may be removed in future version. See the attribute description in the output of the read-resource-description operation to learn more about the deprecation.
14:19:33,491 INFO  [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0039: Creating http management service using socket-binding (management-http)
14:19:33,505 INFO  [org.xnio] (MSC service thread 1-3) XNIO version 3.5.4.Final-redhat-1
14:19:33,511 INFO  [org.xnio.nio] (MSC service thread 1-3) XNIO NIO Implementation Version 3.5.4.Final-redhat-1
14:19:33,542 INFO  [org.wildfly.extension.io] (ServerService Thread Pool -- 41) WFLYIO001: Worker 'default' has auto-configured to 24 core threads with 192 task threads based on your 12 available processors
14:19:33,547 WARN  [org.jboss.as.txn] (ServerService Thread Pool -- 58) WFLYTX0013: The node-identifier attribute on the /subsystem=transactions is set to the default value. This is a danger for environments running multiple servers. Please make sure the attribute value is unique.
14:19:33,548 INFO  [org.jboss.as.naming] (ServerService Thread Pool -- 50) WFLYNAM0001: Activating Naming Subsystem
14:19:33,558 INFO  [org.jboss.as.jaxrs] (ServerService Thread Pool -- 43) WFLYRS0016: RESTEasy version 3.0.24.Final-redhat-1
14:19:33,560 INFO  [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 42) WFLYCLINF0001: Activating Infinispan subsystem.
14:19:33,564 INFO  [org.jboss.as.webservices] (ServerService Thread Pool -- 60) WFLYWS0002: Activating WebServices Extension
14:19:33,569 INFO  [org.jboss.as.security] (ServerService Thread Pool -- 57) WFLYSEC0002: Activating Security Subsystem
14:19:33,571 INFO  [org.jboss.as.jsf] (ServerService Thread Pool -- 48) WFLYJSF0007: Activated the following JSF Implementations: [main]
14:19:33,575 INFO  [org.jboss.as.connector] (MSC service thread 1-6) WFLYJCA0009: Starting JCA Subsystem (WildFly/IronJacamar 1.4.6.Final-redhat-1)
14:19:33,591 INFO  [org.jboss.as.security] (MSC service thread 1-6) WFLYSEC0001: Current PicketBox version=5.0.2.Final-redhat-1
14:19:33,602 INFO  [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 36) WFLYJCA0004: Deploying JDBC-compliant driver class org.h2.Driver (version 1.4)
14:19:33,604 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-2) WFLYUT0003: Undertow 1.4.18.Final-redhat-2 starting
14:19:33,621 INFO  [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-8) WFLYJCA0018: Started Driver service with driver-name = h2
14:19:33,630 INFO  [org.jboss.as.naming] (MSC service thread 1-6) WFLYNAM0003: Starting Naming Service
14:19:33,632 INFO  [org.jboss.as.mail.extension] (MSC service thread 1-6) WFLYMAIL0001: Bound mail session [java:jboss/mail/Default]
14:19:33,684 INFO  [org.jboss.remoting] (MSC service thread 1-4) JBoss Remoting version 5.0.5.Final-redhat-1
14:19:33,779 INFO  [org.jboss.as.ejb3] (MSC service thread 1-4) WFLYEJB0481: Strict pool slsb-strict-max-pool is using a max instance size of 192 (per class), which is derived from thread worker pool sizing.
14:19:33,779 INFO  [org.jboss.as.ejb3] (MSC service thread 1-3) WFLYEJB0482: Strict pool mdb-strict-max-pool is using a max instance size of 48 (per class), which is derived from the number of CPUs on this host.
14:19:33,797 INFO  [org.wildfly.extension.undertow] (ServerService Thread Pool -- 59) WFLYUT0014: Creating file handler for path 'E:\FusionBanking\POC\CAS538_Upgrade\jboss-eap-7.1.0\jboss-eap-7.1/welcome-content' with options [directory-listing: 'false', follow-symlink: 'false', case-sensitive: 'true', safe-symlink-paths: '[]']
14:19:33,806 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-3) WFLYUT0012: Started server default-server.
14:19:33,808 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-3) WFLYUT0018: Host default-host starting
14:19:33,872 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-7) WFLYUT0006: Undertow HTTP listener default listening on 127.0.0.1:8080
14:19:33,884 INFO  [org.jboss.as.ejb3] (MSC service thread 1-8) WFLYEJB0493: EJB subsystem suspension complete
14:19:33,967 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-5) WFLYJCA0001: Bound data source [java:jboss/datasources/ExampleDS]
14:19:33,974 INFO  [org.jboss.as.patching] (MSC service thread 1-6) WFLYPAT0050: JBoss EAP cumulative patch ID is: base, one-off patches include: none
14:19:33,989 WARN  [org.jboss.as.domain.management.security] (MSC service thread 1-4) WFLYDM0111: Keystore E:\FusionBanking\POC\CAS538_Upgrade\jboss-eap-7.1.0\jboss-eap-7.1\standalone\configuration\application.keystore not found, it will be auto generated on first use with a self signed certificate for host localhost
14:19:33,992 INFO  [org.jboss.as.server.deployment.scanner] (MSC service thread 1-7) WFLYDS0013: Started FileSystemDeploymentService for directory E:\FusionBanking\POC\CAS538_Upgrade\jboss-eap-7.1.0\jboss-eap-7.1\standalone\deployments
14:19:34,004 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-5) WFLYSRV0027: Starting deployment of "cas.war" (runtime-name: "cas.war")
14:19:34,224 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-1) WFLYUT0006: Undertow HTTPS listener https listening on 127.0.0.1:8443
14:19:34,346 INFO  [org.jboss.ws.common.management] (MSC service thread 1-8) JBWS022052: Starting JBossWS 5.1.9.Final-redhat-1 (Apache CXF 3.1.12.redhat-1)
14:19:39,384 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-7) WFLYSRV0003: Could not index class META-INF/versions/9/module-info.class at /E:/FusionBanking/POC/CAS538_Upgrade/jboss-eap-7.1.0/jboss-eap-7.1/bin/content/cas.war/WEB-INF/lib/log4j-api-2.11.0.jar: java.lang.IllegalStateException: Unknown tag! pos=4 poolCount = 32
        at org.jboss.jandex.Indexer.processConstantPool(Indexer.java:1417)
        at org.jboss.jandex.Indexer.index(Indexer.java:1451)
        at org.jboss.as.server.deployment.annotation.ResourceRootIndexer.indexResourceRoot(ResourceRootIndexer.java:99)
        at org.jboss.as.server.deployment.annotation.AnnotationIndexProcessor.deploy(AnnotationIndexProcessor.java:51)
        at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:165)
        at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:2032)
        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1955)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)

14:19:41,740 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-7) WFLYSRV0059: Class Path entry xml-apis.jar in /E:/FusionBanking/POC/CAS538_Upgrade/jboss-eap-7.1.0/jboss-eap-7.1/bin/content/cas.war/WEB-INF/lib/serializer-2.7.2.jar  does not point to a valid jar for a Class-Path reference.
14:19:41,757 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-7) WFLYSRV0059: Class Path entry xercesImpl.jar in /E:/FusionBanking/POC/CAS538_Upgrade/jboss-eap-7.1.0/jboss-eap-7.1/bin/content/cas.war/WEB-INF/lib/xalan-2.7.2.jar  does not point to a valid jar for a Class-Path reference.
14:19:41,757 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-7) WFLYSRV0059: Class Path entry xml-apis.jar in /E:/FusionBanking/POC/CAS538_Upgrade/jboss-eap-7.1.0/jboss-eap-7.1/bin/content/cas.war/WEB-INF/lib/xalan-2.7.2.jar  does not point to a valid jar for a Class-Path reference.
14:19:41,757 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-7) WFLYSRV0059: Class Path entry serializer.jar in /E:/FusionBanking/POC/CAS538_Upgrade/jboss-eap-7.1.0/jboss-eap-7.1/bin/content/cas.war/WEB-INF/lib/xalan-2.7.2.jar  does not point to a valid jar for a Class-Path reference.
14:19:43,380 INFO  [org.infinispan.factories.GlobalComponentRegistry] (MSC service thread 1-7) ISPN000128: Infinispan version: Infinispan 'Chakra' 8.2.8.Final-redhat-1
14:19:43,525 WARN  [org.jboss.as.ee] (MSC service thread 1-8) WFLYEE0007: Not installing optional component org.springframework.http.server.ServletServerHttpAsyncRequestControl due to an exception (enable DEBUG log level to see the cause)
14:19:43,526 WARN  [org.jboss.as.ee] (MSC service thread 1-8) WFLYEE0007: Not installing optional component org.springframework.web.context.request.async.StandardServletAsyncWebRequest due to an exception (enable DEBUG log level to see the cause)
14:19:43,587 WARN  [org.jboss.as.jaxrs] (MSC service thread 1-8) WFLYRS0015: No Servlet declaration found for JAX-RS application.  In cas.war either provide a class that extends javax.ws.rs.core.Application or declare a servlet class in web.xml.
14:19:43,589 WARN  [org.jboss.weld.deployer] (MSC service thread 1-8) WFLYWELD0013: Deployment cas.war contains CDI annotations but no bean archive was found (no beans.xml or class with bean defining annotations was present).
14:19:43,769 INFO  [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 62) WFLYCLINF0002: Started client-mappings cache from ejb container
14:19:43,895 INFO  [io.undertow.servlet] (ServerService Thread Pool -- 80) 2 Spring WebApplicationInitializers detected on classpath

在上述行之后,没有日志记录到服务器控制台。它甚至不记录启动信息,例如,

14:39:16,270 INFO [org.jboss.as]( Controller 启动线程)WFLYSRV0060:监听 http://127.0.0.1:9990/management 的 Http 管理接口(interface) 14:39:16,271 INFO [org.jboss.as]( Controller 启动线程)WFLYSRV0051:管理控制台正在监听 http://127.0.0.1:9990 14:39:16,271 INFO [org.jboss.as]( Controller 启动线程)WFLYSRV0025:JBoss EAP 7.1.0.GA(WildFly Core 3.0.10.Final-redhat-1)在 3064 毫秒内启动 - 启动了 553 个服务中的 292 个( 347 服务是惰性的、被动的或按需的)。

已在standalone.xml中设置。但这不应停止记录启动日志。我在这里看到的是 CAS.WAR 在其 WEB-INF 中有 log4j2.xml。这会导致任何问题吗?

最佳答案

这与上游 jandex 组件报告的 JANDEX-40 问题相同。我们为 JBoss EAP 7.1.z 提出了 JBEAP-15261。此日志消息不会在未来的 EAP 7 版本(暂定为 EAP 7.1.5 或更高版本)中记录。

这没有害处,因此您可以忽略此警告消息。但是,如果您想要一种解决方法来抑制此 WARN 消息,您可以手动生成注释索引并将生成的 META-INF/jandex.idx 打包到有问题的 jar 中。那么部署过程中不会为该jar生成注解索引。

您可以执行以下命令来生成注释索引并将索引打包在war中(使用-m选项更新指定的jar文件以包含注释索引):

    java -jar $JBOSS_HOME/modules/system/layers/base/org/jboss/jandex/main/jandex-2.0.2.Final-redhat-1.jar -m log4j-api-2.11.1.jar

如果您使用的是 EAP 7.1.4(或更高版本),则可以使用以下命令:

java -jar $JBOSS_HOME/jboss-modules.jar -mp $JBOSS_HOME/modules/ org.jboss.jandex -m log4j-api-2.11.1.jar

请注意,模块的自动注释扫描是由 AS7-944 添加到 EAP 7 中的。 EAP 7 中的当前实现要么全有要么全无。如果索引添加到模块内的 jar 文件中,则根本不会执行扫描。因此,您可能需要执行应用程序中打包的所有 jar 文件。

引用:https://access.redhat.com/solutions/3568471

关于logging - 一旦开始部署 5.3.8 版本的 cas.war,jboss-eap-7.1.0 就会停止记录服务器启动日志,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56056016/

相关文章:

java - Log4j2 在控制台上打印工作找到,但没有创建日志文件

grails - 为 grails 配置 graylog2

java - 异常(exception) - 我应该更喜欢日志库而不是 java.util.logging 吗?

eclipse - 无法禁用 Spark eclipse scala 日志

apache-spark - Spark——从运行 spark-submit 的 JAR 加载 log4j

java - Log4j2 使用 {} 反对使用 %d 或 %s

node.js - 如何为解析服务器记录器添加多个传输?

python - 在 python 中将堆栈信息添加到日志格式

java - 如果测试失败,用于调试输出的 Log4j appender

spring - 通过 Spring Log4jConfigurer 初始化 log4j2