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

Embedded server started non-modular use first passed --jboss-home value only

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 2.0.0.Beta4
    • Fix Version/s: 2.0.5.CR1
    • Component/s: Management
    • Labels:
      None

      Description

      First value passed as --jboss-home to embed server instance (must be an existing directory) is always used for modules lookup and server standard paths setup within single CLI session.

      1. Use wrong directory on first try, use correct directory on second try, embedded instance still tries to boot from wrong directory
        $ pwd
        /home/pkremens/workspace/jboss-eap-7.0/bin/client
        $ java -jar jboss-cli-client.jar 
        
        [disconnected /] embed-server --jboss-home=/home/pkremens/workspace/jboss-eap-7.0/bin
        Cannot start embedded server: WFLYEMB0014: Cannot load module org.jboss.vfs from: local module loader @500e80c2 (finder: local module finder @75670fc4 (roots: /home/pkremens/workspace/jboss-eap-7.0/bin/modules)): org.jboss.vfs:main
        
        # server still tries to use /home/pkremens/workspace/jboss-eap-7.0/bin
        [disconnected /] embed-server --jboss-home=/home/pkremens/workspace/jboss-eap-7.0    
        Cannot start embedded server: WFLYEMB0014: Cannot load module org.jboss.vfs from: local module loader @500e80c2 (finder: local module finder @75670fc4 (roots: /home/pkremens/workspace/jboss-eap-7.0/bin/modules)): org.jboss.vfs:main
        
      2. Try to manage multiple EAP distros
        /home/pkremens/workspace2
        ├── eap1
        │   └── jboss-eap-7.0
        └── eap2
            └── jboss-eap-7.0
        
        $ java -jar jboss-cli-client.jar 
        
        [disconnected /] embed-server --jboss-home=/home/pkremens/workspace2/eap1/jboss-eap-7.0 --server-config=eap1.xml --empty-config
        [standalone@embedded /] stop-embedded-server 
        
        [disconnected /] embed-server --jboss-home=/home/pkremens/workspace2/eap2/jboss-eap-7.0 --server-config=eap2.xml --empty-config
        
        # jboss.server.*.dir point to eap1, but should point to eap2
        [standalone@embedded /] /path=*:read-attribute(name=path)
        ...
                    "address" => [("path" => "jboss.server.log.dir")],
                    "result" => "/home/pkremens/workspace2/eap1/jboss-eap-7.0
        
                    "address" => [("path" => "jboss.server.data.dir")],
                    "result" => "/home/pkremens/workspace2/eap1/jboss-eap-7.0/standalone/data"
        
                    "address" => [("path" => "jboss.server.base.dir")],
                    "result" => "/home/pkremens/workspace2/eap1/jboss-eap-7.0/standalone"
        
                    "address" => [("path" => "jboss.server.config.dir")],
                    "result" => "/home/pkremens/workspace2/eap1/jboss-eap-7.0/standalone/configuration"
        
                    "address" => [("path" => "jboss.server.temp.dir")],
                    "result" => "/home/pkremens/workspace2/eap1/jboss-eap-7.0/standalone/tmp"
        
                    "address" => [("path" => "jboss.controller.temp.dir")],
                    "result" => "/home/pkremens/workspace2/eap1/jboss-eap-7.0/standalone/tmp"
        
                    "address" => [("path" => "jboss.home.dir")],
                    "result" => "/home/pkremens/workspace2/eap2/jboss-eap-7.0"
        ...
        # Both configuration files were created in eap1 directory
        $ find /home/pkremens/workspace2 | grep eap[12].xml
        /home/pkremens/workspace2/eap1/jboss-eap-7.0/standalone/configuration/eap2.xml
        /home/pkremens/workspace2/eap1/jboss-eap-7.0/standalone/configuration/eap1.xml
        

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  luck3y Ken Wills
                  Reporter:
                  pkremens Petr Kremensky
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: