Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
Flume >> mail # dev >> Re: Review Request 12822: Run Flume Agent as Windows Service

Copy link to this message
Re: Review Request 12822: Run Flume Agent as Windows Service

This is an automatically generated e-mail. To reply, visit:

(Updated July 22, 2013, 7:31 p.m.)
Review request for Flume.
Summary (updated)

Run Flume Agent as Windows Service
Bugs: FLUME-1336
Repository: flume-git

This patch adds files necessary to run Flume Agent as Windows Service.

I added two folders under \bin: win32 and win64. Both of them contain corresponding version of prunsrv.exe and two PowerShell scripts for installing/uninstalling FlumeAgent service: InstallService.ps1 and UninstallService.ps1.

In order to install the service, open PowerShell promptand type (I assume you have 64-bit operating system and 64-bit version of Java). You might need to enable script execution by running
Set-ExecutionPolicy RemoteSigned
then type:
cd \apache-flume\bin\win64

After that service will be installed, and you can start it:
net start FlumeAgent

In order to uninstall service, do the following:
cd \apache-flume\bin\win64

Log files (including one created by prunsrv) are stored in logs.

x86 and x64 Versions
There are two versions of prunsrv for different architectures: x86 (32-bit) and x64 (64-bit). You need to choose which one to use based on the version of Java you have installed. I configured prunsrv to use such called JVM-mode. In that mode prunesrv.exe loads jvm.dll from JRE and then runs that VM. If you have 32-bit version of Java, 64-bit prunsrv will not be able to load 32-bit version of jvm.dll and service will not start.

  bin/win32/InstallService.ps1 PRE-CREATION
  bin/win32/UninstallService.ps1 PRE-CREATION
  bin/win32/prunsrv.exe PRE-CREATION
  bin/win64/InstallService.ps1 PRE-CREATION
  bin/win64/UninstallService.ps1 PRE-CREATION
  bin/win64/prunsrv.exe PRE-CREATION
  flume-ng-node/src/main/java/org/apache/flume/node/Application.java 5250139

Diff: https://reviews.apache.org/r/12822/diff/

Sergey Sirotkin

Roshan Naik 2013-07-23, 00:43
Sergey Sirotkin 2013-08-27, 19:32
Roshan Naik 2013-07-23, 00:31