Geronimo
  1. Geronimo
  2. GERONIMO-6287

Server instance which created by gogo command "deploy:new-server-instance "can't be started

    Details

    • Type: Bug Bug
    • Status: In Progress
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.0-beta-1
    • Fix Version/s: None
    • Component/s: commands, osgi
    • Security Level: public (Regular issues)
    • Labels:
      None
    • Environment:

      JDK6 SR10
      Redhat 6.1 x86_64 GNU/Linux
      Build: 2012.02.23

      Description

      Steps:

      1. Start geronimo successfully using ./geronimo.sh run
      2. Using gogo command to create a new instance named inst1:
      geronimo> deploy:new-server-instance inst1
      Connection established
      Server created
      3.Change the PortOffset of the new instance
      4. Try to start the server instance:
      $ export GERONIMO_SERVER=inst1
      $ bin/geronimo.sh run -l
      5. But failed to start:
      Error launching framework: java.lang.IllegalArgumentException: Property karaf.framework must be set in the etc/config.properties configuration file
      6.Check the content under <geronimo_home>/inst1, only /var existed but /etc missing

        Issue Links

          Activity

          Hide
          Russell E Glaue added a comment -

          Previously reported in GERONIMO-5164

          Show
          Russell E Glaue added a comment - Previously reported in GERONIMO-5164
          Hide
          xiezhi added a comment -

          I think there is a mistake in the pom.xml of karaf-frame.
          <instance>
          <plugin-artifact>
          <copy-file relative-to="geronimo" dest-dir="">contents/</copy-file>
          <copy-file relative-to="server" dest-dir="">instance/</copy-file>
          </plugin-artifact>
          </instance>
          should be corrected to
          <instance>
          <plugin-artifact>
          <copy-file relative-to="server" dest-dir="">contents/</copy-file>
          <copy-file relative-to="server" dest-dir="">instance/</copy-file>
          </plugin-artifact>
          </instance>

          Show
          xiezhi added a comment - I think there is a mistake in the pom.xml of karaf-frame. <instance> <plugin-artifact> <copy-file relative-to="geronimo" dest-dir="">contents/</copy-file> <copy-file relative-to="server" dest-dir="">instance/</copy-file> </plugin-artifact> </instance> should be corrected to <instance> <plugin-artifact> <copy-file relative-to="server" dest-dir="">contents/</copy-file> <copy-file relative-to="server" dest-dir="">instance/</copy-file> </plugin-artifact> </instance>
          Hide
          xiezhi added a comment -

          upload my patch.

          Show
          xiezhi added a comment - upload my patch.
          Hide
          Shawn Jiang added a comment -

          The patch https://issues.apache.org/jira/secure/attachment/12437839/new-instance+30.patch in GERONIMO-5164 could serve as a base to fix this.

          The patch will also create/copy etc/repository to a new instance.

          Show
          Shawn Jiang added a comment - The patch https://issues.apache.org/jira/secure/attachment/12437839/new-instance+30.patch in GERONIMO-5164 could serve as a base to fix this. The patch will also create/copy etc/repository to a new instance.
          Hide
          Russell E Glaue added a comment - - edited

          I agree with the patch GERONIMO-5164/new-instance+30.patch

          It creates/copies var and etc
          And only creates repository

          With changes provided in GERONIMO-6270, the repository directory gets created automatically on server startup if it does not exist.

          I would remove the comment in the patch that reads:

          +        //?? repository folder needed by karaf, but don't know why ?
          

          Karaf requires a repository local to the base path of the geronimo server instance. Karaf specifically looks for it on startup. It is intended that it be used for artifacts locally deployed to this geronimo instance being created - we do not want to deploy instance specific artifacts to the bootstrap repository which is shared among all instances in a multi-instance run-time configuration.
          We describe reasoning in the Geronimo 30 docs: https://cwiki.apache.org/GMOxDOC30/running-multiple-geronimo-instances.html

          We have the o.a.g.server.dir/repository configured in o.a.g.server.dir/etc/org.ops4j.pax.url.mvn.cfg as:

          org.ops4j.pax.url.mvn.defaultRepositories=file:${karaf.home}/repository@snapshots,file:${karaf.base}/repository@snapshots
          

          Karaf looks for artifacts to deploy from one repository if the server is a single server, or two repositories if the server is one of multiple instances. When running multiple instance karaf.home/repository is the read-only bootstrap repository, and karaf.base/repository is the read-write local deploy repository for the specific geronimo instance.

          It is not safe for multiple instances to deploy to the same bootstrap repository, as one instance's deployment will be seen by another. So we need to separate out local repositories for each instance to deploy to.

          If a comment is desired, I recommend this:

          +        //the repository folder is needed for local deployments, defined in etc/org.ops4j.pax.url.mvn.cfg
          +        //we want to deploy artifacts specific to the instance to this local repository, not the shared bootstrap repository
          
          Show
          Russell E Glaue added a comment - - edited I agree with the patch GERONIMO-5164 /new-instance+30.patch It creates/copies var and etc And only creates repository With changes provided in GERONIMO-6270 , the repository directory gets created automatically on server startup if it does not exist. I would remove the comment in the patch that reads: + //?? repository folder needed by karaf, but don't know why ? Karaf requires a repository local to the base path of the geronimo server instance. Karaf specifically looks for it on startup. It is intended that it be used for artifacts locally deployed to this geronimo instance being created - we do not want to deploy instance specific artifacts to the bootstrap repository which is shared among all instances in a multi-instance run-time configuration. We describe reasoning in the Geronimo 30 docs: https://cwiki.apache.org/GMOxDOC30/running-multiple-geronimo-instances.html We have the o.a.g.server.dir/repository configured in o.a.g.server.dir/etc/org.ops4j.pax.url.mvn.cfg as: org.ops4j.pax.url.mvn.defaultRepositories=file:${karaf.home}/repository@snapshots,file:${karaf.base}/repository@snapshots Karaf looks for artifacts to deploy from one repository if the server is a single server, or two repositories if the server is one of multiple instances. When running multiple instance karaf.home/repository is the read-only bootstrap repository, and karaf.base/repository is the read-write local deploy repository for the specific geronimo instance. It is not safe for multiple instances to deploy to the same bootstrap repository, as one instance's deployment will be seen by another. So we need to separate out local repositories for each instance to deploy to. If a comment is desired, I recommend this: + //the repository folder is needed for local deployments, defined in etc/org.ops4j.pax.url.mvn.cfg + //we want to deploy artifacts specific to the instance to this local repository, not the shared bootstrap repository

            People

            • Assignee:
              xiezhi
              Reporter:
              Tina Li
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:

                Development