You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@bloodhound.apache.org by ldr ldr <st...@gmail.com> on 2013/11/17 16:15:06 UTC

Unable to acquire db connection from Trac?

Attempting to install Apache Bloodhound (which is built atop Trac) on
Ubuntu 13.10 x64 server.

I have followed their installation guide precisely (for Postgres).

###Error output from `bloodhound_setup.py`

Error: TimeoutError: Unable to get database connection within 0 seconds.

###Web interface

TimeoutError: Unable to get database connection within 0 seconds.
              (OperationalError: could not translate host name
"jr5@localhost" to address: Name or service not known

["jr5" are the last 3 chars of my password; not sure why they are there^]

________________________________

How do I get this to work?

Re: Unable to acquire db connection from Trac?

Posted by ldr ldr <st...@gmail.com>.
Okay; thanks.

On Mon, Nov 18, 2013 at 5:31 PM, Ryan Ollos <ry...@wandisco.com> wrote:
> On Sun, Nov 17, 2013 at 8:52 PM, ldr ldr <st...@gmail.com>
> wrote:
>>
>> No, the @ symbol is from the `username:password@host` syntax; however
>> I have an `@` in that password causing the problem.
>>
>> You could cryptographically hash the password, e.g.: in MD5 or SHA3
>>
>> In the meantime, I will change my password to one not containing an `@`.
>>
>> On Mon, Nov 18, 2013 at 3:17 PM, Michael Jinks <mi...@gmail.com>
>> wrote:
>> > On Sun, Nov 17, 2013 at 9:00 PM, ldr ldr <st...@gmail.com>
>> > wrote:
>> >>
>> >> But we shouldn't have passwords containing `@` symbols.
>> >
>> > My guess (I'm new to Trac/Bloodhound): It's because the config file is
>> > interpreted by Python, and Python sees '@' symbols as significant
>> > characters. There might be a way to escape the character, or try
>> > enclosing the string in single or double quotes, but when I've run
>> > into issues like this with similar applications, I ended up just
>> > changing my password to something more easily handled by the
>> > interpreter. If you're worried about password guessing, consider using
>> > longer strings. Each character you add makes the intruder's job a lot
>> > harder.
>> >
>> >> On that note;
>> >> why is my password in plain-text?
>> >
>> > How else would you store it? Or, suppose you could encode the password
>> > somehow; what advantage would that give?
>
>
> Michael is correct, there is a way to escape the @ character, it must be URL
> encoded. This has recently been updated in the Trac documentation, and we
> will get the updated documentation when we upgrade our copy of Trac
> following release 1.0.2:
>
> http://trac.edgewall.org/wiki/TracEnvironment?sfp_email=&sfph_mail=&action=diff&version=48&old_version=47&sfp_email=&sfph_mail=
> http://trac.edgewall.org/wiki/TracEnvironment#DatabaseConnectionStrings
>
> We are working to improve the error message that is presented when this
> issue is encountered, and that should also be improved in Trac 1.0.2, which
> will be in Bloodhound 0.9 or 0.10 most likely.
> http://trac.edgewall.org/ticket/11189
>
>

Re: Unable to acquire db connection from Trac?

Posted by Ryan Ollos <ry...@wandisco.com>.
On Sun, Nov 17, 2013 at 8:52 PM, ldr ldr <st...@gmail.com>wrote:

> No, the @ symbol is from the `username:password@host` syntax; however
> I have an `@` in that password causing the problem.
>
> You could cryptographically hash the password, e.g.: in MD5 or SHA3
>
> In the meantime, I will change my password to one not containing an `@`.
>
> On Mon, Nov 18, 2013 at 3:17 PM, Michael Jinks <mi...@gmail.com>
> wrote:
> > On Sun, Nov 17, 2013 at 9:00 PM, ldr ldr <st...@gmail.com>
> wrote:
> >>
> >> But we shouldn't have passwords containing `@` symbols.
> >
> > My guess (I'm new to Trac/Bloodhound): It's because the config file is
> > interpreted by Python, and Python sees '@' symbols as significant
> > characters. There might be a way to escape the character, or try
> > enclosing the string in single or double quotes, but when I've run
> > into issues like this with similar applications, I ended up just
> > changing my password to something more easily handled by the
> > interpreter. If you're worried about password guessing, consider using
> > longer strings. Each character you add makes the intruder's job a lot
> > harder.
> >
> >> On that note;
> >> why is my password in plain-text?
> >
> > How else would you store it? Or, suppose you could encode the password
> > somehow; what advantage would that give?
>

Michael is correct, there is a way to escape the @ character, it must be
URL encoded. This has recently been updated in the Trac documentation, and
we will get the updated documentation when we upgrade our copy of Trac
following release 1.0.2:

http://trac.edgewall.org/wiki/TracEnvironment?sfp_email=&sfph_mail=&action=diff&version=48&old_version=47&sfp_email=&sfph_mail=
http://trac.edgewall.org/wiki/TracEnvironment#DatabaseConnectionStrings

We are working to improve the error message that is presented when this
issue is encountered, and that should also be improved in Trac 1.0.2, which
will be in Bloodhound 0.9 or 0.10 most likely.
http://trac.edgewall.org/ticket/11189

Re: Unable to acquire db connection from Trac?

Posted by Michael Jinks <mi...@gmail.com>.
I wrote, re. a DB password stored in the clear:

>> How else would you store it? Or, suppose you could encode the password
>> somehow; what advantage would that give?

ldr replied:

> You could cryptographically hash the password, e.g.: in MD5 or SHA3

Yeah you could do that, but then, how would the client use the hash to
connect to the server?

Re: Unable to acquire db connection from Trac?

Posted by ldr ldr <st...@gmail.com>.
No, the @ symbol is from the `username:password@host` syntax; however
I have an `@` in that password causing the problem.

You could cryptographically hash the password, e.g.: in MD5 or SHA3

In the meantime, I will change my password to one not containing an `@`.

On Mon, Nov 18, 2013 at 3:17 PM, Michael Jinks <mi...@gmail.com> wrote:
> On Sun, Nov 17, 2013 at 9:00 PM, ldr ldr <st...@gmail.com> wrote:
>>
>> But we shouldn't have passwords containing `@` symbols.
>
> My guess (I'm new to Trac/Bloodhound): It's because the config file is
> interpreted by Python, and Python sees '@' symbols as significant
> characters. There might be a way to escape the character, or try
> enclosing the string in single or double quotes, but when I've run
> into issues like this with similar applications, I ended up just
> changing my password to something more easily handled by the
> interpreter. If you're worried about password guessing, consider using
> longer strings. Each character you add makes the intruder's job a lot
> harder.
>
>> On that note;
>> why is my password in plain-text?
>
> How else would you store it? Or, suppose you could encode the password
> somehow; what advantage would that give?

Re: Unable to acquire db connection from Trac?

Posted by Michael Jinks <mi...@gmail.com>.
On Sun, Nov 17, 2013 at 9:00 PM, ldr ldr <st...@gmail.com> wrote:
>
> But we shouldn't have passwords containing `@` symbols.

My guess (I'm new to Trac/Bloodhound): It's because the config file is
interpreted by Python, and Python sees '@' symbols as significant
characters. There might be a way to escape the character, or try
enclosing the string in single or double quotes, but when I've run
into issues like this with similar applications, I ended up just
changing my password to something more easily handled by the
interpreter. If you're worried about password guessing, consider using
longer strings. Each character you add makes the intruder's job a lot
harder.

> On that note;
> why is my password in plain-text?

How else would you store it? Or, suppose you could encode the password
somehow; what advantage would that give?

Re: Unable to acquire db connection from Trac?

Posted by ldr ldr <st...@gmail.com>.
Oh, I see the problem.

You should probably add this to the docs, I'm guessing it'd be in
postgres's docs…

But we shouldn't have passwords containing `@` symbols. On that note;
why is my password in plain-text?

On Mon, Nov 18, 2013 at 3:11 AM, Ryan Ollos <ry...@wandisco.com> wrote:
> On Sun, Nov 17, 2013 at 7:15 AM, ldr ldr <st...@gmail.com>
> wrote:
>>
>> Attempting to install Apache Bloodhound (which is built atop Trac) on
>> Ubuntu 13.10 x64 server.
>>
>> I have followed their installation guide precisely (for Postgres).
>>
>> ###Error output from `bloodhound_setup.py`
>>
>> Error: TimeoutError: Unable to get database connection within 0 seconds.
>>
>> ###Web interface
>>
>> TimeoutError: Unable to get database connection within 0 seconds.
>>               (OperationalError: could not translate host name
>> "jr5@localhost" to address: Name or service not known
>>
>> ["jr5" are the last 3 chars of my password; not sure why they are there^]
>>
>> ________________________________
>>
>> How do I get this to work?
>
>
> The first place I would look it, what is the value of `[trac] database` in
> conf/trac.ini? The file `conf/trac.ini` is found in your environment
> directory.

Re: Unable to acquire db connection from Trac?

Posted by Ryan Ollos <ry...@wandisco.com>.
On Sun, Nov 17, 2013 at 7:15 AM, ldr ldr <st...@gmail.com>wrote:

> Attempting to install Apache Bloodhound (which is built atop Trac) on
> Ubuntu 13.10 x64 server.
>
> I have followed their installation guide precisely (for Postgres).
>
> ###Error output from `bloodhound_setup.py`
>
> Error: TimeoutError: Unable to get database connection within 0 seconds.
>
> ###Web interface
>
> TimeoutError: Unable to get database connection within 0 seconds.
>               (OperationalError: could not translate host name
> "jr5@localhost" to address: Name or service not known
>
> ["jr5" are the last 3 chars of my password; not sure why they are there^]
>
> ________________________________
>
> How do I get this to work?
>

The first place I would look it, what is the value of `[trac] database` in
conf/trac.ini? The file `conf/trac.ini` is found in your environment
directory.