Commons Daemon
  1. Commons Daemon
  2. DAEMON-247

[debug] ( javajni.c:195 ) Invalid RuntimeLib should be a warning or error?

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.0.9
    • Fix Version/s: 1.0.11
    • Component/s: Procrun
    • Labels:
      None
    • Environment:

      Windows Server 2008 Service Pack 2, Java 6 update 31 and 7 update 3 installed on same machine.
      Tomcat 7.0.26 (which uses Daemon 1.0.9).

      Description

      When running Tomcat as a service under Windows (thus using Daemon/procrun), if you mess up the Java Virtual Machine path in the service configurator, it defaults to the JAVA_HOME JRE, which I suppose is okay (but can wreak havoc when you have multiple Java versions installed), except that it doesn't warn you about it. It tells you about it through a DEBUG message, instead, so you have to actually increase the logging detail and wade through more messages to even realize it happened:

      [2012-03-20 16:32:41] [debug] ( prunsrv.c:1644) Commons Daemon procrun log initialized
      [2012-03-20 16:32:41] [info] ( prunsrv.c:1648) Commons Daemon procrun (1.0.9.0 64-bit) started
      [2012-03-20 16:32:41] [info] ( prunsrv.c:1561) Running 'gr01in01tc70' Service...
      [2012-03-20 16:32:41] [debug] ( prunsrv.c:1345) Inside ServiceMain...
      [2012-03-20 16:32:41] [info] ( prunsrv.c:1089) Starting service...
      [2012-03-20 16:32:41] [debug] ( javajni.c:195 ) Invalid RuntimeLib 'D:\Java\jdk6\jre\bin\server\jvm.dll'
      [2012-03-20 16:32:41] [debug] ( javajni.c:197 ) Using Jre JavaHome 'C:\Program Files\Java\jre7'
      [2012-03-20 16:32:41] [debug] ( javajni.c:206 ) loading jvm 'C:\Program Files\Java\jre7\bin\server\jvm.dll'

      After correcting the JVM path:

      [2012-03-20 16:46:13] [debug] ( prunsrv.c:1644) Commons Daemon procrun log initialized
      [2012-03-20 16:46:13] [info] ( prunsrv.c:1648) Commons Daemon procrun (1.0.9.0 64-bit) started
      [2012-03-20 16:46:13] [info] ( prunsrv.c:1561) Running 'gr01in01tc70' Service...
      [2012-03-20 16:46:13] [debug] ( prunsrv.c:1345) Inside ServiceMain...
      [2012-03-20 16:46:13] [info] ( prunsrv.c:1089) Starting service...
      [2012-03-20 16:46:13] [debug] ( javajni.c:206 ) loading jvm 'C:\Program Files\Java\jre6\bin\server\jvm.dll'

      IMO, this message should be a warning or even an error (preferable) so that server admins know right off the bat that they've done something wrong. Otherwise bad things might happen.

      Whether or not it should quit instead of defaulting to the system default JRE is a different discussion, but I think the message should at least be changed to a warning or an error.

        Activity

        Hide
        Mladen Turk added a comment -

        Fixed in the SVN. Will be part of 1.0.11
        In case explicit jvm.dll is specified and it does not exists procrun will exit with error.

        Show
        Mladen Turk added a comment - Fixed in the SVN. Will be part of 1.0.11 In case explicit jvm.dll is specified and it does not exists procrun will exit with error.
        Hide
        Nick Williams added a comment -

        I can agree with that completely. It would certainly be the preferable behavior in our environment. And I imagine most other administrators of enterprise production systems would prefer it to fail loudly and obtrusively, instead of silently, when it has been configured incorrectly.

        Show
        Nick Williams added a comment - I can agree with that completely. It would certainly be the preferable behavior in our environment. And I imagine most other administrators of enterprise production systems would prefer it to fail loudly and obtrusively, instead of silently, when it has been configured incorrectly.
        Hide
        Mladen Turk added a comment -

        Not sure if [error] only would be enough.
        Think we should exit as well in case explicit JVM path was given and not found.

        Show
        Mladen Turk added a comment - Not sure if [error] only would be enough. Think we should exit as well in case explicit JVM path was given and not found.

          People

          • Assignee:
            Mladen Turk
            Reporter:
            Nick Williams
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 1h
              1h
              Remaining:
              Remaining Estimate - 1h
              1h
              Logged:
              Time Spent - Not Specified
              Not Specified

                Development