0

We are migrating from Linux (Ubuntu) to Windows Server 2012R2 (don't ask!) and have encountered a setup problem with Resin:

Installing Resin 4 Pro using the packaged setup.exe facility, resin.exe is created as a Windows Service just fine. It starts and is able to deploy webapps configured as <host>'s in resin.xml. But then we have some applications that depend on JVM environment variables. On Linux these were configured in resin.xml as well, eg.:

<jvm-arg>-Dsome.secret.domain=very.secret.com</jvm-arg>

but it appears that these simply aren't added to the JVM argument list when starting Resin as a service. The structure of our conf file is

<cluster id="app-tier">
    <server-multi ... />
    <server-default>
        <jvm-arg>
        ...

    <host>
    ...

It is my understanding that this is correct (and it corresponds to our Linux setup).

Trying to start Resin manually using

java -jar resin.jar start

doesn't change anything (even explicitly adding -conf resin.xml with full path). Explicitly adding the JVM args to this statement works, but - couriously - they are then present twice on the watchdog JVM process commandline and four times on the Resin JVM!

Any ideas would be welcome - I'm reaching out to Caucho as well, of course.

1 Answers1

0

After many config edits and restarts, it turns out that the ordering in the XML config is significant.

Thus moving the <server-multi .../> below the <server-default> section solved the problem:

<cluster id="app-tier">
    <server-default>
        <jvm-arg>
        ...

    <server-multi ... />

    <host>
    ...

This is confirmed by Alex Rojkov from Caucho:

Yes, order is significant. Configuration is read and executed in a single pass. Alex

Cheers,