Server Error Could not connect to SMTP host: localhost, port: 25

666 views
Skip to first unread message

J.K Wang

unread,
Mar 25, 2009, 5:09:08 AM3/25/09
to Repo and Gerrit Discussion
hi, Shawn
I'm trying to setup a local gerrit server, I can signed in gerrit now.
But when I tried to register new email by My->setting->contact
information->regester new email, the following error message was
shown:
Server Error
Could not connect to SMTP host: localhost, port: 25

Thanks in advance

J.K

Shawn Pearce

unread,
Mar 25, 2009, 12:46:26 PM3/25/09
to repo-d...@googlegroups.com
On Wed, Mar 25, 2009 at 02:09, J.K Wang <jkun...@gmail.com> wrote:
>
> I'm trying to setup a local gerrit server, I can signed in gerrit now.
> But when I tried to register new email by My->setting->contact
> information->regester new email, the following error message was
> shown:
> Server Error
> Could not connect to SMTP host: localhost, port: 25

Yea, Gerrit wants to connect to a SMTP server to send email to you at
your new address. You need to configure the outgoing mail resource in
$JETTY_HOME/contexts/gerrit.xml (if you are using Jetty), otherwise do
the same in whatever container you are using...

J.K Wang

unread,
Mar 26, 2009, 10:16:43 AM3/26/09
to Repo and Gerrit Discussion
Thanks Shawn,
Now I can register a new email address, but when I recieved the
registration email, the link is "http://127.0.0.1:8081/Gerrit#......."

How I can change it to my custom address.

On Mar 26, 12:46 am, Shawn Pearce <s...@google.com> wrote:

Shawn Pearce

unread,
Mar 26, 2009, 12:01:43 PM3/26/09
to repo-d...@googlegroups.com

Set canonical_url in system_config.

On Mar 26, 2009 7:17 AM, "J.K Wang" <jkun...@gmail.com> wrote:


Thanks Shawn,
Now I can register a new email address, but when I recieved the
registration email, the link is "http://127.0.0.1:8081/Gerrit#......."

How I can change it to my custom address.

On Mar 26, 12:46 am, Shawn Pearce <s...@google.com> wrote:

> On Wed, Mar 25, 2009 at 02:09, J.K Wang <jkun.w...@gmail.com> wrote: > > > I'm trying to setup a l...

--~--~---------~--~----~------------~-------~--~----~ To unsubscribe, email repo-discuss+unsubscribe...

J.K Wang

unread,
Mar 26, 2009, 10:55:02 PM3/26/09
to Repo and Gerrit Discussion
After run: psql -c "UPDATE system_config SET canonical_url='http://
example.com/review/'" reviewdb
restart gerrit and apache2
when I access the gerrit server,I found "redirect loop " error
the following code is my apache conf
<Location /review/>
ProxyPass http://127.0.0.1:8081/
ProxyPassReverse http://127.0.0.1:8081/
AuthType Basic
AuthName "Gerrit Review Server"
AuthUserFile /etc/.pass
Require valid-user
</Location>


On Mar 27, 12:01 am, Shawn Pearce <s...@google.com> wrote:
> Set canonical_url in system_config.
>

Shawn Pearce

unread,
Mar 27, 2009, 10:09:50 AM3/27/09
to repo-d...@googlegroups.com
On Thu, Mar 26, 2009 at 19:55, J.K Wang <jkun...@gmail.com> wrote:
>
> After run: psql -c "UPDATE system_config SET canonical_url='http://
> example.com/review/'" reviewdb
> restart gerrit and apache2
> when I access the gerrit server,I found "redirect loop " error
> the following code is my apache conf
> <Location /review/>
> ProxyPass http://127.0.0.1:8081/
> ProxyPassReverse http://127.0.0.1:8081/

This is your problem. You also need to load Gerrit in the container
under /review/.

Internally I'm running Gerrit under /g/:

Apache config:

<Location /g/>
AuthType google-sso
AuthName AndroidGoogleGitWeb
require group eng
</Location>
ProxyPass /g/ http://127.0.0.1:8081/g/

JETTY_DIR/contexts/gerrit.xml:

<Configure id="wac" class="org.mortbay.jetty.webapp.WebAppContext">
<Set name="contextPath">/g</Set>


Otherwise, yea, it will loop. Gerrit gets a request under "/" and
expects it under "/review/" so it redirects, and gets stuck.

Reply all
Reply to author
Forward
0 new messages