Announcement Announcement Module
No announcement yet.
Starting dm Server with -configDir option on Windows Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Starting dm Server with -configDir option on Windows


    I'm using dm Server 2.0, and I'm experimenting with running multiple instances. When I use the -configDir option on Windows, the startup script fails with a syntax error:

    C:\dmserver>bin\startup.bat -configDir config_demo
    The syntax of the command is incorrect.
    Has anyone seen similar issues?

    Digging deeper into the problem, it seems that bin\dmk.bat is the culprit; more precisely, the following line (around line #104 or so) bails out:

    if "%CONFIG_DIR:-1%"=="\" set CONFIG_DIR=%CONFIG_DIR:~-1%
    Startup proceeds beyond this point if I change the line to

    if "%CONFIG_DIR:~-1%"=="\" set CONFIG_DIR=%CONFIG_DIR:~-1%
    (Note the extra tilde.)

  • #2
    Thank you for that. Yes, indeed, this looks like a bug. Please report it on our jira.

    By the way, the intent of the line is to remove the trailing backslash, if there is one. Thus there are two bugs here, and you have corrected one of them. The line should read:

    if "%CONFIG_DIR:~-1%"=="\" set CONFIG_DIR=%CONFIG_DIR:~0,-1%
    (note the extra 0,).

    Steve Powell


    • #3
      Now submitted as

      And of course, you are right - there's no point setting CONFIG_DIR to a single slash... (*slapping forehead, wondering how I could miss that one*)


      • #4
        Where you successful in running multiple instances ?

        I am able to start with different config directory. But what happens to servicebility folder ? work folder ? How to do configure it to be different for different instances ?


        • #5
          Even after fixing the issue in the Windows startup helper script, multiple instances didn't quite work as expected for me. Probably my own little local configuration problem, but I ran out of time and never found out more. I ended up installing several copies of dm Server, which - in my case - was adequate for the time being. (I still want to revisit the topic later to find a better solution.)

          You may not even need two serviceability directories - after all, those are just log files, and I'm guessing (!) the server needs to make sure to write those in a thread-safe manner anyway, even for a single server instance. But even if that's true, I'm not sure if the same applies for the work directory.