1 Reply Latest reply on Oct 3, 2019 5:35 AM by Ajay Jaiswal

    Wildfly Server is failing in non windows environment and with error WFLYCTL0017 && WFLYCTL0013

    Ajay Jaiswal Newbie

      I'm passing a few commands with ProcessBuilder(JAVA) to standalone.sh.

      When I'm running in a windows environment with standalone.bat with the same argument just path has been taken care it's able to run in Windows.

       

      But when I'm trying same code with mac or RedHat Linux it's getting failed.

       

       

      And I'm not able to see it in log files as its getting failed before starting the server.

      I have tried comparing both standalone.xml from windows and MAC both are identical.

      For Mac which it's failing

       

       

      JBoss Bootstrap Environment

      JBOSS_HOME: /Applications/CA/10.5SQLSERVER/IdentityAccessManager

      JAVA: /Library/Java/JavaVirtualMachines/jdk1.8.0_171.jdk/Contents/Home/jre/bin/java

       

      JAVA_OPTS:  -server -Diam.keystore.password=\${VAULT::IAM::IAM_KEYSTORE_PASSWORD::1} -DIAM_HOME=/Applications/CA/10.5SQLSERVER/IdentityAccessManager/ -Diam.db.password=\${VAULT::IAM::IAM_DB_PASSWORD::1} -Diam.db.jdbc.driver.path=/Users/ajay/driveD/software/jars/sqljdbc4-4.0.jar -Diam.vault.enc.iteration.count=120 -Diam.db.vendor=mssql -Diam.vault.keystore.password.masked=MASK-7DscHYCAzRJgjgpBba72IwRGfBaq4CFF70uETVutVDX -Diam.truststore.password=\${VAULT::IAM::IAM_TRUSTSTORE_PASSWORD::1} -Diam.db.url=jdbc:sqlserver://ibndev000608.bpc.broadcom.net:1433;databaseName=IAM105_VAULT -Diam.keystore=/Applications/CA/10.5SQLSERVER/IdentityAccessManager/certs/webreckeys.ks -Diam.vault.keystore.salt=6zqH6N6p -Diam.truststore=/Applications/CA/10.5SQLSERVER/IdentityAccessManager/certs/iam-truststore.ks -Diam.vault.enc.file.dir=/Applications/CA/10.5SQLSERVER/IdentityAccessManager/vault/ -Diam.vault.keystore.alias=vault -Diam.vault.keystore.url=/Applications/CA/10.5SQLSERVER/IdentityAccessManager/vault/vault.keystore -Diam.db.user=sa -Djboss.http.port=51112 -Djboss.https.port=51111 -Djboss.bind.address.management=0.0.0.0 -Djboss.bind.address=0.0.0.0 -Dkeycloak.migration.action=import -Dkeycloak.migration.provider=iam-updater -Dkeycloak.migration.dir=../realms-to-import -Dkeycloak.migration.strategy=IGNORE_EXISTING -Diam.version=1.2.1-SNAPSHOT -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -agentlib:jdwp=transport=dt_socket,address=8787,server=y,suspend=n

       

       

       

      And the Error I'm getting is

      ./standalone.sh: line 311: -Diam.keystore=/Applications/CA/10.5SQLSERVER/IdentityAccessManager/certs/webreckeys.ks: No such file or directory

       

       

      Even webreckeys.ks this file is in place and all permission is there.

       

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

       

       

      Usage: java [-options] class [args...]

                 (to execute a class)

         or  java [-options] -jar jarfile [args...]

                 (to execute a jar file)

      where options include:

          -d32   use a 32-bit data model if available

          -d64   use a 64-bit data model if available

          -server   to select the "server" VM

                        The default VM is server,

                        because you are running on a server-class machine.

       

       

       

       

          -cp <class search path of directories and zip/jar files>

          -classpath <class search path of directories and zip/jar files>

                        A : separated list of directories, JAR archives,

                        and ZIP archives to search for class files.

          -D<name>=<value>

                        set a system property

          -verbose:[class|gc|jni]

                        enable verbose output

          -version      print product version and exit

          -version:<value>

                        Warning: this feature is deprecated and will be removed

                        in a future release.

                        require the specified version to run

          -showversion  print product version and continue

          -jre-restrict-search | -no-jre-restrict-search

                        Warning: this feature is deprecated and will be removed

                        in a future release.

                        include/exclude user private JREs in the version search

          -? -help      print this help message

          -X            print help on non-standard options

          -ea[:<packagename>...|:<classname>]

          -enableassertions[:<packagename>...|:<classname>]

                        enable assertions with specified granularity

          -da[:<packagename>...|:<classname>]

          -disableassertions[:<packagename>...|:<classname>]

                        disable assertions with specified granularity

          -esa | -enablesystemassertions

                        enable system assertions

          -dsa | -disablesystemassertions

                        disable system assertions

          -agentlib:<libname>[=<options>]

                        load native agent library <libname>, e.g. -agentlib:hprof

                        see also, -agentlib:jdwp=help and -agentlib:hprof=help

          -agentpath:<pathname>[=<options>]

                        load native agent library by full pathname

          -javaagent:<jarpath>[=<options>]

                        load Java programming language agent, see java.lang.instrument

          -splash:<imagepath>

                        show splash screen with specified image

      See http://www.oracle.com/technetwork/java/javase/documentation/index.html for more details.

      ./standalone.sh: line 311: -Diam.keystore=/Applications/CA/10.5SQLSERVER/IdentityAccessManager/certs/webreckeys.ks: No such file or directory

       

       

       

       

       

       

       

      For windows, it's able to run

       

      JBoss Bootstrap Environment

      JBOSS_HOME: "C:\PROGRA~1\CA\IAM_10_5\IDENTI~1"

      JAVA: "C:\Program Files\Java\jdk1.8.0_221\jre\bin\java"

      JAVA_OPTS: "-Dprogram.name=standalone.bat  -Diam.keystore.password=${VAULT::IAM::IAM_KEYSTORE_PASSWORD::1} -DIAM_HOME=C:\PROGRA~1\CA\IAM_10_5\IDENTI~1\ -Diam.db.password=${VAULT::IAM::IAM_DB_PASSWORD::1} -Diam.db.jdbc.driver.path=D:\setups\10.5\sqljdbc4-4.0.jar -Diam.vault.enc.iteration.count=120 -Diam.db.vendor=mssql -Diam.vault.keystore.password.masked=MASK-7DscHYCAzRJgjgpBba72IwRGfBaq4CFF70uETVutVDX -Diam.truststore.password=${VAULT::IAM::IAM_TRUSTSTORE_PASSWORD::1} -Diam.db.url=jdbc:sqlserver://ibndev000608.bpc.broadcom.net:1433;databaseName=LocalWindowsIAM10_5 -Diam.keystore=C:\PROGRA~1\CA\IAM_10_5\IDENTI~1\certs/webreckeys.ks -Diam.vault.keystore.salt=6zqH6N6p -Diam.truststore=C:\PROGRA~1\CA\IAM_10_5\IDENTI~1\certs/iam-truststore.ks -Diam.vault.enc.file.dir=C:\PROGRA~1\CA\IAM_10_5\IDENTI~1\vault/ -Diam.vault.keystore.alias=vault -Diam.vault.keystore.url=C:\PROGRA~1\CA\IAM_10_5\IDENTI~1\vault/vault.keystore -Diam.db.user=sa -Djboss.http.port=51112 -Djboss.https.port=51111 -Djboss.bind.address.management=0.0.0.0 -Djboss.bind.address=0.0.0.0 -Dkeycloak.migration.action=import -Dkeycloak.migration.provider=iam-updater -Dkeycloak.migration.dir=../realms-to-import -Dkeycloak.migration.strategy=IGNORE_EXISTING -Diam.version=1.2.1-SNAPSHOT -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true"

       

       

       

       

       

      After enabling the logging level to DEBUG

       

       

      I could see few errors

       

       

       

      2019-09-23 12:18:55,175 DEBUG [org.jboss.as.controller.management-operation] (main) WFLYCTL0017: Operation ("read-resource") failed - address: ([

          ("subsystem" => "datasources"),

          ("jdbc-driver" => "mssql")

      ]) - failure description: "WFLYCTL0216: Management resource '[

          (\"subsystem\" => \"datasources\"),

          (\"jdbc-driver\" => \"mssql\")

      ]' not found"

       

      And Other one is

       

      2019-09-17 17:06:00,607 ERROR [org.jboss.as.controller.management-operation] (main) WFLYCTL0013: Operation ("list-resource-loader-paths") failed - address: ([("core-service" => "module-loading")]) - failure description: "com.microsoft.sqlserver.jdbc"

       

       

      And Here is subsytem tag in standalone.xml

       

      <subsystem xmlns="urn:jboss:domain:datasources:5.0">

                  <datasources>

                      <datasource jndi-name="java:jboss/datasources/ExampleDS" pool-name="ExampleDS" enabled="true" use-java-context="true">

                          <connection-url>jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE</connection-url>

                          <driver>h2</driver>

                          <security>

                              <user-name>sa</user-name>

                              <password>sa</password>

                          </security>

                      </datasource>

                      <datasource jndi-name="java:jboss/datasources/KeycloakDS" pool-name="KeycloakDS" enabled="true" use-java-context="true" use-ccm="true">

                          <connection-url>${iam.db.url}</connection-url>

                          <driver>mssql</driver>

                          <pool>

                              <flush-strategy>IdleConnections</flush-strategy>

                          </pool>

                          <security>

                              <user-name>${iam.db.user}</user-name>

                              <password>${iam.db.password}</password>

                          </security>

                          <validation>

                              <check-valid-connection-sql>SELECT 1</check-valid-connection-sql>

                              <background-validation>true</background-validation>

                              <background-validation-millis>60000</background-validation-millis>

                          </validation>

                      </datasource>

                      <drivers>

                          <driver name="h2" module="com.h2database.h2">

                              <xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>

                          </driver>

                          <driver name="mssql" module="com.microsoft.sqlserver.jdbc">

                              <driver-class>com.microsoft.sqlserver.jdbc.SQLServerDriver</driver-class>

                          </driver>

                      </drivers>

                  </datasources>

              </subsystem>

        • 1. Re: Wildfly Server is failing in non windows environment and with error WFLYCTL0017 && WFLYCTL0013
          Ajay Jaiswal Newbie

          I found the answer, why it was failing and misleading with error msg.

          The cause was with - Diam.db.url=jdbc:sqlserver://ibndev000608.bpc.broadcom.net:1433;databaseName=IAM105_VAULT

          In the value of -Diam.db.url is having a semicolon jdbc:sqlserver://ibndev000608.bpc.broadcom.net:1433;databaseName=IAM105_VAULT

          and after semicolon databaseName=IAM105_VAULT

          And next after keystore command was there

          -databaseName=IAM105_VAULT -Diam.keystore=/Applications/CA/10.5SQLSERVER/IdentityAccessManager/certs/webreckeys.ks

          so It's became like

          databaseName=IAM105_VAULT -Diam.keystore=/Applications/CA/10.5SQLSERVER/IdentityAccessManager/certs/webreckeys.ks

          And in Linux and Mac environment semicolon means separator between two commands.

          How did I troubleshoot is

          I opened standalone.sh and place at first line set -x which means trace the shell script.

          And it's shown two commands so I identified and enclosed JDBC URL in double quotes (" ")

          -Diam.db.url="jdbc:sqlserver://ibndev000608.bpc.broadcom.net:1433;databaseName=IAM105_VAULT" -Diam.keystore=/Applications/CA/10.5SQLSERVER/IdentityAccessManager/certs/webreckeys.ks

          And it's work for me... thanks for all your effort guys.