jboss 野蝇突然停止

elcex8rz  于 2022-11-08  发布在  其他
关注(0)|答案(1)|浏览(163)

我已经使用wildlfy迁移工具将我的应用程序从Wildfly 17迁移到22。迁移成功。但是,Wildfly应用服务器无法启动。以下是server.log文件的内容:

2021-04-10 14:17:50,552 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-3) WFLYUT0006: Undertow HTTPS listener https listening on 0.0.0.0:8443
2021-04-10 14:17:50,593 INFO  [org.jboss.ws.common.management] (MSC service thread 1-4) JBWS022052: Starting JBossWS 5.4.2.Final (Apache CXF 3.3.7) 
2021-04-10 14:17:50,645 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([("subsystem" => "microprofile-metrics-smallrye")]): java.lang.NullPointerException
    at java.base/java.util.Objects.requireNonNull(Objects.java:221)
    at org.wildfly.extension.metrics@22.0.1.Final//org.wildfly.extension.metrics.WildFlyMetricMetadata.<init>(WildFlyMetricMetadata.java:55)
    at org.wildfly.extension.metrics@22.0.1.Final//org.wildfly.extension.metrics.MetricCollector.collectResourceMetrics0(MetricCollector.java:126)
    at org.wildfly.extension.metrics@22.0.1.Final//org.wildfly.extension.metrics.MetricCollector.collectResourceMetrics0(MetricCollector.java:137)
    at org.wildfly.extension.metrics@22.0.1.Final//org.wildfly.extension.metrics.MetricCollector.collectResourceMetrics0(MetricCollector.java:137)
    at org.wildfly.extension.metrics@22.0.1.Final//org.wildfly.extension.metrics.MetricCollector.collectResourceMetrics(MetricCollector.java:69)
    at org.wildfly.extension.microprofile.metrics-smallrye@22.0.1.Final//org.wildfly.extension.microprofile.metrics.MicroProfileMetricsSubsystemAdd$2.execute(MicroProfileMetricsSubsystemAdd.java:101)
    at org.jboss.as.controller@14.0.1.Final//org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:1005)
    at org.jboss.as.controller@14.0.1.Final//org.jboss.as.controller.AbstractOperationContext.processStages(AbstractOperationContext.java:744)
    at org.jboss.as.controller@14.0.1.Final//org.jboss.as.controller.AbstractOperationContext.executeOperation(AbstractOperationContext.java:468)
    at org.jboss.as.controller@14.0.1.Final//org.jboss.as.controller.OperationContextImpl.executeOperation(OperationContextImpl.java:1415)
    at org.jboss.as.controller@14.0.1.Final//org.jboss.as.controller.ModelControllerImpl.boot(ModelControllerImpl.java:529)
    at org.jboss.as.controller@14.0.1.Final//org.jboss.as.controller.AbstractControllerService.boot(AbstractControllerService.java:515)
    at org.jboss.as.controller@14.0.1.Final//org.jboss.as.controller.AbstractControllerService.boot(AbstractControllerService.java:477)
    at org.jboss.as.server@14.0.1.Final//org.jboss.as.server.ServerService.boot(ServerService.java:451)
    at org.jboss.as.server@14.0.1.Final//org.jboss.as.server.ServerService.boot(ServerService.java:404)
    at org.jboss.as.controller@14.0.1.Final//org.jboss.as.controller.AbstractControllerService$1.run(AbstractControllerService.java:416)
    at java.base/java.lang.Thread.run(Thread.java:834)

如何修复上面的日志中显示的错误。我的应用程序和配置工作起来就像一个魅力与WF 17最终。

bnlyeluc

bnlyeluc1#

问题似乎是缺少prefix。您可以使用CLI通过添加前缀来修复此问题。使用嵌入式服务器,以下操作应该有效。

embed-server
/subsystem=microprofile-metrics-smallrye:write-attribute(name=prefix, value=${wildfly.metrics.prefix:wildfly})
stop-embeddes-server

由于您没有使用子系统,因此可以删除子系统。

embed-server
/subsystem=microprofile-metrics-smallrye:remove
stop-embedded-server
exit

这里假设你使用的是默认的standalone.xml文件名。如果你配置的文件名不同,你可以使用embed-server --server-config=custom-standalone.xml
如果要重新添加子系统,可以使用以下CLI命令:

/subsystem=microprofile-metrics-smallrye:add(exposed-subsystems=["*"], prefix="${wildfly.metrics.prefix:wildfly}", security-enabled=false)

相关问题