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

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 7.0.0.ER4
    • 7.0.0.DR9
    • Management
    • None

      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
        

            kwills@redhat.com Ken Wills
            pkremens@redhat.com Petr Kremensky (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: