Hey Eric,

It looks like you have connection info for both tcp/ip connections and unix sockets in the connection strings.  If you're logging in using "psql -h wigserv5.cshl.edu <snip>", then you only want the tcp/ip connection info.  Drop the ?host=tmp off the third option you listed and I think you'll be up and running, so:

postgresql://glxeric:XXXXX@wigserv5.cshl.edu:5432/glxeric

-Dannon


On Sat, May 24, 2014 at 1:49 AM, Paniagua, Eric <epaniagu@cshl.edu> wrote:
Dear Galaxy Developers,

I've been banging my head against this one for a few days now.

I have two Galaxy instances.  One resides on a server called "genomics", which also hosts the corresponding PostgreSQL installation.  The second also resides on "genomics", but its database is hosted on "wigserv5".

Based on the tests I just ran and code I just read, sqlalchemy (not Galaxy) is ignoring the hostname/port part of the database_connection string.  For reference, the connection strings I've tried are:

postgresql://glxeric:XXXXX@/glxeric?host=/tmp
postgresql://glxeric:XXXXX@wigserv5.cshl.edu/glxeric?host=/tmp
postgresql://glxeric:XXXXX@wigserv5.cshl.edu:5432/glxeric?host=/tmp
postgresql://glxeric:XXXXX@adgdgdfdflkhjfdhfkl/glxeric?host=/tmp

All of these appear to result in Galaxy connecting to the PostgreSQL installation on genomics, as determined by Galaxy schema version discrepancies and other constraints.  With each connection string, Galaxy starts up normally.  I force database activity by browsing saved histories.  It works every time.  By all appearances, the second Galaxy instance is using the PostgreSQL database hosted on "genomics", not on "wigserv5".

All databases and roles exist, and the databases are populated.

When I comment out the "database_connection" line in universe_wsgi.ini, I get errors arising from the later configuration of PostgreSQL-specific Galaxy options, as expected.

I can connect to the database server on "wigserv5" using "psql -h wigserv5.cshl.edu -d glxeric -U glxeric" from the server "genomics".

Have you ever observed this behavior from Galaxy or sqlalchemy?

Thanks,
Eric

___________________________________________________________
Please keep all replies on the list by using "reply all"
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:
  http://lists.bx.psu.edu/

To search Galaxy mailing lists use the unified search at:
  http://galaxyproject.org/search/mailinglists/