Search code examples
macosjbosswildfly

WildFly 20.0.0.Final - Unable to read the logging configuration from 'logging.properties' (java.net.UnknownHostException: usr)


I upgrade from WildFly 19.x to 20.0.0.Final on 2020-06-08. My App was running fine locally with no issues & I didn't really notice anything.

I was away last weekend in the "Wild Countryside" with a very slow Internet connection. When I start WildFly 20 it starts with:

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

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

It then hangs for 3-5 minutes and then starts, runs & deploys with:

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.

If I switch back to WildFly 19.0.0.Final it's OK. (I don't get: 'Unable to read the logging configuration from').

What is causing the: "Unable to read the logging configuration from" ?

TIA

2.

WildFly 20.x has two '//':

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

WildFly 19.x has one '/':

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

macOS Catalina 10.15.5


Solution

  • So the issue is the double forward slash at the beginning of the JBOSS_HOME environment variable. Both Wildfly 19 and 20 start with the same issue if I have the double slash (this is on Linux but the issue is the same):

    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 is interpreting the //home in my example as a host and then tries to connect to it. The fix is to either remove JBOSS_HOME from your environment and let standalone.sh figure it out or fix the double forward slash in your environment variable.

    My guess is that there is some code that looks for the double slash and, if it exists, blindly replaces the file: portion with http:.