Install Gerrit on Windows as a service

675 views
Skip to first unread message

Bruniche

unread,
Dec 31, 2016, 7:31:07 AM12/31/16
to Repo and Gerrit Discussion
Hello,

Info :
OS = Windows 2012 R2
Gerrit : last one - 2.13.4

I try to follow the instruction here :

Gerrit start correctly if i launch this command line :
java.exe -jar bin\gerrit.war daemon --console-log

But i want to run it as a service, so i use the recommand prunsrv like show in the doc : 

prunsrv.exe //IS//Gerrit --DisplayName="Gerrit Code Review" --Startup=auto ^ --Jvm="C:\Program Files\Java\jre1.8.0_111\bin\server\jvm.dll" ^ --Classpath=C:\Gerrit\bin\gerrit.war ^ --LogPath=C:\Gerrit\logs ^ --StartPath=C:\Gerrit ^ --StartMode=jvm --StopMode=jvm ^ --StartClass=com.google.gerrit.launcher.GerritLauncher --StartMethod=daemonStart ^ --StopClass=com.google.gerrit.launcher.GerritLauncher --StopMethod=daemonStop

But i have always the same issue :
[2016-12-31 12:29:13] [info]  [ 2080] Commons Daemon procrun (1.0.15.0 64-bit) started
[2016-12-31 12:29:13] [info]  [ 2080] Running 'Gerrit' Service...
[2016-12-31 12:29:13] [info]  [ 1600] Starting service...
[2016-12-31 12:29:13] [error] [  280] Method 'static void daemonStart(String[])' not found in Class com/google/gerrit/launcher/GerritLauncher
[2016-12-31 12:29:13] [error] [ 1600] Failed to start Java
[2016-12-31 12:29:13] [error] [ 1600] ServiceStart returned 4
[2016-12-31 12:29:13] [info]  [ 2080] Run service finished.
[2016-12-31 12:29:13] [info]  [ 2080] Commons Daemon procrun finished

I dont find how to correct this issue (i find nothing this)
Thanks for your help

Bruniche

Olli Rajala

unread,
Jan 10, 2017, 7:38:28 AM1/10/17
to Repo and Gerrit Discussion
Hi,
We are having the same issue with the same config (Win + Gerrit versions).

Does anyone know if that method was removed recently, so should this work with some older Gerrit?

-Olli

Mike Birtwistle

unread,
Mar 8, 2017, 6:00:26 AM3/8/17
to Repo and Gerrit Discussion
I too am having this same problem on Windows Server 2012 R2. Tried it with 2.13.2, 2.13.5 with no success.

Charles Morin

unread,
May 12, 2017, 6:32:23 PM5/12/17
to Repo and Gerrit Discussion
Hi there,

Did you find a solution to your problem? I got the exact same error message in Windows 10.

Script code
SET GERRIT_SITE_HOME=C:\gerrit\review_site
cd C
:\gerrit
prunsrv
.exe //IS//Gerrit --DisplayName="Gerrit Code Review" ^
 
--Startup=auto ^
 
--Jvm=auto ^
 
--Classpath="%GERRIT_SITE_HOME%\bin\gerrit.war" ^
 
--LogPath="%GERRIT_SITE_HOME%\logs" ^
 
--StartPath="%GERRIT_SITE_HOME%" ^
 
--StartMode=jvm ^

 
--StopMode=jvm ^
 
--StartClass=com.google.gerrit.launcher.GerritLauncher --StartMethod=daemonStart ^
 
--StopClass=com.google.gerrit.launcher.GerritLauncher --StopMethod=daemonStop

Thank you

Charles Morin

unread,
May 12, 2017, 6:32:23 PM5/12/17
to Repo and Gerrit Discussion
Did you find a solution to your problem?

I'm having the exact same issue and I am looking for a solution.

Thank you

Charles


On Saturday, December 31, 2016 at 7:31:07 AM UTC-5, Bruniche wrote:
Reply all
Reply to author
Forward
0 new messages