dm Server
  1. dm Server
  2. DMS-767

Not able start the dm Server instances with the custom configuration directories while one dm Server instance is running with the default ports specified in SERVER_HOME/config directory

    Details

    • Type: Defect Defect
    • Status: Done Done
    • Priority: Minor Minor
    • Resolution: Complete
    • Affects Version/s: Sprint 4
    • Fix Version/s: Sprint 7, 2.0.0.M4, 2.0.0.RELEASE
    • Component/s: None
    • Labels:
      None
    • Environment:

      Maosx , springsource-dm-server-2.0.0.CI-R254-B207

    • Story Points:
      2

      Description

      In the user guide it is mention that it is possible to run multiple instances of dm Server with the same dm Server installation by providing the custom configuration directories to SERVER_HOME/config directory.
      I did the same thing(created custom node1 under config directory and providing different port numbers) and run the startup script with the following option.

      prompt$ cd $SERVER_HOME
      prompt$ bin/startup.sh -configDir /config/node1.

      Not able to start the dm Server with the custom config node1 if there is already server instance is running with the default configuration.Getting the below error

      Error: Exception thrown by the agent : java.rmi.server.ExportException: Port already in use: 9875; nested exception is:
      java.net.BindException: Address already in use
      dm Server is not using the custom config directory.

        Issue Links

          Activity

          Hide
          Radhika Madala (c) added a comment -

          I retested this issue by starting dm Server with the -jmxport

          prompt$ cd $SERVER_HOME
          prompt$ bin/startup.sh -configDir /config/node1 -jmxport 3333

          But not able to start the another instance of dm Server with the custom configuration directory and jmxport.Getting the below error message.

          [2009-05-22 09:36:49.526] main <SPOF0002E> Unable to start OSGi telnet console. Port 2401 is in use.
          [2009-05-22 09:36:49.527] main <SPOF0003I> Immediate shutdown initiated.

          Show
          Radhika Madala (c) added a comment - I retested this issue by starting dm Server with the -jmxport prompt$ cd $SERVER_HOME prompt$ bin/startup.sh -configDir /config/node1 -jmxport 3333 But not able to start the another instance of dm Server with the custom configuration directory and jmxport.Getting the below error message. [2009-05-22 09:36:49.526] main <SPOF0002E> Unable to start OSGi telnet console. Port 2401 is in use. [2009-05-22 09:36:49.527] main <SPOF0003I> Immediate shutdown initiated.
          Hide
          Richard J. Schiller added a comment -

          Andy: I was able to get around a similar issue by setting the env variable "export JMX_PORT=29875" (used in the $SERVER_HOME/bin/dmk.sh script) and setting the kernel shell port in $SERVER_HOME/config/com.springsource.kernel.properties file as follows : "shell.port=22401".

          This enabled me to start the springsource-dm-server instance but I still errors get thrown which read like these (of note is the "clashes with the artifact bundle" error):

          [2010-01-13 14:43:21.127] fs-watcher <HD0001I> Hot deployer processing 'INITIAL' event for file 'com.springsource.server.splash-2.0.0.RC1.war'.
          [2010-01-13 14:43:21.167] fs-watcher <HD0002E> Hot deploy failed for file 'com.springsource.server.splash-2.0.0.RC1.war'. com.springsource.kernel.deployer.core.DeploymentException: The artifact bundle 'com.springsource.server.splash' version '2.0.0.RC1' in scope 'null' at URI 'file:/ebh_development/opt/springsource-dm-server-2.0.0.RC1-schiller/pickup/com.springsource.server.splash-2.0.0.RC1.war' cannot be stored in the runtime artifact model as it clashes with the artifact bundle 'com.springsource.server.splash' version '2.0.0.RC1' in scope 'null' which is already present.
          at com.springsource.kernel.deployer.core.internal.PipelinedApplicationDeployer.doInstall(PipelinedApplicationDeployer.java:155)
          at com.springsource.kernel.deployer.core.internal.PipelinedApplicationDeployer.install(PipelinedApplicationDeployer.java:132)
          at com.springsource.kernel.deployer.core.internal.PipelinedApplicationDeployer.deploy(PipelinedApplicationDeployer.java:196)
          at com.springsource.kernel.deployer.hot.HotDeploymentFileSystemListener.deploy(HotDeploymentFileSystemListener.java:185)
          at com.springsource.kernel.deployer.hot.HotDeploymentFileSystemListener.deployIfNotDeployed(HotDeploymentFileSystemListener.java:197)
          at com.springsource.kernel.deployer.hot.HotDeploymentFileSystemListener.onChange(HotDeploymentFileSystemListener.java:98)
          at com.springsource.util.io.FileSystemChecker.notifyListeners(FileSystemChecker.java:182)
          at com.springsource.util.io.FileSystemChecker.check(FileSystemChecker.java:145)
          at com.springsource.kernel.deployer.hot.WatchTask.run(WatchTask.java:69)
          at java.lang.Thread.run(Thread.java:636)
          Caused by: com.springsource.kernel.deployer.model.DuplicateFileNameException: The artifact bundle 'com.springsource.server.splash' version '2.0.0.RC1' in scope 'null' at URI 'file:/ebh_development/opt/springsource-dm-server-2.0.0.RC1-schiller/pickup/com.springsource.server.splash-2.0.0.RC1.war' cannot be stored in the runtime artifact model as it clashes with the artifact bundle 'com.springsource.server.splash' version '2.0.0.RC1' in scope 'null' which is already present.
          at com.springsource.kernel.deployer.model.internal.StandardRuntimeArtifactModel.checkFileName(StandardRuntimeArtifactModel.java:103)
          at com.springsource.kernel.deployer.model.internal.StandardRuntimeArtifactModel.add(StandardRuntimeArtifactModel.java:81)
          at com.springsource.kernel.deployer.core.internal.PipelinedApplicationDeployer.addTreeToModel(PipelinedApplicationDeployer.java:246)
          at com.springsource.kernel.deployer.core.internal.PipelinedApplicationDeployer.doInstall(PipelinedApplicationDeployer.java:153)
          ... 9 common frames omitted

          --------------------------------------

          I am trying to start multiple running versions of the greenpages app and have set up each running account with it's own $HOME/greenpages-db to hold the h2 db files, and a $HOME/.h2.server.properties file with lines like these to reference the H2 EMBEDDED and SERVER definitions required (but undocumented) in the example:

          ... prior lines
          12=Generic H2 (Embedded)|org.h2.Driver|jdbc\:h2\:~/greenpages-db/greenpages|greenpages
          13=Generic H2 (Server)|org.h2.Driver|jdbc\:h2\:tcp\://localhost/~/greenpages-db/greenpages|greenpages
          ... following lines

          --------------------------------------

          So how do I resolve the artifact configurations issues

          Show
          Richard J. Schiller added a comment - Andy: I was able to get around a similar issue by setting the env variable "export JMX_PORT=29875" (used in the $SERVER_HOME/bin/dmk.sh script) and setting the kernel shell port in $SERVER_HOME/config/com.springsource.kernel.properties file as follows : "shell.port=22401". This enabled me to start the springsource-dm-server instance but I still errors get thrown which read like these (of note is the "clashes with the artifact bundle" error): [2010-01-13 14:43:21.127] fs-watcher <HD0001I> Hot deployer processing 'INITIAL' event for file 'com.springsource.server.splash-2.0.0.RC1.war'. [2010-01-13 14:43:21.167] fs-watcher <HD0002E> Hot deploy failed for file 'com.springsource.server.splash-2.0.0.RC1.war'. com.springsource.kernel.deployer.core.DeploymentException: The artifact bundle 'com.springsource.server.splash' version '2.0.0.RC1' in scope 'null' at URI 'file:/ebh_development/opt/springsource-dm-server-2.0.0.RC1-schiller/pickup/com.springsource.server.splash-2.0.0.RC1.war' cannot be stored in the runtime artifact model as it clashes with the artifact bundle 'com.springsource.server.splash' version '2.0.0.RC1' in scope 'null' which is already present. at com.springsource.kernel.deployer.core.internal.PipelinedApplicationDeployer.doInstall(PipelinedApplicationDeployer.java:155) at com.springsource.kernel.deployer.core.internal.PipelinedApplicationDeployer.install(PipelinedApplicationDeployer.java:132) at com.springsource.kernel.deployer.core.internal.PipelinedApplicationDeployer.deploy(PipelinedApplicationDeployer.java:196) at com.springsource.kernel.deployer.hot.HotDeploymentFileSystemListener.deploy(HotDeploymentFileSystemListener.java:185) at com.springsource.kernel.deployer.hot.HotDeploymentFileSystemListener.deployIfNotDeployed(HotDeploymentFileSystemListener.java:197) at com.springsource.kernel.deployer.hot.HotDeploymentFileSystemListener.onChange(HotDeploymentFileSystemListener.java:98) at com.springsource.util.io.FileSystemChecker.notifyListeners(FileSystemChecker.java:182) at com.springsource.util.io.FileSystemChecker.check(FileSystemChecker.java:145) at com.springsource.kernel.deployer.hot.WatchTask.run(WatchTask.java:69) at java.lang.Thread.run(Thread.java:636) Caused by: com.springsource.kernel.deployer.model.DuplicateFileNameException: The artifact bundle 'com.springsource.server.splash' version '2.0.0.RC1' in scope 'null' at URI 'file:/ebh_development/opt/springsource-dm-server-2.0.0.RC1-schiller/pickup/com.springsource.server.splash-2.0.0.RC1.war' cannot be stored in the runtime artifact model as it clashes with the artifact bundle 'com.springsource.server.splash' version '2.0.0.RC1' in scope 'null' which is already present. at com.springsource.kernel.deployer.model.internal.StandardRuntimeArtifactModel.checkFileName(StandardRuntimeArtifactModel.java:103) at com.springsource.kernel.deployer.model.internal.StandardRuntimeArtifactModel.add(StandardRuntimeArtifactModel.java:81) at com.springsource.kernel.deployer.core.internal.PipelinedApplicationDeployer.addTreeToModel(PipelinedApplicationDeployer.java:246) at com.springsource.kernel.deployer.core.internal.PipelinedApplicationDeployer.doInstall(PipelinedApplicationDeployer.java:153) ... 9 common frames omitted -------------------------------------- I am trying to start multiple running versions of the greenpages app and have set up each running account with it's own $HOME/greenpages-db to hold the h2 db files, and a $HOME/.h2.server.properties file with lines like these to reference the H2 EMBEDDED and SERVER definitions required (but undocumented) in the example: ... prior lines 12=Generic H2 (Embedded)|org.h2.Driver|jdbc\:h2\:~/greenpages-db/greenpages|greenpages 13=Generic H2 (Server)|org.h2.Driver|jdbc\:h2\:tcp\://localhost/~/greenpages-db/greenpages|greenpages ... following lines -------------------------------------- So how do I resolve the artifact configurations issues
          Hide
          Andy Wilkinson added a comment -

          It looks like you have two copies of the splash application in the pickup directory. It should be possible to tell from the rest of the startup output.

          Show
          Andy Wilkinson added a comment - It looks like you have two copies of the splash application in the pickup directory. It should be possible to tell from the rest of the startup output.
          Hide
          Richard J. Schiller added a comment -

          This file shows the start error when trying to start a copy of SpringSourceDM Server (different ports with different configuration directory), yet the server tries to attach to an h2 database owned by another application rather than the one located in my home directory. Additional errors also occur regarding the Hot deploy failing to deploy "splash" since it is stored in the runtime artifact model already when the second instance of the SpringSourceDM Server tries to start since it clashes with the artifact bundle .. even though a different instance of the server is being started.

          Show
          Richard J. Schiller added a comment - This file shows the start error when trying to start a copy of SpringSourceDM Server (different ports with different configuration directory), yet the server tries to attach to an h2 database owned by another application rather than the one located in my home directory. Additional errors also occur regarding the Hot deploy failing to deploy "splash" since it is stored in the runtime artifact model already when the second instance of the SpringSourceDM Server tries to start since it clashes with the artifact bundle .. even though a different instance of the server is being started.
          Hide
          Richard J. Schiller added a comment -

          I was able to get past the greenpages application start issue by making sure my symbolic link to greenpages-db was correct and not pointing to the same version that the prior instance was also pointing to. That part appears to be my error ...

          However, I still have the artifact conflict issue as the attached file shows. Is there a way to nail a "scope" to the artifact so that it may be deployed to different instances or is there another port that need to be reassigned to my second instance that I may have missed which would lookup the artifact in the prior running instance and reject the Hot Deploy based on being able to find it in that former instance even when trying to deploy to the second instance?

          Show
          Richard J. Schiller added a comment - I was able to get past the greenpages application start issue by making sure my symbolic link to greenpages-db was correct and not pointing to the same version that the prior instance was also pointing to. That part appears to be my error ... However, I still have the artifact conflict issue as the attached file shows. Is there a way to nail a "scope" to the artifact so that it may be deployed to different instances or is there another port that need to be reassigned to my second instance that I may have missed which would lookup the artifact in the prior running instance and reject the Hot Deploy based on being able to find it in that former instance even when trying to deploy to the second instance?

            People

            • Assignee:
              Andy Wilkinson
              Reporter:
              Radhika Madala (c)
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                First Response Date:

                Time Tracking

                Estimated:
                Original Estimate - 1h Original Estimate - 1h
                1h
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 2.1h
                2.1h