|
View:
New views
1 Messages
—
Rating Filter:
Alert me
|
|
|
Can't connect error for using Chado with GBrowse 1.69We are having trouble getting GBrowse 1.69 on one host to talk to Chado/Postgres on another host.
I should say in advance that loading data is no problem. I believe we have some sort of Chado / Pg / Perl / GBrowse adaptor problem. Our conf file looks like the following: description = test implementation of chado CHADO TEST db_adaptor = Bio::DB::Das::Chado db_args = -dsn dbi:Pg:dbname=gmod;host=newpgsql.cl.med.harvard.edu -adaptor dbi::pg -user rmf1 -pass XXXXX #-srcfeatureslice 1 -organism yeast #-version 1 #-inferCDS 1, The typical error we get is: trombone [Wed Sep 16 16:34:42 2009] [error] [client 128.128.160.98] Can't connect to data source , no database driver specified and DBI_DSN env var not set at /usr/local/share/perl/5.8.8/Bio/DB/Das/Chado.pm line 134 trombone [Wed Sep 16 16:34:44 2009] [error] [client 128.128.160.98] File does not exist: /www/acornworm.med.harvard.edu/docroot/favicon.ico, referer: https://acornworm.med.harvard.edu/gbrowse/cgi-bin/gbrowse/gmod/ trombone [Wed Sep 16 16:36:45 2009] [error] [client 128.128.160.98] Can't connect to data source , no database driver specified and DBI_DSN env var not set at /usr/local/share/perl/5.8.8/Bio/DB/Das/Chado.pm line 134 It seems odd to receive the 'no database driver specified' error. I've tried single quotes and double quotes around the -dsn line: -dsn 'dbi:Pg:dbname=gmod;host=newpgsql.cl.med.harvard.edu' or "-dsn dbi:Pg:dbname=gmod;host=newpgsql.cl.med.harvard.edu" but neither seem to work: trombone [Wed Sep 16 17:29:14 2009] [error] [client 128.128.160.98] String found where operator expected at (eval 142) line 1, near "dsn 'dbi:Pg:dbname=gmod;host=newpgsql.cl.med.harvard.edu'" Question 1: Has anyone been able to do this successfully? What is the correct syntax?? I've tried searching through the mailing list on the Can't connect to data source problem, but haven't found a solution. I've also looked for guidance from the 07.Chado.conf file, Readme_Chado.pod, ORACLE_AND_POSTGRESQL.pod, DBD-Pg-2.15.1/Pg.pm, and Bio-DB-Das-Chado-0.23/lib/Bio/DB/Das/Chado.pm, but haven't found a syntax that works. HELP! Question 2: Do we have to set DBI_DSN as stated in the error message? I don't seem to recall this from our GMOD summer school. What about the other Pg environment variables (PG_***)? Question 3: So that we don't hardcode host, dbname, user, and pass in our conf file, we are trying to use credentials passed to Apache. Can we include environment variable as a part of the dsn line that are interpreted by GBrowse?? For example: dbi:Pg:dbname=".$ENV{'ACORNWORM_PGSQL_DB'}.";host=".$ENV{'ACORNWORM_PGSQL_SERVER'}.";user=".$ENV{'ACORNWORM_PGSQL_USER'}.";password=".$ENV{'ACORNWORM_PGSQL_PASSWORD'} (*Background on the configuration: Using Database Credentials with Orchestra Web Hosting Service Your web files must be readable by the web server in order for it to serve them, which people typically accomplish by making the files world-readable. However, to protect the security of your database (since other Orchestra users can read files you make world-readable), you may not place your database (Oracle, MySQL, DB2) passwords in cleartext in world-readable files. To facilitate this, we set up a file in which the authentication credentials for your Oracle, MySQL, or DB2 web user are placed, only readable by your group, which sets some Apache server variables. (Since the server loads its configuration as root, the superuser, before switching to the user it usually runs as www-data, it's able to read this information.) If your virtual host is named example.med.harvard.edu, this file is located at /opt/apache/conf/auth/example.med.harvard.edu Instead of hard-coding the explicit database usernames and passwords in your scripts (which would make them readable by anyone with access to Orchestra), you should use the server variables set in that file. In the case of example.med.harvard.edu, MySQL credentials would be supplied in the following variables: • EXAMPLE_MYSQL_SERVER (the database server name) • EXAMPLE_MYSQL_DB (the database name) • EXAMPLE_MYSQL_USER (the username to connect to the database) • EXAMPLE_MYSQL_PASSWORD (the password to connect to the database) Your variables will be named differently depending on your virtual host's name and the database system you're using. You should be able to infer them from your virtual host's name and the database system you're using -- but you can also list them by looking at the file listed above. Here's how to use the variables from various languages. In these examples, we'll use the example variable EXAMPLE_MYSQL_USER. Remember that your variables will be named differently depending on your virtual host and database system. Perl (externally executed CGI scripts) Server variables are placed in the $ENV hash, so use $ENV{'EXAMPLE_MYSQL_USER'}. *) (Our version of Chado.pm appears to be: ( # $Id: Chado.pm,v 1.8 2009/06/04 15:58:09 scottcain Exp $ ) Thoughts or ideas would be greatly appreciated! Bob ----------------------------------------------------- Bob Freeman, Ph.D. Acorn Worm Informatics, Kirschner lab Dept of Systems Biology, Alpert 524 Harvard Medical School 200 Longwood Avenue Boston, MA 02115 617/432.2293, vox When choosing between two evils I always take the one I've never tried before. -- Mae West, Klondike Annie ------------------------------------------------------------------------------ Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf _______________________________________________ Gmod-gbrowse mailing list Gmod-gbrowse@... https://lists.sourceforge.net/lists/listinfo/gmod-gbrowse |
| Free embeddable forum powered by Nabble | Forum Help |