Uploaded image for project: 'WildFly Core'
  1. WildFly Core
  2. WFCORE-5970

Server does not start when configuration file is a soft link to a file outside of the server configuration directory

XMLWordPrintable

    • 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 19.0.0.Beta6, the 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 WFCORE-5792 where additional restrictions were added to control where this file can be located.

      The issue is now we are following the soft links and that breaks server configuration environments that were working before.

            parsharm Parul Sharma
            yborgess1@redhat.com Yeray Borges Santana
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: