Starting Gerrit Code Review: sh-4.2#

90 views
Skip to first unread message

Christopher John

unread,
Oct 26, 2023, 2:20:16 AM10/26/23
to Repo and Gerrit Discussion
When gerrit is starting, the following information is displayed: 
Starting Gerrit Code Review: sh-4.2#

And did not start normally, see should be a command line, what is the reason for this? How are we gonna fix this?

Dingtalk_20231026141930.jpg

Sven Selberg

unread,
Oct 26, 2023, 2:32:04 AM10/26/23
to Repo and Gerrit Discussion
My guess would be that "sh" starts a shell-promt.
gerrit.sh has a she-bang and "should" be ran like:
`# ./gerrit.sh start`

- Sven

Christopher John

unread,
Oct 26, 2023, 2:40:54 AM10/26/23
to Repo and Gerrit Discussion
I tried using "./gerrit.sh start", but it failed.
Dingtalk_20231026144021.jpg

Sven Selberg

unread,
Oct 26, 2023, 2:45:46 AM10/26/23
to Repo and Gerrit Discussion
On Thursday, October 26, 2023 at 8:40:54 AM UTC+2 Christopher John wrote:
I tried using "./gerrit.sh start", but it failed.

Then I'm at a loss, might be some gunk in your environment.
Did you follow the getting-started guide?
Message has been deleted

Christopher John

unread,
Nov 2, 2023, 4:26:51 AM11/2/23
to Repo and Gerrit Discussion
After a day of research, the problem has been solved by modifying the bin/gerrit.sh startup script. In this shell script, the su command is used to switch users and execute the startup command, but the addition of the - parameter causes the shell to enter the login mode.
Dingtalk_20231102161608.jpg
The solution is to delete the - parameter, as shown in the figure:
Dingtalk_20231102161811.jpg
Then use "./gerrit.sh restart" to restart gerrit
Reply all
Reply to author
Forward
0 new messages