Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-23825

(7.4.z) WFCORE-5970 - Server does not start when configuration file is a soft link to a file outside of the server configuration directory

XMLWordPrintable

    • False
    • None
    • False
    • Hide

      1. copy $EAP_HOME/standalone/configuration/standalone.xml to a location outside of the default jboss.server.configuration.dir:

      $ cp $EAP_HOME/standalone/configuration/standalone.xml /tmp/
      

      2. delete current server configuration file:

      $ rm ./jboss-eap-7.4/standalone/configuration/standalone.xml
      

      3. make a soft link of the copied file and place it on the default server configuration dir:

      $ ln -s /tmp/standalone.xml $EAP_HOME/standalone/configuration/standalone.xml
      

      3. The server starts normally.
      The server starts.

      4. Applies CP 5. The server starts with the following error:

      [standalone@localhost:9990 /] patch apply jboss-eap-7.4.5-patch-05.zip
      {
          "outcome" : "success",
          "response-headers" : {
              "operation-requires-restart" : true,
              "process-state" : "restart-required"
          }
      }
      [standalone@localhost:9990 /] :shutdown(restart=true)
      
      16:01:38,717 INFO  [org.jboss.modules] (main) JBoss Modules version 1.12.0.Final-redhat-00001
      java.lang.IllegalStateException: WFLYCTL0214: Could not get main file: standalone.xml. Specified files must be relative to the configuration dir: /Users/yborgess/dev/servers/jboss-eap-7.4/standalone/configuration
      	at org.jboss.as.controller@15.0.13.Final-redhat-00001//org.jboss.as.controller.persistence.ConfigurationFile.determineMainFile(ConfigurationFile.java:381)
      	at org.jboss.as.controller@15.0.13.Final-redhat-00001//org.jboss.as.controller.persistence.ConfigurationFile.<init>(ConfigurationFile.java:206)
      	at org.jboss.as.server@15.0.13.Final-redhat-00001//org.jboss.as.server.ServerEnvironment.<init>(ServerEnvironment.java:590)
      	at org.jboss.as.server@15.0.13.Final-redhat-00001//org.jboss.as.server.Main.determineEnvironment(Main.java:425)
      	at org.jboss.as.server@15.0.13.Final-redhat-00001//org.jboss.as.server.Main.main(Main.java:97)
      	at org.jboss.modules.Module.run(Module.java:353)
      	at org.jboss.modules.Module.run(Module.java:321)
      	at org.jboss.modules.Main.main(Main.java:617)
      16:01:39,144 FATAL [org.jboss.as.server] (main) WFLYSRV0239: Aborting with exit code 1
      
      Show
      1. copy $EAP_HOME/standalone/configuration/standalone.xml to a location outside of the default jboss.server.configuration.dir: $ cp $EAP_HOME/standalone/configuration/standalone.xml /tmp/ 2. delete current server configuration file: $ rm ./jboss-eap-7.4/standalone/configuration/standalone.xml 3. make a soft link of the copied file and place it on the default server configuration dir: $ ln -s /tmp/standalone.xml $EAP_HOME/standalone/configuration/standalone.xml 3. The server starts normally. The server starts. 4. Applies CP 5. The server starts with the following error: [standalone@localhost:9990 /] patch apply jboss-eap-7.4.5-patch-05.zip { "outcome" : "success", "response-headers" : { "operation-requires-restart" : true, "process-state" : "restart-required" } } [standalone@localhost:9990 /] :shutdown(restart=true) 16:01:38,717 INFO [org.jboss.modules] (main) JBoss Modules version 1.12.0.Final-redhat-00001 java.lang.IllegalStateException: WFLYCTL0214: Could not get main file: standalone.xml. Specified files must be relative to the configuration dir: /Users/yborgess/dev/servers/jboss-eap-7.4/standalone/configuration at org.jboss.as.controller@15.0.13.Final-redhat-00001//org.jboss.as.controller.persistence.ConfigurationFile.determineMainFile(ConfigurationFile.java:381) at org.jboss.as.controller@15.0.13.Final-redhat-00001//org.jboss.as.controller.persistence.ConfigurationFile.<init>(ConfigurationFile.java:206) at org.jboss.as.server@15.0.13.Final-redhat-00001//org.jboss.as.server.ServerEnvironment.<init>(ServerEnvironment.java:590) at org.jboss.as.server@15.0.13.Final-redhat-00001//org.jboss.as.server.Main.determineEnvironment(Main.java:425) at org.jboss.as.server@15.0.13.Final-redhat-00001//org.jboss.as.server.Main.main(Main.java:97) at org.jboss.modules.Module.run(Module.java:353) at org.jboss.modules.Module.run(Module.java:321) at org.jboss.modules.Main.main(Main.java:617) 16:01:39,144 FATAL [org.jboss.as.server] (main) WFLYSRV0239: Aborting with exit code 1

      Before CP 5, the EAP server is able to start by using a configuration file that is a soft link to a configuration file that is located outside of the server configuration directory.

      This issue is caused by JBEAP-22907 where additional restrictions were added to control where this file can be located.

      The issue is JBEAP-22907 is now following the soft links and breaks server configuration environments that were working in CPs < 5

              yborgess1@redhat.com Yeray Borges Santana
              yborgess1@redhat.com Yeray Borges Santana
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: