Challenges to have standalone install on macOS 15.0

63 views
Skip to first unread message

Pranab Panda

unread,
Jun 25, 2025, 2:05:58 PM6/25/25
to Repo and Gerrit Discussion
Try to migrate from Linux sever to macOS as standalone install and running into many challenges. 
Got the backup and reindexed using 3.9.11 which went ok after I removed the change owners plugin, but now seeing few hurdles.
would appreciate any pointers to resolve these

1. Can't start Gerrit without sudo
2. Followed the instruction to Setup Nginx but the https://domainname/gerrit or https://domainname:port does not work
3. Also 
% ssh -p 29418 domainame gerrit ls
ssh: connect to host domain name port 29418: Connection refused

4. % nmap -p 29418 localhost
Starting Nmap 7.97 ( https://nmap.org ) at 2025-06-25 11:03 -0700
Nmap scan report for localhost (127.0.0.1)
Host is up (0.00022s latency).
Other addresses for localhost (not scanned): ::1

PORT      STATE  SERVICE
29418/tcp closed unknown

Nmap done: 1 IP address (1 host up) scanned in 0.03 seconds
tried opening the port in pf.conf  but didn't help

0   977   916   0  9:40AM ttys000    0:00.01 su - wgerrit -s /bin/sh -c \012          JAVA='/opt/homebrew/Cellar/openjdk@17/17.0.15/libexec/openjdk.jdk/Contents/Home/bin/java' ; export JAVA ;\012          /usr/bin/perl -e '$x=$ENV{JAVA};exec $x @ARGV;die $!' -- GerritCodeReview  -Dflogger.backend_factory=com.google.common.flogger.backend.log4j.Log4jBackendFactory#getInstance -Dflogger.logging_context=com.google.gerrit.server.logging.LoggingContext#getInstance  -Xmx96g -jar /Volumes/Data/source/gerrit_home/gerrit/bin/gerrit.war daemon -d /Volumes/Data/source/gerrit_home/gerrit --run-id=1750869620.916 </dev/null >/dev/null 2>&1 &\012          PID=$! ;\012          disown ;\012          echo $PID >"/Volumes/Data/source/gerrit_home/gerrit/logs/gerrit.pid"
  503   978   977   0  9:40AM ttys000    0:00.09 -zsh -s /bin/sh -c \012          JAVA='/opt/homebrew/Cellar/openjdk@17/17.0.15/libexec/openjdk.jdk/Contents/Home/bin/java' ; export JAVA ;\012          /usr/bin/perl -e '$x=$ENV{JAVA};exec $x @ARGV;die $!' -- GerritCodeReview  -Dflogger.backend_factory=com.google.common.flogger.backend.log4j.Log4jBackendFactory#getInstance -Dflogger.logging_context=com.google.gerrit.server.logging.LoggingContext#getInstance  -Xmx96g -jar /Volumes/Data/source/gerrit_home/gerrit/bin/gerrit.war daemon -d /Volumes/Data/source/gerrit_home/gerrit --run-id=1750869620.916 </dev/null >/dev/null 2>&1 &\012          PID=$! ;\012          disown ;\012          echo $PID >"/Volumes/Data/source/gerrit_home/gerrit/logs/gerrit.pid"

Thanks
Pranab

Matthias Sohn

unread,
Jun 25, 2025, 4:20:15 PM6/25/25
to Pranab Panda, Repo and Gerrit Discussion
On Wed, Jun 25, 2025 at 8:06 PM Pranab Panda <pra...@pacbell.net> wrote:
Try to migrate from Linux sever to macOS as standalone install and running into many challenges. 
Got the backup and reindexed using 3.9.11 which went ok after I removed the change owners plugin, but now seeing few hurdles.
would appreciate any pointers to resolve these

What did you backup and how did you restore it on MacOS ?
How did you install and configure gerrit on MacOS ?
Did you install the same version on MacOS which you installed earlier on Linux ?
 
1. Can't start Gerrit without sudo
2. Followed the instruction to Setup Nginx but the https://domainname/gerrit or https://domainname:port does not work
3. Also 
% ssh -p 29418 domainame gerrit ls
ssh: connect to host domain name port 29418: Connection refused

4. % nmap -p 29418 localhost
Starting Nmap 7.97 ( https://nmap.org ) at 2025-06-25 11:03 -0700
Nmap scan report for localhost (127.0.0.1)
Host is up (0.00022s latency).
Other addresses for localhost (not scanned): ::1

PORT      STATE  SERVICE
29418/tcp closed unknown

Nmap done: 1 IP address (1 host up) scanned in 0.03 seconds
tried opening the port in pf.conf  but didn't help

0   977   916   0  9:40AM ttys000    0:00.01 su - wgerrit -s /bin/sh -c \012          JAVA='/opt/homebrew/Cellar/openjdk@17/17.0.15/libexec/openjdk.jdk/Contents/Home/bin/java' ; export JAVA ;\012          /usr/bin/perl -e '$x=$ENV{JAVA};exec $x @ARGV;die $!' -- GerritCodeReview  -Dflogger.backend_factory=com.google.common.flogger.backend.log4j.Log4jBackendFactory#getInstance -Dflogger.logging_context=com.google.gerrit.server.logging.LoggingContext#getInstance  -Xmx96g -jar /Volumes/Data/source/gerrit_home/gerrit/bin/gerrit.war daemon -d /Volumes/Data/source/gerrit_home/gerrit --run-id=1750869620.916 </dev/null >/dev/null 2>&1 &\012          PID=$! ;\012          disown ;\012          echo $PID >"/Volumes/Data/source/gerrit_home/gerrit/logs/gerrit.pid"
  503   978   977   0  9:40AM ttys000    0:00.09 -zsh -s /bin/sh -c \012          JAVA='/opt/homebrew/Cellar/openjdk@17/17.0.15/libexec/openjdk.jdk/Contents/Home/bin/java' ; export JAVA ;\012          /usr/bin/perl -e '$x=$ENV{JAVA};exec $x @ARGV;die $!' -- GerritCodeReview  -Dflogger.backend_factory=com.google.common.flogger.backend.log4j.Log4jBackendFactory#getInstance -Dflogger.logging_context=com.google.gerrit.server.logging.LoggingContext#getInstance  -Xmx96g -jar /Volumes/Data/source/gerrit_home/gerrit/bin/gerrit.war daemon -d /Volumes/Data/source/gerrit_home/gerrit --run-id=1750869620.916 </dev/null >/dev/null 2>&1 &\012          PID=$! ;\012          disown ;\012          echo $PID >"/Volumes/Data/source/gerrit_home/gerrit/logs/gerrit.pid"

Thanks
Pranab

--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/repo-discuss/e5050cad-6102-441f-90e0-8cb75b6cb23an%40googlegroups.com.

Luca Milanesio

unread,
Jun 25, 2025, 4:33:29 PM6/25/25
to Repo and Gerrit Discussion, Luca Milanesio

On 25 Jun 2025, at 21:19, Matthias Sohn <matthi...@gmail.com> wrote:

On Wed, Jun 25, 2025 at 8:06 PM Pranab Panda <pra...@pacbell.net> wrote:
Try to migrate from Linux sever to macOS as standalone install and running into many challenges. 
Got the backup and reindexed using 3.9.11 which went ok after I removed the change owners plugin, but now seeing few hurdles.
would appreciate any pointers to resolve these

What did you backup and how did you restore it on MacOS ?
How did you install and configure gerrit on MacOS ?
Did you install the same version on MacOS which you installed earlier on Linux ?

My recommendation would be to use ‘brew install gerrit’ on MacOS, it’s so much easier!

HTH

Luca.

Pranab Panda

unread,
Jun 25, 2025, 6:05:40 PM6/25/25
to Repo and Gerrit Discussion, Luca Milanesio
On Wednesday, June 25, 2025 at 01:33:34 PM PDT, Luca Milanesio <luca.mi...@gmail.com> wrote:




On 25 Jun 2025, at 21:19, Matthias Sohn <matthi...@gmail.com> wrote:

On Wed, Jun 25, 2025 at 8:06 PM Pranab Panda <pra...@pacbell.net> wrote:
Try to migrate from Linux sever to macOS as standalone install and running into many challenges. 
Got the backup and reindexed using 3.9.11 which went ok after I removed the change owners plugin, but now seeing few hurdles.
would appreciate any pointers to resolve these

What did you backup and how did you restore it on MacOS ?
How did you install and configure gerrit on MacOS ?
Did you install the same version on MacOS which you installed earlier on Linux ?

My recommendation would be to use ‘brew install gerrit’ on MacOS, it’s so much easier!

HTH

Luca.

Thanks Matthias and Luca
1. I have backed up the Gerrit top level directory and restored that on macOS.

2. Did the reindexing using 3.9.11 since the version i had on linux 3.2 i think was no more supported 
   java -jar /Volumes/Data/source/gerrit_home/gerrit-3.9.11.war reindex -d /Volumes/Data/source/gerrit_home/gerrit
3. I tried brew install gerrit but it wasn't able to find it

% brew install gerrit          
Warning: No available formula with the name "gerrit". Did you mean gedit or gerust?
==> Searching for similarly named formulae and casks...
==> Formulae
gerrit-tools                                git-gerrit                                  gedit                                       gerust

-Pranab

You received this message because you are subscribed to a topic in the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/repo-discuss/9gxhQdoFf_Y/unsubscribe.
To unsubscribe from this group and all its topics, send an email to repo-discuss...@googlegroups.com.

To view this discussion visit

Matthias Sohn

unread,
Jun 25, 2025, 6:49:43 PM6/25/25
to Pranab Panda, Repo and Gerrit Discussion, Luca Milanesio
On Thu, Jun 26, 2025 at 12:05 AM Pranab Panda <pra...@pacbell.net> wrote:


On Wednesday, June 25, 2025 at 01:33:34 PM PDT, Luca Milanesio <luca.mi...@gmail.com> wrote:




On 25 Jun 2025, at 21:19, Matthias Sohn <matthi...@gmail.com> wrote:

On Wed, Jun 25, 2025 at 8:06 PM Pranab Panda <pra...@pacbell.net> wrote:
Try to migrate from Linux sever to macOS as standalone install and running into many challenges. 
Got the backup and reindexed using 3.9.11 which went ok after I removed the change owners plugin, but now seeing few hurdles.
would appreciate any pointers to resolve these

What did you backup and how did you restore it on MacOS ?
How did you install and configure gerrit on MacOS ?
Did you install the same version on MacOS which you installed earlier on Linux ?

My recommendation would be to use ‘brew install gerrit’ on MacOS, it’s so much easier!

HTH

Luca.

Thanks Matthias and Luca
1. I have backed up the Gerrit top level directory and restored that on macOS.

2. Did the reindexing using 3.9.11 since the version i had on linux 3.2 i think was no more supported 
You can't upgrade from 3.2 to 3.9.11 by just reindexing. Instead you need to run the init command.
Go through the release notes of all minor releases between 3.2 and 3.9 and follow upgrade instructions.
Basically run init with each of the minor releases (3.3, 3.4 etc. up to 3.9.11), after the last step reindex.
 

Pranab Panda

unread,
Jun 25, 2025, 7:28:05 PM6/25/25
to Matthias Sohn, Repo and Gerrit Discussion, Luca Milanesio
On Wednesday, June 25, 2025 at 03:49:46 PM PDT, Matthias Sohn <matthi...@gmail.com> wrote:


On Thu, Jun 26, 2025 at 12:05 AM Pranab Panda <pra...@pacbell.net> wrote:


On Wednesday, June 25, 2025 at 01:33:34 PM PDT, Luca Milanesio <luca.mi...@gmail.com> wrote:




On 25 Jun 2025, at 21:19, Matthias Sohn <matthi...@gmail.com> wrote:

On Wed, Jun 25, 2025 at 8:06 PM Pranab Panda <pra...@pacbell.net> wrote:
Try to migrate from Linux sever to macOS as standalone install and running into many challenges. 
Got the backup and reindexed using 3.9.11 which went ok after I removed the change owners plugin, but now seeing few hurdles.
would appreciate any pointers to resolve these

What did you backup and how did you restore it on MacOS ?
How did you install and configure gerrit on MacOS ?
Did you install the same version on MacOS which you installed earlier on Linux ?

My recommendation would be to use ‘brew install gerrit’ on MacOS, it’s so much easier!

HTH

Luca.

Thanks Matthias and Luca
1. I have backed up the Gerrit top level directory and restored that on macOS.

2. Did the reindexing using 3.9.11 since the version i had on linux 3.2 i think was no more supported 
You can't upgrade from 3.2 to 3.9.11 by just reindexing. Instead you need to run the init command.
Go through the release notes of all minor releases between 3.2 and 3.9 and follow upgrade instructions.
Basically run init with each of the minor releases (3.3, 3.4 etc. up to 3.9.11), after the last step reindex.



Thanks Matthias
My bad, I am at 3.7.1
So i guess in just need to do init with latest 3.8 version which i see is 3.8.10? right

Also 3.9 is EOL so better to get to 3.10 or higher so will need init of
3.8.10
3.9.11 
and then 3.10.6 (if iwant to move to 3.10

thanks
Let me me give this a try
-Pranab

Pranab Panda

unread,
Jun 26, 2025, 2:55:12 AM6/26/25
to Matthias Sohn, Repo and Gerrit Discussion, Luca Milanesio
Hi Matthias

As you suggested, I did init with all releases and finally did reindex with 3.12
but even after doing so, i still can't start gerrit without sudo

% java --version

openjdk 17.0.15 2025-04-15

OpenJDK Runtime Environment Homebrew (build 17.0.15+0)

OpenJDK 64-Bit Server VM Homebrew (build 17.0.15+0, mixed mode, sharing)

wgerrit@corewifi-gerrit gerrit_home % java -jar gerrit-3.8.10.war init -d ./gerrit --batch

Initialized /Volumes/Data/source/gerrit_home/gerrit

wgerrit@corewifi-gerrit gerrit_home % java -jar gerrit-3.9.11.war init -d ./gerrit --batch 

Initialized /Volumes/Data/source/gerrit_home/gerrit

wgerrit@corewifi-gerrit gerrit_home % java -jar gerrit-3.10.6.war init -d ./gerrit --batch 

Initialized /Volumes/Data/source/gerrit_home/gerrit

% which java

/opt/homebrew/opt/openjdk@21/bin/java

wgerrit@corewifi-gerrit gerrit_home % java -jar gerrit-3.11.3.war  init -d ./gerrit --batch

Jun 25, 2025 9:25:37 PM org.apache.lucene.store.MemorySegmentIndexInputProvider <init>

INFO: Using MemorySegmentIndexInput with Java 21; to disable start with -Dorg.apache.lucene.store.MMapDirectory.enableMemorySegments=false

Initialized /Volumes/Data/source/gerrit_home/gerrit

wgerrit@corewifi-gerrit gerrit_home % java -jar gerrit-3.12.0.war  init -d ./gerrit --batch 

WARNING: A restricted method in java.lang.foreign.Linker has been called

WARNING: java.lang.foreign.Linker::downcallHandle has been called by the unnamed module

WARNING: Use --enable-native-access=ALL-UNNAMED to avoid a warning for this module


Jun 25, 2025 9:26:15 PM org.apache.lucene.internal.vectorization.VectorizationProvider lookup

WARNING: Java vector incubator module is not readable. For optimal vector performance, pass '--add-modules jdk.incubator.vector' to enable Vector API.

Initialized /Volumes/Data/source/gerrit_home/gerrit



% java -jar gerrit-3.12.0.war reindex -d ./gerrit 

……..

Reindexing changes: changes: 100% (70815/70815), project-slices: 100% (179/179), Slicing projects: 100% (189/189), done    

Reindexed 70815 documents in changes index in 71.6s (989.7/s)

Index changes in version 87 is ready

Reindexing projects:    100% (189/189)

Reindexed 189 documents in projects index in 0.0s (10500.0/s)

Index projects in version 10 is ready

[2025-06-25 22:41:09,732] [main] INFO  com.google.gerrit.server.plugins.PluginLoader : Unloading plugin replication, version v3.12.0

[2025-06-25 22:41:09,732] [main] INFO  com.google.gerrit.server.plugins.PluginLoader : Unloading plugin codemirror-editor, version v3.12.0

[2025-06-25 22:41:09,732] [main] INFO  com.google.gerrit.server.plugins.PluginLoader : Unloading plugin gitiles, version v3.12.0

[2025-06-25 22:41:09,732] [main] INFO  com.google.gerrit.server.plugins.PluginLoader : Unloading plugin reviewnotes, version v3.12.0

[2025-06-25 22:41:09,732] [main] INFO  com.google.gerrit.server.plugins.PluginLoader : Unloading plugin download-commands, version v3.12.0

[2025-06-25 22:41:09,732] [main] INFO  com.google.gerrit.server.plugins.PluginLoader : Unloading plugin autosubmitter, version v3.3.1-2-g3f25ccf9d2

[2025-06-25 22:41:09,732] [main] INFO  com.google.gerrit.server.plugins.PluginLoader : Unloading plugin commit-message-length-validator, version v3.12.0

[2025-06-25 22:41:09,732] [main] INFO  com.google.gerrit.server.plugins.PluginLoader : Unloading plugin webhooks, version v3.12.0

[2025-06-25 22:41:09,732] [main] INFO  com.google.gerrit.server.plugins.PluginLoader : Unloading plugin delete-project, version v3.12.0

[2025-06-25 22:41:09,732] [main] INFO  com.google.gerrit.server.plugins.PluginLoader : Unloading plugin plugin-manager, version v3.12.0

[2025-06-25 22:41:09,732] [main] INFO  com.google.gerrit.server.plugins.PluginLoader : Unloading plugin singleusergroup, version v3.12.0

[2025-06-25 22:41:09,732] [main] INFO  com.google.gerrit.server.plugins.PluginLoader : Unloading plugin hooks, version v3.12.0

[2025-06-25 22:41:09,733] [main] INFO  com.google.gerrit.server.plugins.CleanupHandle : Cleaned plugin plugin_replication_250626_0539_13425378323797222348.jar

[2025-06-25 22:41:09,733] [main] INFO  com.google.gerrit.server.plugins.CleanupHandle : Cleaned plugin plugin_codemirror-editor_250626_0539_13831441613560561651.jar

[2025-06-25 22:41:09,733] [main] INFO  com.google.gerrit.server.plugins.CleanupHandle : Cleaned plugin plugin_gitiles_250626_0539_14888393478316252025.jar

[2025-06-25 22:41:09,733] [main] INFO  com.google.gerrit.server.plugins.CleanupHandle : Cleaned plugin plugin_reviewnotes_250626_0539_14868924488101701217.jar

[2025-06-25 22:41:09,733] [main] INFO  com.google.gerrit.server.plugins.CleanupHandle : Cleaned plugin plugin_download-commands_250626_0539_3339265104211339315.jar

[2025-06-25 22:41:09,734] [main] INFO  com.google.gerrit.server.plugins.CleanupHandle : Cleaned plugin plugin_autosubmitter_250626_0539_12983496333289852013.jar

[2025-06-25 22:41:09,734] [main] INFO  com.google.gerrit.server.plugins.CleanupHandle : Cleaned plugin plugin_commit-message-length-validator_250626_0539_10989916932274352171.jar

[2025-06-25 22:41:09,734] [main] INFO  com.google.gerrit.server.plugins.CleanupHandle : Cleaned plugin plugin_webhooks_250626_0539_6554881349948521220.jar

[2025-06-25 22:41:09,734] [main] INFO  com.google.gerrit.server.plugins.CleanupHandle : Cleaned plugin plugin_delete-project_250626_0539_10948410389205591667.jar

[2025-06-25 22:41:09,734] [main] INFO  com.google.gerrit.server.plugins.CleanupHandle : Cleaned plugin plugin_plugin-manager_250626_0539_13137569168614332696.jar

[2025-06-25 22:41:09,734] [main] INFO  com.google.gerrit.server.plugins.CleanupHandle : Cleaned plugin plugin_singleusergroup_250626_0539_9370041359699902212.jar

[2025-06-25 22:41:09,734] [main] INFO  com.google.gerrit.server.plugins.CleanupHandle : Cleaned plugin plugin_hooks_250626_0539_9448913262609412363.jar



gerrit % bin/gerrit.sh start         
Starting Gerrit Code Review: FAILED

% sudo bin/gerrit.sh start 
Password:
Starting Gerrit Code Review: %                
                                                                                                                          
% ps -aw|grep gerrit
  540 ttys000    0:00.02 login -pfl wgerrit /bin/bash -c exec -la zsh /bin/zsh
  548 ttys001    0:00.02 login -pfl wgerrit /bin/bash -c exec -la zsh /bin/zsh
11083 ttys001    0:00.03 sudo bin/gerrit.sh start
11084 ttys001    0:00.01 /bin/sh bin/gerrit.sh start
11150 ttys001    0:00.01 su - wgerrit -s /bin/sh -c \012          JAVA='/opt/homebrew/opt/openjdk@21/bin/java' ; export JAVA ;\012          /usr/bin/perl -e '$x=$ENV{JAVA};exec $x @ARGV;die $!' -- GerritCodeReview  -Dflogger.backend_factory=com.google.common.flogger.backend.log4j.Log4jBackendFactory#getInstance -Dflogger.logging_context=com.google.gerrit.server.logging.LoggingContext#getInstance  -Xmx96g -XX:-MaxFDLimit -jar /Volumes/Data/source/gerrit_home/gerrit/bin/gerrit.war daemon -d /Volumes/Data/source/gerrit_home/gerrit --run-id=1750920644.11084 </dev/null >/dev/null 2>&1 &\012          PID=$! ;\012          disown ;\012          echo $PID >"/Volumes/Data/source/gerrit_home/gerrit/logs/gerrit.pid"
11151 ttys001    0:00.02 -zsh -s /bin/sh -c \012          JAVA='/opt/homebrew/opt/openjdk@21/bin/java' ; export JAVA ;\012          /usr/bin/perl -e '$x=$ENV{JAVA};exec $x @ARGV;die $!' -- GerritCodeReview  -Dflogger.backend_factory=com.google.common.flogger.backend.log4j.Log4jBackendFactory#getInstance -Dflogger.logging_context=com.google.gerrit.server.logging.LoggingContext#getInstance  -Xmx96g -XX:-MaxFDLimit -jar /Volumes/Data/source/gerrit_home/gerrit/bin/gerrit.war daemon -d /Volumes/Data/source/gerrit_home/gerrit --run-id=1750920644.11084 </dev/null >/dev/null 2>&1 &\012          PID=$! ;\012          disown ;\012          echo $PID >"/Volumes/Data/source/gerrit_home/gerrit/logs/gerrit.pid"
11155 ttys001    0:00.00 grep gerrit
  553 ttys002    0:00.04 login -pfl wgerrit /bin/bash -c exec -la zsh /bin/zsh
 8239 ttys004    0:00.02 login -pfl wgerrit /bin/bash -c exec -la zsh /bin/zsh
 
I have made sure all pathnames are owned by gerrit user.

Also It is not generating any logs for me to get any debug/error 
% ls -l logs
total 0
-rw-r--r--  1 wgerrit  staff  0 Jun 25 23:24 gc_log
-rw-r--r--  1 wgerrit  staff  0 Jun 25 23:50 gerrit.pid

What could be going wrong? any pointers, things to try?
Please help
Thanks
Pranab

Matthias Sohn

unread,
Jun 26, 2025, 3:09:03 AM6/26/25
to Pranab Panda, Repo and Gerrit Discussion, Luca Milanesio
instead of "start" try "run" which logs to the console 

gerrit % ./bin/gerrit.sh run
 
note that gerrit 3.12 requires Java 21

Pranab Panda

unread,
Jun 26, 2025, 12:57:52 PM6/26/25
to Matthias Sohn, Repo and Gerrit Discussion, Luca Milanesio
thank you so much for all your help.
It was pointing to some gitweb path issue.
Gerrit is up now without using sudo
Gerrit Code Review 3.12.0 ready

and also
[main] INFO  com.google.gerrit.sshd.SshDaemon : Started Gerrit APACHE-SSHD-2.15.0 on *:29418

but getting this error

% ssh -p 29418 gerrit-host gerrit ls
gerrit-host: Permission denied (publickey).

Need to still figure out why nginx is not working buy this is great
Thanks
Pranab
Reply all
Reply to author
Forward
0 new messages