CandyShop / gerrit

Automatically exported from code.google.com/p/gerrit
Apache License 2.0
1 stars 0 forks source link

Client-side console output always shows default web server port for new changes #3308

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Affected Version: 2.10.2

What steps will reproduce the problem?

1. Make the Gerrit UI run on a non-standard port, e.g. 8090 instead of 8080
2. Push changes to Gerrit via SSH and observe the client-side console output

What is the expected output? What do you see instead?

I'd expect the configured non-standard port to be part of the console output. 
However, the output always shows the default port of 8080. This is the output 
from my server which is running on port 8090:

remote: New Changes:
remote:   http://bf-anddevci.domain.com:8080/1 WIP 2
remote:   http://bf-anddevci.domain.com:8080/2 WIP 3

Original issue reported on code.google.com by sschuberth on 16 Apr 2015 at 11:42

GoogleCodeExporter commented 9 years ago
It's using the canonical web URL. Have you configured gerrit.canonicalWebUrl 
[1] to the non-standard port?

[1] 
https://gerrit-review.googlesource.com/Documentation/config-gerrit.html#gerrit.c
anonicalGitUrl

Original comment by edwin.ke...@gmail.com on 16 Apr 2015 at 11:58

GoogleCodeExporter commented 9 years ago
I was simply using the DEB package as provided by [1] to install Gerrit. 
Indeed, looking at /etc/gerrit/gerrit.config shows:

[gerrit]
        basePath = git
        canonicalWebUrl = http://bf-anddevci.domain.com:8080/
[database]
        type = h2
        database = db/ReviewDB
[index]
        type = LUCENE
[auth]
        type = DEVELOPMENT_BECOME_ANY_ACCOUNT
[sendemail]
        smtpServer = localhost
[sshd]
        listenAddress = *:29418
[httpd]
        listenUrl = http://*:8090/

So the port as part of canonicalWebUrl mismatches the port as part of 
listenUrl. Does it even make sense to allow the port to be part of both?

[1] https://groups.google.com/d/msg/repo-discuss/2F6eeXZwABE/t-VFE47sJ7cJ

Original comment by sschuberth on 16 Apr 2015 at 12:06

GoogleCodeExporter commented 9 years ago
 > So the port as part of canonicalWebUrl mismatches the port as part of listenUrl.  
 > Does it even make sense to allow the port to be part of both?

canonicalWebUrl is the URL that is returned to users, listenUrl is the URL 
under which Gerrit runs internally. They may be different, when you run a proxy 
in front of Gerrit. 

Original comment by edwin.ke...@gmail.com on 16 Apr 2015 at 12:13

GoogleCodeExporter commented 9 years ago
So then this basically is a bug in the DEB packaging / configuration. As such, 
is valid to stay as an issue in here, or am I supposed to report it elsewhere?

Original comment by sschuberth on 16 Apr 2015 at 12:17

GoogleCodeExporter commented 9 years ago
Yes, this looks like a bug in the DEB packaging. AFAIK Luca is maintaining it, 
just let him know about this issue here.

Original comment by edwin.ke...@gmail.com on 16 Apr 2015 at 12:19

GoogleCodeExporter commented 9 years ago
The Deb package has 8080 as configured port for the initial setup, how did you 
manage to change it to 8090 automatically?
If you edit manually re confit after having installed the Deb package, you 
cannot expect the packaging itself to fix the canonicalWebUrl by magic ;-)

Original comment by luca.mil...@gmail.com on 17 Apr 2015 at 12:41

GoogleCodeExporter commented 9 years ago
I'm not aware of having done something special. I just already had Jenkins 
running on port 8080 before installing Gerrit. Can it be that some installation 
logic then automatically picked port 8090 for Gerrit?

Original comment by sschuberth on 17 Apr 2015 at 4:49