WildFly 20.0.0.Final-无法从'logging.properties'中读取日志记录配置(java.net.UnknownHostException:usr)

我于2020-06-08从WildFly 19.x升级到20.0.0.Final。我的应用程序在本地运行良好,没有任何问题,而且我什么都没注意到。

我上周末在“狂野乡村”因互联网连接速度非常慢而离开。当我启动WildFly 20时,它开始于:

MacBook-Pro-2:bin NOTiFY$ ./standalone.sh -b 0.0.0.0 --server-config=standalone-full.xml
=========================================================================

  JBoss Bootstrap Environment

  JBOSS_HOME: //usr/local/Cellar/wildfly-as/wildfly-20.0.0.Final

  JAVA: /library/Java/JavaVirtualMachines/jdk-14.0.1.jdk/Contents/Home/bin/java

  JAVA_OPTS:  -server -Xms64m -Xmx512m -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true  --add-exports=java.base/sun.nio.ch=ALL-UNNAMED --add-exports=jdk.unsupported/sun.misc=ALL-UNNAMED --add-exports=jdk.unsupported/sun.reflect=ALL-UNNAMED

========================================================================= 

然后挂起3-5分钟,然后启动,运行和部署:

Unable to read the logging configuration from 'file://usr/local/Cellar/wildfly-as/wildfly-20.0.0.Final/standalone/configuration/logging.properties' (java.net.UnknownHostException: usr)

16:29:00,934 INFO  [org.jboss.as.server.deployment.scanner] (MSC service thread 1-8) WFLYDS0013: Started FileSystemDeploymentService for directory /usr/local/Cellar/wildfly-as/wildfly-20.0.0.Final/standalone/deployments
16:29:00,942 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-1) WFLYSRV0027: Starting deployment of "GoStopHandle.ear" (runtime-name: "GoStopHandle.ear")
16:29:00,965 INFO  [org.apache.activemq.artemis.core.server] (ServerService Thread Pool -- 84) AMQ221000: live Message Broker is starting with configuration Broker Configuration (clustered=false,journalDirectory=/usr/local/Cellar/wildfly-as/wildfly-20.0.0.Final/standalone/data/activemq/journal,bindingsDirectory=/usr/local/Cellar/wildfly-as/wildfly-20.0.0.Final/standalone/data/activemq/bindings,largeMessagesDirectory=/usr/local/Cellar/wildfly-as/wildfly-20.0.0.Final/standalone/data/activemq/largemessages,pagingDirectory=/usr/local/Cellar/wildfly-as/wildfly-20.0.0.Final/standalone/data/activemq/paging)
16:29:00,988 INFO  [org.apache.activemq.artemis.core.server] (ServerService Thread Pool -- 84) AMQ221013: Using NIO Journal
16:29:00,997 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-6) WFLYUT0006: Undertow HTTPS listener https listening on 0.0.0.0:8443
16:29:01,045 INFO  [org.apache.activemq.artemis.core.server] (ServerService Thread Pool -- 84) AMQ221043: Protocol module found: [artemis-server]. Adding protocol support for: CORE
16:29:01,046 INFO  [org.apache.activemq.artemis.core.server] (ServerService Thread Pool -- 84) AMQ221043: Protocol module found: [artemis-amqp-protocol]. Adding protocol support for: AMQP
16:29:01,046 INFO  [org.apache.activemq.artemis.core.server] (ServerService Thread Pool -- 84) AMQ221043: Protocol module found: [artemis-hornetq-protocol]. Adding protocol support for: HORNETQ
16:29:01,047 INFO  [org.apache.activemq.artemis.core.server] (ServerService Thread Pool -- 84) AMQ221043: Protocol module found: [artemis-stomp-protocol]. Adding protocol support for: STOMP
16:29:01,060 INFO  [org.jboss.ws.common.management] (MSC service thread 1-5) JBWS022052: Starting JBossWS 5.4.1.Final (Apache CXF 3.3.6) 
16:29:01,091 WARN  [org.apache.activemq.artemis.core.server] (ServerService Thread Pool -- 84) AMQ222219: File /local/Cellar/wildfly-as/wildfly-20.0.0.Final/standalone/configuration/logging.properties does not exist
16:29:01,114 INFO  [org.apache.activemq.artemis.core.server] (ServerService Thread Pool -- 84) AMQ221034: Waiting indefinitely to obtain live lock
16:29:01,114 INFO  [org.apache.activemq.artemis.core.server] (ServerService Thread Pool -- 84) AMQ221035: Live Server Obtained live lock
16:29:01,374 INFO  [org.apache.activemq.artemis.core.server] (ServerService Thread Pool -- 84) AMQ221003: Deploying ANYCAST queue jms.queue.ExpiryQueue on address jms.queue.ExpiryQueue
16:29:01,375 INFO  [org.apache.activemq.artemis.core.server] (ServerService Thread Pool -- 84) AMQ221003: Deploying ANYCAST queue jms.queue.DLQ on address jms.queue.DLQ
16:29:01,378 INFO  [org.wildfly.extension.messaging-activemq] (MSC service thread 1-6) WFLYMSGAMQ0016: Registered HTTP upgrade for activemq-remoting protocol handled by http-acceptor acceptor
16:29:01,378 INFO  [org.wildfly.extension.messaging-activemq] (MSC service thread 1-5) WFLYMSGAMQ0016: Registered HTTP upgrade for activemq-remoting protocol handled by http-acceptor-throughput acceptor
16:29:01,378 INFO  [org.wildfly.extension.messaging-activemq] (MSC service thread 1-3) WFLYMSGAMQ0016: Registered HTTP upgrade for activemq-remoting protocol handled by http-acceptor-throughput acceptor
16:29:01,378 INFO  [org.wildfly.extension.messaging-activemq] (MSC service thread 1-4) WFLYMSGAMQ0016: Registered HTTP upgrade for activemq-remoting protocol handled by http-acceptor acceptor
16:29:01,672 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-6) WFLYSRV0207: Starting subdeployment (runtime-name: "GoStopHandleWAR.war")
16:29:01,672 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-2) WFLYSRV0207: Starting subdeployment (runtime-name: "GoStopHandleJAR.jar")
16:29:01,759 INFO  [org.apache.activemq.artemis.core.server] (ServerService Thread Pool -- 84) AMQ221007: Server is now live
16:29:01,759 INFO  [org.apache.activemq.artemis.core.server] (ServerService Thread Pool -- 84) AMQ221001: Apache activeMQ Artemis Message Broker version 2.10.1 [default,nodeID=4c20d584-ad8f-11ea-9b5a-f8ffc25ffbcd] 
16:29:01,772 INFO  [org.wildfly.extension.messaging-activemq] (ServerService Thread Pool -- 84) WFLYMSGAMQ0002: Bound messaging object to jndi name java:/ConnectionFactory
16:29:01,806 WARN  [org.apache.activemq.artemis.jms.server] (ServerService Thread Pool -- 85) AMQ122005: Invalid "host" value "0.0.0.0" detected for "http-connector" connector. Switching to "MacBook-Pro-2.local". If this new address is incorrect please manually configure the connector to use the proper one.
16:29:01,808 INFO  [org.wildfly.extension.messaging-activemq] (ServerService Thread Pool -- 85) WFLYMSGAMQ0002: Bound messaging object to jndi name java:jboss/exported/jms/RemoteConnectionFactory
16:29:01,837 INFO  [org.jboss.as.connector.deployment] (MSC service thread 1-4) WFLYJCA0007: Registered connection factory java:/JmsXA
16:29:01,900 INFO  [org.apache.activemq.artemis.ra] (MSC service thread 1-4) AMQ151007: Resource adaptor started
16:29:01,900 INFO  [org.jboss.as.connector.services.resourceadapters.ResourceAdapteractivatorService$ResourceAdapteractivator] (MSC service thread 1-4) IJ020002: Deployed: file://Raactivatoractivemq-ra
16:29:01,902 INFO  [org.jboss.as.connector.deployment] (MSC service thread 1-1) WFLYJCA0118: Binding connection factory named java:/JmsXA to alias java:jboss/DefaultJMSConnectionFactory
16:29:01,902 INFO  [org.jboss.as.connector.deployment] (MSC service thread 1-4) WFLYJCA0002: Bound JCA ConnectionFactory [java:/JmsXA]
16:29:03,284 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-7) WFLYSRV0059: Class Path entry javax.activation-api-1.2.0.jar in /content/GoStopHandle.ear/GoStopHandleWAR.war/WEB-INF/lib/jaxb-runtime-2.3.1.jar  does not point to a valid jar for a Class-Path reference.

如果我切换回WildFly 19.0.0 。最后就可以了。 (我不会得到:“无法从中读取日志记录配置”。)

是什么原因导致:“无法从中读取日志记录配置?”

TIA

2。

WildFly 20.x具有两个'//':

JBOSS_HOME: //usr/local/Cellar/wildfly-as/wildfly-20.0.0.Final

WildFly 19.x具有一个'/':

JBOSS_HOME: /usr/local/Cellar/wildfly-as/wildfly-19.0.0.Final

macOS Catalina 10.15.5

iCMS 回答:WildFly 20.0.0.Final-无法从'logging.properties'中读取日志记录配置(java.net.UnknownHostException:usr)

因此,问题是JBOSS_HOME环境变量开头的双斜杠。 Wildfly 19和20都以相同的问题开头如果,我有双斜杠(这在Linux上,但是问题是相同的):

export JBOSS_HOME=//home/scott/wildfly/wildfly-20.0.0.Final

scott@coyote:~/wildfly/wildfly-20.0.0.Final$ bin/standalone.sh

   WARNING:  JBOSS_HOME may be pointing to a different installation - unpredictable results may occur.

             JBOSS_HOME: //home/scott/wildfly/wildfly-20.0.0.Final

=========================================================================

  JBoss Bootstrap Environment

  JBOSS_HOME: //home/scott/wildfly/wildfly-20.0.0.Final

  JAVA: java

  JAVA_OPTS:  -server -Xms64m -Xmx512m -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true  --add-exports=java.base/sun.nio.ch=ALL-UNNAMED --add-exports=jdk.unsupported/sun.misc=ALL-UNNAMED --add-exports=jdk.unsupported/sun.reflect=ALL-UNNAMED

=========================================================================

Unable to read the logging configuration from 'file://home/scott/wildfly/wildfly-20.0.0.Final/standalone/configuration/logging.properties' (java.net.UnknownHostException: home)
08:36:10,393 INFO  [org.jboss.as.server.deployment.scanner] (MSC service thread 1-5) WFLYDS0013: Started FileSystemDeploymentService for directory /home/scott/wildfly/wildfly-20.0.0.Final/standalone/deployments

Wildfly在我的示例中将//home解释为主机,然后尝试连接到它。解决方法是从您的环境中删除JBOSS_HOME并让standalone.sh找出来,或者修复环境变量中的双正斜杠。

我的猜测是,有一些代码在寻找双斜杠,如果存在,则用file:盲目替换http:部分。

,

升级到: wildfly-20.0.1.Final

=========================================================================

  JBoss Bootstrap Environment

  JBOSS_HOME: /usr/local/Cellar/wildfly-as/wildfly-20.0.1.Final

  JAVA: /Library/Java/JavaVirtualMachines/jdk-14.0.1.jdk/Contents/Home/bin/java

  JAVA_OPTS:  -server -Xms64m -Xmx512m -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true  --add-exports=java.base/sun.nio.ch=ALL-UNNAMED --add-exports=jdk.unsupported/sun.misc=ALL-UNNAMED --add-exports=jdk.unsupported/sun.reflect=ALL-UNNAMED

=========================================================================

13:48:07,800 INFO  [org.jboss.modules] (main) JBoss Modules version 1.10.1.Final
13:48:08,100 INFO  [org.jboss.msc] (main) JBoss MSC version 1.4.11.Final
13:48:08,104 INFO  [org.jboss.threads] (main) JBoss Threads version 2.3.3.Final
13:48:08,179 INFO  [org.jboss.as] (MSC service thread 1-2) WFLYSRV0049: WildFly Full 20.0.1.Final (WildFly Core 12.0.3.Final) starting

解决了我在20.0.0中遇到的``错误''。完整:

=========================================================================

  JBoss Bootstrap Environment

  JBOSS_HOME: //usr/local/Cellar/wildfly-as/wildfly-20.0.0.Final

  JAVA: /Library/Java/JavaVirtualMachines/jdk-14.0.1.jdk/Contents/Home/bin/java

  JAVA_OPTS:  -server -Xms64m -Xmx512m -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true  --add-exports=java.base/sun.nio.ch=ALL-UNNAMED --add-exports=jdk.unsupported/sun.misc=ALL-UNNAMED --add-exports=jdk.unsupported/sun.reflect=ALL-UNNAMED

=========================================================================

Unable to read the logging configuration from 'file://usr/local/Cellar/wildfly-as/wildfly-20.0.0.Final/standalone/configuration/logging.properties' (java.net.UnknownHostException: usr)
,

就我而言,我忘记设置JBOSS_HOME环境变量。我将其指向wildfly安装文件夹,它可以正常工作。 导出set JBOSS_HOME "C:\Servers\wildfly-20.0.1.Final"

本文链接:https://www.f2er.com/1989992.html

大家都在问