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

[GSS](8.0.z) Applying update fails when JBoss EAP installation directory (JBOSS_HOME) is symbolic link

XMLWordPrintable

    • False
    • None
    • False
    • Hide

      Apply update with Installation Manager (jboss-eap-installation-manager.sh) with specifying real path to "–dir" option instead of specifying symbolic link. 

      Show
      Apply update with Installation Manager (jboss-eap-installation-manager.sh) with specifying real path to "–dir" option instead of specifying symbolic link. 
    • Hide

      1. Install EAP 8.0.0 by extracting distribution zip

      $ cd /opt/
      $ unzip jboss-eap-8.0.0.zip
      

      2. Create a symbolic link

      $ ln -s /opt/jboss-eap-8.0 /opt/jboss8
      

      3. Apply update. For example, 8.0.2 (CP2)

      • JBoss-CLI:
        $ cd /opt/jboss8
        $ ./bin/standalone.sh
        
        $ ./bin/jboss-cli.sh -c --commands='installer update --maven-repo-files=/path/to/jboss-eap-8.0.2-maven-repository.zip --confirm, shutdown --perform-installation'
        

      or

      • Installation Manager:
        $ cd /opt/
        $ unzip jboss-eap-8.0.2-installation-manager.zip
        $ cd /opt/jboss-eap-installation-manager-8.0/
        $ ./bin/jboss-eap-installation-manager.sh update perform --dir=/opt/jboss8 
        

        Note: If you execute "./bin/jboss-eap-installation-manager.sh" under your JBoss Installation directory (JBOSS_HOME) and invoke "update perform" without "--dir" option, the issue does not happens

      4. You will see the following ERROR at the last step of applying update

      • With JBoss-CLI, no error in server.log and JBoss-CLI but the following ERROR is output in the console of running server:
        09:43:17,823 INFO  [org.wildfly.prospero] (main) PRSP000025: Applying update candidate from /opt/jboss8/standalone/tmp/installation-manager/prepared-server
        09:43:17,989 INFO  [org.wildfly.prospero] (main) PRSP000026: Changed artifacts [[MODIFIED] ...(snip)...
        
        ERROR: java.nio.file.FileAlreadyExistsException: /opt/jboss8
        ERROR: The operation was unsuccessful. The candidate server was not installed correctly.
        INFO: Restarting...
        09:43:24,822 INFO  [org.jboss.modules] (main) JBoss Modules version 2.1.0.Final-redhat-00001  // <-- jboss-modules.jar is not updated and still old version.
        09:43:25,595 INFO  [org.jboss.msc] (main) JBoss MSC version 1.5.1.Final-redhat-00001
        09:43:25,609 INFO  [org.jboss.threads] (main) JBoss Threads version 2.4.0.Final-redhat-00001
        09:43:25,797 INFO  [org.jboss.as] (MSC service thread 1-3) WFLYSRV0049: JBoss EAP 8.0 Update 2.0 (WildFly Core 21.0.9.Final-redhat-00001) starting // <-- However, CP2 has been apparently applied...
        
      • With Installation Manager, no error in logs/installation.log but only the following ERROR is output in the console of jboss-eap-installation-manager.sh:
        ERROR: java.nio.file.FileAlreadyExistsException: /opt/jboss8
        

      5. Patch history does not show the update applied

      $ ./bin/jboss-cli.sh -c --commands='installer history'
      [3268b557] 2024-01-19T09:04:16Z - install [org.jboss.eap.channels:eap-8.0::1.0.1.GA-redhat-00003]
      
      $ ./bin/jboss-eap-installation-manager.sh history --dir=/opt/jboss8
      [3268b557] 2024-01-19T09:04:16Z - install [org.jboss.eap.channels:eap-8.0::1.0.1.GA-redhat-00003]
      

      6. You will see the following ERROR when starting "embed-server" in JBoss-CLI:

      $ ./bin/jboss-cli.sh 
      You are disconnected at the moment. Type 'connect' to connect to the server or 'help' for the list of supported commands.
      [disconnected /] embed-server 
      org/jboss/modules/ModuleLoggerFinder: org.jboss.modules.ModuleLoggerFinder from [Module "org.wildfly.embedded" version 21.0.9.Final-redhat-00001 fr
      om local module loader @3a1a3f52 (finder: local module finder @7177ab38 (roots: /opt/jboss8/modules,/opt/jboss8/modules/system/layers/base))]
      
      Show
      1. Install EAP 8.0.0 by extracting distribution zip $ cd /opt/ $ unzip jboss-eap-8.0.0.zip 2. Create a symbolic link $ ln -s /opt/jboss-eap-8.0 /opt/jboss8 3. Apply update. For example, 8.0.2 (CP2) JBoss-CLI: $ cd /opt/jboss8 $ ./bin/standalone.sh $ ./bin/jboss-cli.sh -c --commands= 'installer update --maven-repo-files=/path/to/jboss-eap-8.0.2-maven-repository.zip --confirm, shutdown --perform-installation' or Installation Manager: $ cd /opt/ $ unzip jboss-eap-8.0.2-installation-manager.zip $ cd /opt/jboss-eap-installation-manager-8.0/ $ ./bin/jboss-eap-installation-manager.sh update perform --dir=/opt/jboss8 Note: If you execute "./bin/jboss-eap-installation-manager.sh" under your JBoss Installation directory (JBOSS_HOME) and invoke "update perform" without "--dir" option, the issue does not happens 4. You will see the following ERROR at the last step of applying update With JBoss-CLI, no error in server.log and JBoss-CLI but the following ERROR is output in the console of running server: 09:43:17,823 INFO [org.wildfly.prospero] (main) PRSP000025: Applying update candidate from /opt/jboss8/standalone/tmp/installation-manager/prepared-server 09:43:17,989 INFO [org.wildfly.prospero] (main) PRSP000026: Changed artifacts [[MODIFIED] ...(snip)... ERROR: java.nio.file.FileAlreadyExistsException: /opt/jboss8 ERROR: The operation was unsuccessful. The candidate server was not installed correctly. INFO: Restarting... 09:43:24,822 INFO [org.jboss.modules] (main) JBoss Modules version 2.1.0.Final-redhat-00001 // <-- jboss-modules.jar is not updated and still old version. 09:43:25,595 INFO [org.jboss.msc] (main) JBoss MSC version 1.5.1.Final-redhat-00001 09:43:25,609 INFO [org.jboss.threads] (main) JBoss Threads version 2.4.0.Final-redhat-00001 09:43:25,797 INFO [org.jboss.as] (MSC service thread 1-3) WFLYSRV0049: JBoss EAP 8.0 Update 2.0 (WildFly Core 21.0.9.Final-redhat-00001) starting // <-- However, CP2 has been apparently applied... With Installation Manager, no error in logs/installation.log but only the following ERROR is output in the console of jboss-eap-installation-manager.sh: ERROR: java.nio.file.FileAlreadyExistsException: /opt/jboss8 5. Patch history does not show the update applied $ ./bin/jboss-cli.sh -c --commands= 'installer history' [3268b557] 2024-01-19T09:04:16Z - install [org.jboss.eap.channels:eap-8.0::1.0.1.GA-redhat-00003] $ ./bin/jboss-eap-installation-manager.sh history --dir=/opt/jboss8 [3268b557] 2024-01-19T09:04:16Z - install [org.jboss.eap.channels:eap-8.0::1.0.1.GA-redhat-00003] 6. You will see the following ERROR when starting "embed-server" in JBoss-CLI: $ ./bin/jboss-cli.sh You are disconnected at the moment. Type 'connect' to connect to the server or 'help' for the list of supported commands. [disconnected /] embed-server org/jboss/modules/ModuleLoggerFinder: org.jboss.modules.ModuleLoggerFinder from [Module "org.wildfly.embedded" version 21.0.9.Final-redhat-00001 fr om local module loader @3a1a3f52 (finder: local module finder @7177ab38 (roots: /opt/jboss8/modules,/opt/jboss8/modules/system/layers/base))]

      When specified JBoss EAP 8.x installation directory (JBOSS_HOME) is a symbolic link, applying update fails with "ERROR: java.nio.file.FileAlreadyExistsException: <specified-path-of-JBOSS_HOME-directory>".

      This issue can happen with whether JBoss-CLI ("installer update" and "shutdown -perform-installation") or jboss-eap-installation-manager.sh (invoke "update perform" along with setting "-dir" option).
      (Note: If you use "JBOSS_HOME/bin/jboss-eap-installation-manager.sh" of your JBoss Installation directory and execute "./bin/jboss-eap-installation-manager.sh update perform" under JBOSS_HOME directory without setting "--dir" option , the issue luckily does not happen.)

      Actually, it fails only at the last part of applying updates (copying jboss-modules.jar), so other files under modules directory are appearantly updated succeessfully before the ERROR message.

      This results in the following incosistent state of installation:

      • The version information output of "./bin/standalone.sh --verion" says "JBoss EAP 8.0.2"
        (Even if applying update stopped with the ERROR message and not completed correctly, the version shows newer version.)
      • The output of "installer history" in JBoss-CLI or "./bin/jboss-eap-installation-manager.sh history" do not show update history.
      • $JBOSS_HOME/jboss-modules.jar is not updated, so the following ERROR can happen when starting "embed-server" in JBoss-CLI in JBoss EAP 8.0.2. Because "org.jboss.modules.ModuleLoggerFinder" only exists in newer versions of jboss-modules.jar included in JBoss EAP 8.0.2+ and some modules (like "embed-server") depends on it.
      $ ./bin/jboss-cli.sh 
      You are disconnected at the moment. Type 'connect' to connect to the server or 'help' for the list of supported commands.
      [disconnected /] embed-server 
      org/jboss/modules/ModuleLoggerFinder: org.jboss.modules.ModuleLoggerFinder from [Module "org.wildfly.embedded" version 21.0.9.Final-redhat-00001 fr
      om local module loader @3a1a3f52 (finder: local module finder @7177ab38 (roots: /opt/jboss8/modules,/opt/jboss8/modules/system/layers/base))]
      

              spyrkob Bartosz Spyrko-Smietanko
              rhn-support-mmiura Masafumi Miura
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: