[Trac] trac/postgresql error: no route to host

23 views
Skip to first unread message

Ivan Uemlianin

unread,
May 13, 2010, 10:05:31 AM5/13/10
to Trac Users
Dear All

I am trying to set up trac with postgresql. However, in trac-admin
initenv I am receiving a "no route to host" error:


Database connection string [sqlite:db/trac.db]>
postgres://tdb_user:tdb_pass@locahost/tdb_dbname

Creating and Initializing Project
Initenv for '/opt/trac/pgtest' failed.
Failed to create environment.
could not connect to server: No route to host
Is the server running on host "locahost" and accepting
TCP/IP connections on port 5432?

Traceback (most recent call last):
File "build/bdist.linux-x86_64/egg/trac/admin/console.py", line 413,
in do_initenv
options=options)
File "build/bdist.linux-x86_64/egg/trac/env.py", line 221, in
__init__
self.create(options)
File "build/bdist.linux-x86_64/egg/trac/env.py", line 410, in create
DatabaseManager(self).init_db()
File "build/bdist.linux-x86_64/egg/trac/db/api.py", line 87, in
init_db
connector.init_db(**args)
File "build/bdist.linux-x86_64/egg/trac/db/postgres_backend.py",
line 98, in init_db
params)
File "build/bdist.linux-x86_64/egg/trac/db/postgres_backend.py",
line 87, in get_connection
params)
File "build/bdist.linux-x86_64/egg/trac/db/postgres_backend.py",
line 203, in __init__
port))
OperationalError: could not connect to server: No route to host
Is the server running on host "locahost" and accepting
TCP/IP connections on port 5432?


trac-admin is happy with sqlite.
I can login to postgresql using psql.
I have disabled iptables and selinux (It's all on a centos machine).
Stopping my web server (nginx) makes no difference.

ping localhost works but indeed ping localhost 5432 does not (receives
no packets). However, postgresql.conf has:

listen_addresses = 'localhost'
port = 5432

I have the feeling I'm missing something obvious (I have read the FAQ,
Googled, etc.). Please can anyone advise?

With thanks and best wishes

Ivan

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To post to this group, send email to trac-...@googlegroups.com.
To unsubscribe from this group, send email to trac-users+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/trac-users?hl=en.

Ivan Uemlianin

unread,
May 13, 2010, 11:05:29 AM5/13/10
to Trac Users
Dear All

Please ignore this request! The problem was a silly typo:

postgres://tdb_user:tdb_pass@locahost/tdb_dbname

should be

postgres://tdb_user:tdb_pass@localhost/tdb_dbname

I am booked in for new glasses on Saturday.

Thanks, best wishes and apologies.

Ivan
Reply all
Reply to author
Forward
0 new messages