configuration file not found

Hello,

I am trying to set up sequenceserver using apache and passenger. But i can’t seem to get past this error:

INFO – : Found blastn at /var/blast/bin/blastn
INFO – : Found blastp at /var/blast/bin/blastp
INFO – : Found blastx at /var/blast/bin/blastx
INFO – : Found tblastn at /var/blast/bin/tblastn
INFO – : Found tblastx at /var/blast/bin/tblastx
INFO – : Found blastdbcmd at /var/blast/bin/blastdbcmd
INFO – : Found makeblastdb at /var/blast/bin/makeblastdb
INFO – : Found blast_formatter at /var/blast/bin/blast_formatter
INFO – : Configuration file not found
INFO – : Generated a dummy configuration file: /var/www/sequenceserver/.sequenceserver.conf

It seems that it does finds and reads the .sequenceserver.conf file located in /var/www/sequenceserver , (because of the found blast location)

This results in that the configuration file is being ‘reset’ and after the next refresh it says the file is empty…

Passenger Backtrace:

# File Line Location
0 /var/www/sequenceserver/lib/sequenceserver.rb 194 in `exit’
1 /var/www/sequenceserver/lib/sequenceserver.rb 194 in `rescue in init’
2 /var/www/sequenceserver/lib/sequenceserver.rb 169 in `init’
3 config.ru 6 in `block in
4 /var/lib/gems/1.9.1/gems/rack-1.4.1/lib/rack/builder.rb 51 in `instance_eval’
5 /var/lib/gems/1.9.1/gems/rack-1.4.1/lib/rack/builder.rb 51 in `initialize’
6 config.ru 1 in `new’
7 config.ru 1 in `

I’m probably overlooking something or messed up somewhere.

Hope you can help me,
Thanks in advance!

Bart.

Hi Bart,

If there is no config file already available, SS will try to create a default one in /var/www/sequenceserver (last line)
so that it can run off the bat.

Do you have write permissions in /var/www/sequenceserver?

Hi Mark,

There is a configuration file located in /var/www/sequenceserver and it is being read (it reads the location of blast i have configured in it)

It changes the file that i have configured to the default one.
And if i delete the file it creates a new one in /var/www/sequenceserver… so i don’t think it is permission issue.

Not sure what you mean with “run off the bat”

INFO -- : Found blastn at /var/blast/bin/blastn
INFO -- : Found blastp at /var/blast/bin/blastp
INFO -- : Found blastx at /var/blast/bin/blastx
INFO -- : Found tblastn at /var/blast/bin/tblastn
INFO -- : Found tblastx at /var/blast/bin/tblastx
INFO -- : Found blastdbcmd at /var/blast/bin/blastdbcmd
INFO -- : Found makeblastdb at /var/blast/bin/makeblastdb
INFO -- : Found blast_formatter at /var/blast/bin/blast_formatter
INFO -- : Configuration file not found
INFO -- : Generated a dummy configuration file:
/var/www/sequenceserver/.sequenceserver.conf

This is weird.

SS first checks for configuration file and then for blast binaries and then
for sequences. I would expect `Logger` to log errors in the order SS
requests it to. Unless scanning for databases is causing `Errno::ENOENT`
somehow, but I can't spot any snippet that would do so.

SS looks for configuration file in the home directory (same when writing
the dummy configuration file). Is your home directory /var/www? How come?

Is the path to your sequence files (databases directory) in the config file
correct? If it wasn't, SS would say so before dying. But just to be sure.

It seems that it does finds and reads the .sequenceserver.conf file
located in /var/www/sequenceserver , (because of the found blast location)

If you can run `blastp` from your shell without typing in the absolute
path, SS will find it. Being able to find BLAST binaries is inconclusive
to say SS is reading the config file or not.

This results in that the configuration file is being 'reset' and after the
next refresh it says the file is empty....

If SS can read the config file and finds it to be empty, it will say so:

WARN -- : Empty configuration file:
/var/www/sequenceserver/.sequenceserver.conf - will assume default settings

Could you make a pastie / gist out of the log file and post a link?

Passenger Backtrace:

# File Line Location0 /var/www/sequenceserver/lib/sequenceserver.rb194in `exit'
1 /var/www/sequenceserver/lib/sequenceserver.rb194 in `rescue in init'2/var/www/sequenceserver/lib/sequenceserver.rb
169 in `init'

Line 194 on version 0.8.2 points to a different kind of error, which should
have been logged. What version of SS are you using?

-- yeban

I got it working :smiley:

So the “Configuration file not found” was not really what was going on…

It seemed like SS didn’t get past the databases location… So when i changed the permissions of database directory everything worked.
(still reading in on what the right permissions are though…)

Thank you very much for your time!

To still answer your questions:

SS looks for configuration file in the home directory (same when writing the dummy configuration file). Is your home directory /var/www? How come?

/var/www is not my home directory… i added the the line in config.ru where the .sequenceserver.conf can be found.

If you can run blastp from your shell without typing in the absolute path, SS will find it. Being able to find BLAST binaries is inconclusive to say SS is reading the config file or not.

blast runs the from the shell without the absolute path… But if SS is able to find it, why doesn’t it find BLAST when the conf file is empty or only the database line is configured? (The difference between the empty and the configured file is one of the reasons i came to the conclusion SS could read it.)

WARN – : Empty configuration file: /var/www/sequenceserver/.sequenceserver.conf - will assume default settings

Could you make a pastie / gist out of the log file and post a link?

(In case your still interested)
Which log do you mean? The apache log doesn’t give much more info then i already gave.

Line 194 on version 0.8.2 points to a different kind of error, which should have been logged. What version of SS are you using?

I am using 0.8.2 (cloned it from github)

Thanks again and thank you for this great app :slight_smile:

Bart.

It seemed like SS didn't get past the databases location.. So when i changed
the permissions of database directory everything worked.
(still reading in on what the right permissions are though..)

Thanks to Mark for reminding of permissions. I should have suggested
that apart from double checking that the path to database directory in
configuration file. But I still can't explain why SS would complain
about not being able to find configuration file _after_ discovering
the binaries. Incorrect permissions should raise `Errno::EACCES` and
SS should just abort.

SS looks for configuration file in the home directory (same when writing
the dummy configuration file). Is your home directory /var/www? How come?

/var/www is not my home directory.. i added the the line in config.ru where
the .sequenceserver.conf can be found.

Ah, right. SS actually writes the dummy config file to the path name
pointed to by 'config_file' variable. My bad.

If you can run `blastp` from your shell without typing in the absolute
path, SS will find it. Being able to find BLAST binaries is inconclusive to
say SS is reading the config file or not.

blast runs the from the shell without the absolute path... But if SS is able
to find it, why doesn't it find BLAST when the conf file is empty or only
the database line is configured? (The difference between the empty and the
configured file is one of the reasons i came to the conclusion SS could read
it.)

It does. On the first run, it generates a dummy config file and
exits. If you run SS again without editing the config file, it will
detect BLAST (if it's in PATH) and even give you fire ant sequences to
play around with. Not sure what's tripping SS on your setup.

WARN -- : Empty configuration file:
/var/www/sequenceserver/.sequenceserver.conf - will assume default settings

Could you make a pastie / gist out of the log file and post a link?

(In case your still interested)
Which log do you mean? The apache log doesn't give much more info then i
already gave.

Yeah, I was referring to Apache log. You hand picked those lines from
there, right?

Line 194 on version 0.8.2 points to a different kind of error, which
should have been logged. What version of SS are you using?

I am using 0.8.2 (cloned it from github)

Woah! This is a mess. Ok, please send me the Apache log file (gist / pastie).

Thanks again and thank you for this great app :slight_smile:

I am glad you like it :).

-- yeban

I wonder, is it possible that the config file was not ever found, and that
the paths to the blast executables are in the default path somehow? Finding
blast is the only evidence that the config file was read, right?

Either way, I reckon seqserv should probably
1) say when it detect a config file explicitly
2) check for read permissions on the db directory and all the relevant
files within

Thanks,
ben

To yeban:

You are right it is my mess :stuck_out_tongue:

Since SS is running and being used i created a new instance of SS (cloned from git) to recreate the error.

My database location was in my home folder (so a different user than www-data) and i can’t remember the permission settings i had when it gave me the error. But chmod 700 gives the same error with the ‘test’ SS.

When i saw the passenger backtrace and it pointed to line 204 instead of 194 (the one you pointed out).
I believe the first time i copied it from the created gem or something. So this is probably my mess…

The Apache log (error.log) of the request that gives the error:
(This is everything in the log (i created a new one))

[Wed Dec 19 16:01:09 2012] [notice] Apache/2.2.22 (Ubuntu) Phusion_Passenger/3.0.18 configured – resuming normal operations
I, [2012-12-19T16:01:11.875395 #29098] INFO – : Found blastn at /var/blast/bin/blastn
I, [2012-12-19T16:01:11.875637 #29098] INFO – : Found blastp at /var/blast/bin/blastp
I, [2012-12-19T16:01:11.875711 #29098] INFO – : Found blastx at /var/blast/bin/blastx
I, [2012-12-19T16:01:11.875784 #29098] INFO – : Found tblastn at /var/blast/bin/tblastn
I, [2012-12-19T16:01:11.875859 #29098] INFO – : Found tblastx at /var/blast/bin/tblastx
I, [2012-12-19T16:01:11.875930 #29098] INFO – : Found blastdbcmd at /var/blast/bin/blastdbcmd
I, [2012-12-19T16:01:11.876007 #29098] INFO – : Found makeblastdb at /var/blast/bin/makeblastdb
I, [2012-12-19T16:01:11.876080 #29098] INFO – : Found blast_formatter at /var/blast/bin/blast_formatter
I, [2012-12-19T16:01:11.895310 #29098] INFO – : Configuration file not found
I, [2012-12-19T16:01:11.895930 #29098] INFO – : Generated a dummy configuration file: /var/www/testSS/.sequenceserver.conf
[Wed Dec 19 16:01:12 2012] [error] [client 62.207.52.230] File does not exist: /var/www/favicon.ico

That’s it… ?? Is there a different passenger log because the passenger info is not in there?

To Ben:
When i edit the lines in the configuration file to a non existing folder is will give the right response:
Fail: Could not find ‘/bla’ defined in config.yml.

I hope this will give you a better understanding on what is going on.

Bart.

Hi Bart,

Thank you very much for all your efforts debugging this one and reporting back to the mailing list - very helpful for all involved.

ben