Try

postgres://w2p:passw...@localhost:5432/w2p

--
Thadeus





On Wed, May 26, 2010 at 5:17 PM, Julius Minka <[email protected]> wrote:
> This is virtual server with centos 5.5 in internet.
> I have successfully instaled web2py with Apache and mod_wsgi based
> mainly on instructions from
> http://web2py.com/AlterEgo/default/show/239 and
> http://web2py.com/AlterEgo/default/show/240
>
> Probably last step is missing.
> I am getting this error when accessing site from internet:
> RuntimeError: Failure to connect to DB. Tried 5 times
>
> when I start it from command line, it shows support for PostgreSQL:
> python2.6 web2py/web2py.py -i xx.xx.xx.xx -p 7777 -a password
>
> web2py Enterprise Web Framework
> Created by Massimo Di Pierro, Copyright 2007-2010
> Version 1.78.3 (2010-05-17 21:59:39)
> Database drivers available: PostgreSQL
> Starting hardcron...
> WARNING:root:GUI not available because Tk library is not installed
> please visit:
>        http://......
>
>
> I can verify access from command line:
> psql -U w2p -d w2p -h 127.0.0.1 -p 5432
> Password for user w2p:
> Welcome to psql 8.1.21, the PostgreSQL interactive terminal.
>
> Type:  \copyright for distribution terms
>       \h for help with SQL commands
>       \? for help with psql commands
>       \g or terminate with semicolon to execute query
>       \q to quit
>
> w2p=# \q
>
> It works.
>
>
> In ... web2py/applications/welcome/models/db.py
> db = DAL('postgres://w2p:[email protected]:5432/w2p')
>
> What could be the problem? I have no further idea how to verify the
> reason for failure of connection.
>
> Julius
>
>
>

Reply via email to