Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-11983

Karaf as a service does not work on windows

    XMLWordPrintable

Details

    • Bug
    • Resolution: Not a Bug
    • Major
    • fuse-7.9-GA
    • fuse-7.5-ER1
    • Karaf
    • None

    Description

      Hello,
      it seems like making Karaf run on start of the machine does not work. I've been setting it up as described here:

      bin/contrib/karaf-service-win.exe install
      2019-10-11 05:47:33,675 INFO  - Installing the service with id '%KARAF_SERVICE_NAME%'
      bin/contrib/karaf-service-win.exe start
      2019-10-11 05:48:14,019 INFO  - Starting the service with id '%KARAF_SERVICE_NAME%'
      

      First of all I think %KARAF_SERVICE_NAME% should be variable so there might be an error. This commands will create a folder %KARAF_SERVICE_PATH% inside bin/contrib (again I think %KARAF_SERVICE_PATH% was meant to be a variable) which contain wrapper log (inside data/log/..). Wrapper log is short so I'll paste it here:

      2019-10-11 05:47:31,284 DEBUG - Starting ServiceWrapper in the CLI mode
      2019-10-11 05:47:33,675 INFO  - Installing the service with id '%KARAF_SERVICE_NAME%'
      2019-10-11 05:47:34,019 DEBUG - Completed. Exit code is 0
      2019-10-11 05:48:13,894 DEBUG - Starting ServiceWrapper in the CLI mode
      2019-10-11 05:48:14,019 INFO  - Starting the service with id '%KARAF_SERVICE_NAME%'
      2019-10-11 05:48:14,097 INFO  - Starting ServiceWrapper in the service mode
      2019-10-11 05:48:14,112 DEBUG - Completed. Exit code is 0
      2019-10-11 05:48:14,128 ERROR - Failed to log event in Windows Event Log: Starting %KARAF_SERVICE_PATH%\bin\%KARAF_SERVICE_EXECUTABLE%  daemon ; Reason: 
      System.ComponentModel.Win32Exception (0x80004005): The parameter is incorrect
         at System.Diagnostics.EventLogInternal.InternalWriteEvent(UInt32 eventID, UInt16 category, EventLogEntryType type, String[] strings, Byte[] rawData, String currentMachineName)
         at System.Diagnostics.EventLogInternal.WriteEntry(String message, EventLogEntryType type, Int32 eventID, Int16 category, Byte[] rawData)
         at System.Diagnostics.EventLog.WriteEntry(String message)
         at winsw.WrapperService.LogEvent(String message)
      2019-10-11 05:48:14,566 INFO  - Starting %KARAF_SERVICE_PATH%\bin\%KARAF_SERVICE_EXECUTABLE%  daemon 
      2019-10-11 05:48:14,612 DEBUG - Completed. Exit code is 0
      

      In conclusion there is either a bug in documentation and the script is meant to be executed with parameter (or env variable sat up), or there is a bug withing script, or I am missing something.

      Attachments

        Issue Links

          Activity

            People

              yfang@redhat.com Freeman(Yue) Fang
              vhais Vratislav Hais (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: