question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to install this plugin in docker?

See original GitHub issue
  1. mapping /opt/gerrit/plugins:/var/gerrit/plugins
  2. copy oauth.jar to /opt/gerrit/plugins
  3. login to gerrit container at the directory /var/gerrit/bin/
  4. run java -jar gerrit.war init -d gerrit

It doesn’t show the information you showed in the doc

Here is my operation log

bash-4.4$ java -jar gerrit.war init -d gerrit
Using secure store: com.google.gerrit.server.securestore.DefaultSecureStore
[2022-02-23 09:59:08,960] [main] INFO  com.google.gerrit.server.config.GerritServerConfigProvider : No /var/gerrit/bin/gerrit/etc/gerrit.config; assuming defaults

*** Gerrit Code Review 3.5.0.1
***


*** Git Repositories
***

Location of Git repositories   [git]:

*** JGit Configuration
***

Auto-configured "receive.autogc = false" to disable auto-gc after git-receive-pack.

*** Index
***

Type                           [lucene]:

*** User Authentication
***

Authentication method          [openid/?]: oauth
Git/HTTP authentication        [http/?]: oauth
*WARNING* Please make sure that your chosen OAuth provider
supports Git token authentication.
Enable signed push support     [y/N]?

*** Review Labels
***

Install Verified label         [y/N]?

*** Email Delivery
***

SMTP server hostname           [localhost]:
SMTP server port               [(default)]:
SMTP encryption                [none/?]:
SMTP username                  :

*** Container Process
***

Run as                         [gerrit]:
Java runtime                   [/usr/lib/jvm/java-11-openjdk-11.0.13.0.8-3.el8_5.x86_64]:
Copy gerrit.war to gerrit/bin/gerrit.war [Y/n]?
Copying gerrit.war to gerrit/bin/gerrit.war

*** SSH Daemon
***

Listen on address              [*]:
Listen on port                 [29418]:
Generating SSH host key ... rsa... ed25519... ecdsa 256... ecdsa 384... ecdsa 521... done

*** HTTP Daemon
***

Behind reverse proxy           [y/N]?
Use SSL (https://)             [y/N]?
Listen on address              [*]:
Listen on port                 [8080]:
Canonical URL                  [http://72318470031d:8080/]:

*** Cache
***


*** Plugins
***

Installing plugins.
Install plugin codemirror-editor version v3.5.0.1 [y/N]? y
Installed codemirror-editor v3.5.0.1
Install plugin commit-message-length-validator version v3.5.0.1 [y/N]? y
Installed commit-message-length-validator v3.5.0.1
Install plugin delete-project version v3.5.0.1 [y/N]? y
Installed delete-project v3.5.0.1
Install plugin download-commands version v3.5.0.1 [y/N]? y
Installed download-commands v3.5.0.1
Install plugin gitiles version v3.5.0.1 [y/N]? y
Installed gitiles v3.5.0.1
Install plugin hooks version v3.5.0.1 [y/N]? y
Installed hooks v3.5.0.1
Install plugin plugin-manager version v3.5.0.1 [y/N]? y
Installed plugin-manager v3.5.0.1
Install plugin replication version v3.5.0.1 [y/N]? y
Installed replication v3.5.0.1
Install plugin reviewnotes version v3.5.0.1 [y/N]? y
Installed reviewnotes v3.5.0.1
Install plugin singleusergroup version v3.5.0.1 [y/N]? y
Installed singleusergroup v3.5.0.1
Install plugin webhooks version v3.5.0.1 [y/N]? y
Installed webhooks v3.5.0.1
Initializing plugins.

============================================================================
Welcome to the Gerrit community

Find more information on the homepage: https://www.gerritcodereview.com
Discuss Gerrit on the mailing list: https://groups.google.com/g/repo-discuss
============================================================================
Initialized /var/gerrit/bin/gerrit
Init complete, reindexing accounts with: reindex --site-path gerrit --threads 1 --index accountsReindexed 0 documents in accounts index in 0.0s (0.0/s)
Index accounts in version 11 is ready
Cache Statistics at the end of reindexing accounts
  Name                          |Entries              |  AvgGet |Hit Ratio|
                                |   Mem   Disk   Space|         |Mem  Disk|
--------------------------------+---------------------+---------+---------+
  groups_external               |                     |         |         |
  groups_bysubgroup             |                     |         |         |
  change_notes                  |                     |         |         |
  groups_byuuid                 |                     |         |         |
  default_preferences           |                     |         |         |
  prolog_rules                  |                     |         |         |
  groups                        |                     |         |         |
  projects                      |                     |         |         |
  groups_byname                 |                     |         |         |
  groups_external_persisted     |                     |         |         |
  groups_bymember               |                     |         |         |
  project_list                  |                     |         |         |
  permission_sort               |                     |         |         |
  external_ids_map              |                     |         |         |
D diff_summary                  |                0.00k|         |         |
D pure_revert                   |                0.00k|         |         |
D groups_byuuid_persisted       |                0.00k|         |         |
D change_kind                   |                0.00k|         |         |
D mergeability                  |                0.00k|         |         |
D conflicts                     |                0.00k|         |         |
D diff_intraline                |                0.00k|         |         |
D approvals                     |                0.00k|         |         |
D git_tags                      |                0.00k|         |         |
D gerrit_file_diff              |                0.00k|         |         |
D git_file_diff                 |                0.00k|         |         |
D accounts                      |                0.00k|         |         |
D persisted_projects            |                0.00k|         |         |
D git_modified_files            |                0.00k|         |         |
D modified_files                |                0.00k|         |         |

Collecting projects:    2 changes with: reindex --site-path gerrit --threads 1 --index changes
Reindexing changes: done
Reindexed 0 documents in changes index in 0.1s (0.0/s)
Index changes in version 71 is ready
Cache Statistics at the end of reindexing changes
  Name                          |Entries              |  AvgGet |Hit Ratio|
                                |   Mem   Disk   Space|         |Mem  Disk|
--------------------------------+---------------------+---------+---------+
  groups_external               |                     |         |         |
  groups_bysubgroup             |                     |         |         |
  change_notes                  |                     |         |         |
  groups_byuuid                 |                     |         |         |
  default_preferences           |                     |         |         |
  prolog_rules                  |                     |         |         |
  groups                        |                     |         |         |
  projects                      |                     |         |         |
  groups_byname                 |                     |         |         |
  groups_external_persisted     |                     |         |         |
  groups_bymember               |                     |         |         |
  project_list                  |     1               |  24.2ms | 50%     |
  permission_sort               |                     |         |         |
  external_ids_map              |                     |         |         |
D diff_summary                  |                0.00k|         |         |
D pure_revert                   |                0.00k|         |         |
D groups_byuuid_persisted       |                0.00k|         |         |
D change_kind                   |                0.00k|         |         |
D mergeability                  |                0.00k|         |         |
D conflicts                     |                0.00k|         |         |
D diff_intraline                |                0.00k|         |         |
D approvals                     |                0.00k|         |         |
D git_tags                      |                0.00k|         |         |
D gerrit_file_diff              |                0.00k|         |         |
D git_file_diff                 |                0.00k|         |         |
D accounts                      |                0.00k|         |         |
D persisted_projects            |                0.00k|         |         |
D git_modified_files            |                0.00k|         |         |
D modified_files                |                0.00k|         |         |

Reindexing groups:      100% (2/2)ith: reindex --site-path gerrit --threads 1 --index groups
Reindexed 2 documents in groups index in 0.6s (3.6/s)
Index groups in version 8 is ready
Cache Statistics at the end of reindexing groups
  Name                          |Entries              |  AvgGet |Hit Ratio|
                                |   Mem   Disk   Space|         |Mem  Disk|
--------------------------------+---------------------+---------+---------+
  groups_external               |                     |         |         |
  groups_bysubgroup             |                     |         |         |
  change_notes                  |                     |         |         |
  groups_byuuid                 |                     | 390.4ms |  0%     |
  default_preferences           |                     |         |         |
  prolog_rules                  |                     |         |         |
  groups                        |                     |         |         |
  projects                      |                     |         |         |
  groups_byname                 |                     |         |         |
  groups_external_persisted     |                     |         |         |
  groups_bymember               |                     |         |         |
  project_list                  |                     |         |         |
  permission_sort               |                     |         |         |
  external_ids_map              |                     |         |         |
D diff_summary                  |                0.00k|         |         |
D pure_revert                   |                0.00k|         |         |
D groups_byuuid_persisted       |                0.00k| 344.1ms |  0%     |
D change_kind                   |                0.00k|         |         |
D mergeability                  |                0.00k|         |         |
D conflicts                     |                0.00k|         |         |
D diff_intraline                |                0.00k|         |         |
D approvals                     |                0.00k|         |         |
D git_tags                      |                0.00k|         |         |
D gerrit_file_diff              |                0.00k|         |         |
D git_file_diff                 |                0.00k|         |         |
D accounts                      |                0.00k|         |         |
D persisted_projects            |                0.00k|         |         |
D git_modified_files            |                0.00k|         |         |
D modified_files                |                0.00k|         |         |

Reindexing projects:    100% (2/2) with: reindex --site-path gerrit --threads 1 --index projects
Reindexed 2 documents in projects index in 1.6s (1.2/s)
Index projects in version 4 is ready
Cache Statistics at the end of reindexing projects
  Name                          |Entries              |  AvgGet |Hit Ratio|
                                |   Mem   Disk   Space|         |Mem  Disk|
--------------------------------+---------------------+---------+---------+
  groups_external               |                     |         |         |
  groups_bysubgroup             |                     |         |         |
  change_notes                  |                     |         |         |
  groups_byuuid                 |                     |         |         |
  default_preferences           |                     |         |         |
  prolog_rules                  |                     |         |         |
  groups                        |                     |         |         |
  projects                      |     2               | 489.8ms | 33%     |
  groups_byname                 |                     |         |         |
  groups_external_persisted     |                     |         |         |
  groups_bymember               |                     |         |         |
  project_list                  |     1               |   4.5ms |  0%     |
  permission_sort               |                     |         |         |
  external_ids_map              |                     |         |         |
D diff_summary                  |                0.00k|         |         |
D pure_revert                   |                0.00k|         |         |
D groups_byuuid_persisted       |            2   0.90k|         |         |
D change_kind                   |                0.00k|         |         |
D mergeability                  |                0.00k|         |         |
D conflicts                     |                0.00k|         |         |
D diff_intraline                |                0.00k|         |         |
D approvals                     |                0.00k|         |         |
D git_tags                      |                0.00k|         |         |
D gerrit_file_diff              |                0.00k|         |         |
D git_file_diff                 |                0.00k|         |         |
D accounts                      |                0.00k|         |         |
D persisted_projects            |                0.00k| 233.3ms |  0%     |
D git_modified_files            |                0.00k|         |         |
D modified_files                |                0.00k|         |         |

bash-4.4$ java -jar gerrit.war ls
plugins/codemirror-editor.jar
plugins/commit-message-length-validator.jar
plugins/delete-project.jar
plugins/download-commands.jar
plugins/gitiles.jar
plugins/hooks.jar
plugins/plugin-manager.jar
plugins/replication.jar
plugins/reviewnotes.jar
plugins/singleusergroup.jar
plugins/webhooks.jar
extra/jetty7/gerrit-jetty.sh
extra/jetty7/gerrit.xml
extra/jetty7/jetty_sslproxy.xml
LICENSES.txt

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
davidocommented, Feb 24, 2022

Thanks for confirming, that the root cause was not related to this plugin.

0reactions
pplmxcommented, Feb 24, 2022

Hi, @davido Thanks for your help 😃 I have found the root cause: GERRIT_SITE isn’t be set rightly. Right way:

docker container exec -it gerrit-gerrit-1 bash
export GERRIT_SITE=/var/gerrit
java -jar /var/gerrit/bin/gerrit*.war init -d $GERRIT_SITE
Read more comments on GitHub >

github_iconTop Results From Across the Web

docker plugin install
The following example installs vieus/sshfs plugin and sets its DEBUG environment variable to 1 . To install, pull the plugin from Docker Hub...
Read more >
Install the Compose plugin
Install the plugin manually · Apply executable permissions to the binary: $ chmod +x $DOCKER_CONFIG/cli-plugins/docker-compose. or, if you chose to install...
Read more >
docker plugin
Create a plugin from a rootfs and configuration. Plugin data directory must contain config.json and rootfs directory. docker plugin disable, Disable a plugin....
Read more >
docker plugin ls
docker plugin ls: Lists all the plugins that are currently installed. You can install plugins using the [`docker plugin install`](plugin_install.md) command ...
Read more >
Docker Plugin API
What plugins are ... A plugin is a process running on the same or a different host as the docker daemon,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found