Edgewall Software
Modify

Opened 18 years ago

Closed 15 years ago

#4109 closed defect (wontfix)

Trac fails when last client cannot resolve dns of database server (postgres)

Reported by: Martin Marcher Owned by: Christopher Lenz
Priority: high Milestone:
Component: web frontend/mod_python Version: 0.10
Severity: critical Keywords:
Cc: martin.marcher@… Branch:
Release Notes:
API Changes:
Internal Changes:

Description

The setup is the following:

https://10.200.2.5/$PROJECTNAME forwards to http://10.200.2.2/trac/$PROJECTNAME

the database host has the following DNS entries:

db            IN CNAME innsbruck
innsbruck     IN A     10.200.2.3

This works when the database is queried by IP (since I couldn't make the server publicly available I can only say that it works when the db server is reachable)

As soon as I use the mentioned database URI trac generates a internal server error. Both boxes the proxy (10.200.2.5 and 10.200.2.2) can resolve the host "db" just fine. The last client can't.

trac.ini doesn't work:

database = postgres://of_trac_sandbox:foobar@db/trac_sandbox
database = postgres://of_trac_sandbox:foobar@db.openforce.lan/trac_sandbox

trac.ini works:

database = postgres://of_trac_sandbox:foobar@10.200.2.3/trac_sandbox

DNS Works

ping -c1 db
PING innsbruck.openforce.com (10.200.2.3) 56(84) bytes of data.
64 bytes from innsbruck.openforce.lan (10.200.2.3): icmp_seq=1 ttl=64 time=0.384 ms

--- innsbruck.openforce.com ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.384/0.384/0.384/0.000 ms

Trac Error

[Wed Nov 08 18:24:07 2006] [error] [client 10.200.2.107] PythonHandler trac.web.modpython_frontend: Traceback (most recent call last):
[Wed Nov 08 18:24:07 2006] [error] [client 10.200.2.107] PythonHandler trac.web.modpython_frontend:   File "/usr/lib/python2.4/site-packages/mod_python/apache.py", line 299, in HandlerDispatch\n    result = object(req)
[Wed Nov 08 18:24:07 2006] [error] [client 10.200.2.107] PythonHandler trac.web.modpython_frontend:   File "/usr/lib64/python2.4/site-packages/trac/web/modpython_frontend.py", line 87, in handler\n    gateway.run(dispatch_request)
[Wed Nov 08 18:24:07 2006] [error] [client 10.200.2.107] PythonHandler trac.web.modpython_frontend:   File "/usr/lib64/python2.4/site-packages/trac/web/wsgi.py", line 87, in run\n    response = application(self.environ, self._start_response)
[Wed Nov 08 18:24:07 2006] [error] [client 10.200.2.107] PythonHandler trac.web.modpython_frontend:   File "/usr/lib64/python2.4/site-packages/trac/web/main.py", line 346, in dispatch_request\n    env = _open_environment(env_path, run_once=environ['wsgi.run_once'])
[Wed Nov 08 18:24:07 2006] [error] [client 10.200.2.107] PythonHandler trac.web.modpython_frontend:   File "/usr/lib64/python2.4/site-packages/trac/web/main.py", line 57, in _open_environment\n    env_cache[env_path] = open_environment(env_path)
[Wed Nov 08 18:24:07 2006] [error] [client 10.200.2.107] PythonHandler trac.web.modpython_frontend:   File "/usr/lib64/python2.4/site-packages/trac/env.py", line 434, in open_environment\n    if env.needs_upgrade():
[Wed Nov 08 18:24:07 2006] [error] [client 10.200.2.107] PythonHandler trac.web.modpython_frontend:   File "/usr/lib64/python2.4/site-packages/trac/env.py", line 312, in needs_upgrade\n    db = self.get_db_cnx()
[Wed Nov 08 18:24:07 2006] [error] [client 10.200.2.107] PythonHandler trac.web.modpython_frontend:   File "/usr/lib64/python2.4/site-packages/trac/env.py", line 182, in get_db_cnx\n    return DatabaseManager(self).get_connection()
[Wed Nov 08 18:24:07 2006] [error] [client 10.200.2.107] PythonHandler trac.web.modpython_frontend:   File "/usr/lib64/python2.4/site-packages/trac/db/api.py", line 71, in get_connection\n    return self._cnx_pool.get_cnx()
[Wed Nov 08 18:24:07 2006] [error] [client 10.200.2.107] PythonHandler trac.web.modpython_frontend:   File "/usr/lib64/python2.4/site-packages/trac/db/pool.py", line 83, in get_cnx\n    cnx = self._connector.get_connection(**self._kwargs)
[Wed Nov 08 18:24:07 2006] [error] [client 10.200.2.107] PythonHandler trac.web.modpython_frontend:   File "/usr/lib64/python2.4/site-packages/trac/db/postgres_backend.py", line 40, in get_connection\n    return PostgreSQLConnection(path, user, password, host, port, params)
[Wed Nov 08 18:24:07 2006] [error] [client 10.200.2.107] PythonHandler trac.web.modpython_frontend:   File "/usr/lib64/python2.4/site-packages/trac/db/postgres_backend.py", line 110, in __init__\n    cnx = psycopg.connect(' '.join(dsn))
[Wed Nov 08 18:24:07 2006] [error] [client 10.200.2.107] PythonHandler trac.web.modpython_frontend: OperationalError: could not translate host name "db" to address: Der Name oder der Dienst ist nicht bekannt\n
[Wed Nov 08 18:24:07 2006] [error] [client 10.200.2.107] File does not exist: /var/www/localhost/htdocs/favicon.ico

Attachments (0)

Change History (1)

comment:1 by Christian Boos, 15 years ago

Milestone: 1.0
Resolution: wontfix
Status: newclosed

Was most likely an InstallationIssue.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christopher Lenz.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Christopher Lenz to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.