[jboss-jira] [JBoss JIRA] (WFLY-13537) Windows Service cannot be stopped when using custom JAVA_HOME path

Walter Raaflaub (Jira) issues at jboss.org
Fri May 29 07:46:00 EDT 2020


     [ https://issues.redhat.com/browse/WFLY-13537?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Walter Raaflaub updated WFLY-13537:
-----------------------------------
    Steps to Reproduce: 
Wildfly Windows service cannot be stopped

# install JDK to a custom path, e.g. D:\basedir\java\jdk11
# verify: no global JAVA_HOME environment variable
# install Wildfly
# set JAVA_HOME path in standalone.conf.bat (line 35): {{set "JAVA_HOME=D:\basedir\java\jdk11"}}
# register Wildfly as Windows service
# start Windows service
# stop Windows service
# verify contents of stoud.log:

{{2020-05-28 21:42:54 Commons Daemon procrun stdout initialized
Calling "D:\basedir\keycloak-10.0.1\bin\standalone.conf.bat"

Setting JAVA property to "D:\basedir\java\jdk11\bin\java"

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



  JBoss Bootstrap Environment



  JBOSS_HOME: "D:\basedir\keycloak-10.0.1"



  JAVA: "D:\basedir\java\jdk11\bin\java"



  JAVA_OPTS: "-Dprogram.name=standalone.bat -Xms64M -Xmx512M -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman  --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"



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



21:43:01,439 INFO  [org.jboss.modules] (main) JBoss Modules version 1.10.0.Final

21:43:04,399 INFO  [org.jboss.msc] (main) JBoss MSC version 1.4.11.Final

21:43:04,414 INFO  [org.jboss.threads] (main) JBoss Threads version 2.3.3.Final

21:43:04,649 INFO  [org.jboss.as] (MSC service thread 1-2) WFLYSRV0049: Keycloak 10.0.1 (WildFly Core 11.1.1.Final) starting

...

21:43:24,646 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0025: Keycloak 10.0.1 (WildFly Core 11.1.1.Final) started in 28567ms - Started 591 of 889 services (606 services are lazy, passive or on-demand)

JAVA_HOME is not set. Unexpected results may occur.

Set JAVA_HOME to the directory of your local JDK to avoid this message.

Drcken Sie eine beliebige Taste . . . 
}}

  was:
Wildfly Windows service cannot be stopped

# install JDK to a custom path, e.g. D:\basedir\java\jdk11
# verify: no global JAVA_HOME environment variable
# install Wildfly
# set JAVA_HOME path in standalone.conf.bat (line 35): {{set "JAVA_HOME=D:\basedir\java\jdk11"}}
# register Wildfly as Windows service
# start Windows service
# stop Windows service
# verify contents of stoud.log:

{{
2020-05-28 21:42:54 Commons Daemon procrun stdout initialized
Calling "D:\basedir\keycloak-10.0.1\bin\standalone.conf.bat"

Setting JAVA property to "D:\basedir\java\jdk11\bin\java"

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



  JBoss Bootstrap Environment



  JBOSS_HOME: "D:\basedir\keycloak-10.0.1"



  JAVA: "D:\basedir\java\jdk11\bin\java"



  JAVA_OPTS: "-Dprogram.name=standalone.bat -Xms64M -Xmx512M -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman  --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"



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



21:43:01,439 INFO  [org.jboss.modules] (main) JBoss Modules version 1.10.0.Final

21:43:04,399 INFO  [org.jboss.msc] (main) JBoss MSC version 1.4.11.Final

21:43:04,414 INFO  [org.jboss.threads] (main) JBoss Threads version 2.3.3.Final

21:43:04,649 INFO  [org.jboss.as] (MSC service thread 1-2) WFLYSRV0049: Keycloak 10.0.1 (WildFly Core 11.1.1.Final) starting

...

21:43:24,646 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0025: Keycloak 10.0.1 (WildFly Core 11.1.1.Final) started in 28567ms - Started 591 of 889 services (606 services are lazy, passive or on-demand)

JAVA_HOME is not set. Unexpected results may occur.

Set JAVA_HOME to the directory of your local JDK to avoid this message.

Drcken Sie eine beliebige Taste . . . 
}}



> Windows Service cannot be stopped when using custom JAVA_HOME path
> ------------------------------------------------------------------
>
>                 Key: WFLY-13537
>                 URL: https://issues.redhat.com/browse/WFLY-13537
>             Project: WildFly
>          Issue Type: Bug
>          Components: Scripts
>    Affects Versions: 11.0.0.Final
>            Reporter: Walter Raaflaub
>            Priority: Major
>
> I am running Wildfly as a Windows service on Windows Server 2019. The service starts up and works correctly; but it hangs when I try to stop it.
> There is no global JAVA_HOME environment variable defined on the server; I'm using a custom JAVA_HOME path that I have configured in standalone.conf.bat. 
> While stopping, the service issues the following warning in stdout.log:
> {{JAVA_HOME is not set. Unexpected results may occur.
> Set JAVA_HOME to the directory of your local JDK to avoid this message.
> Drcken Sie eine beliebige Taste . . . }} (German vor "Press any key ...")
> It seems that when stopping the service, the JAVA_HOME setting is not correctly passed to the jboss-cli.bat script. The script seems to be waiting for user input, which is akward in a Windows service. That means that also the NOPAUSE setting is not passed correctly to jboss-cli.bat script.



--
This message was sent by Atlassian Jira
(v7.13.8#713008)



More information about the jboss-jira mailing list