Hi Seyd,
Thanks again for your quick reply.
I don't know about two different installations of Apache, this was a
pre-installed (virtual) server, with Apache and Perl set up
professionally according to the hosting company's standard practices.
The only things I have installed are biomart-perl, the pre-requisite
perl modules, and apxs.
mod-perl: I can see the Apache directive:
LoadModule perl_module modules/mod_perl.so
in the file perl.conf, (which is included in httpd.conf), and I understand this to mean load 'mod_perl.so' from the 'modules' subdirectories of the Apache ServerRoot, which is '/etc/httpd'.
As I found the file mod_perl.so in the directory /etc/httpd/modules, and there were no error messages messages relating to mod_perl in the Apache error log, I suppose I do have mod_perl installed.
Do you agree with my interpretation? If so, I guess there must be some other cause for the problem that I see with martview than the lack of mod_perl.
--------------
I then wondered why configureBioMart.pl did not indicate that mod_perl was installed - I found the option apxs -q LIBEXECDIR in the apxs documentation on the Apache site, but I couldn't find on this site any explanation of why this should give the location of Apache modules, hence my question. The only way I am aware of for locating Apache modules is to look at the LoadModule and ServerRoot directives in httpd.conf. Anyway, I leave this to you.
Regards,
Roger.
Syed Haider wrote:
Hi Roger
apxs or apxs2, both should work fine. apxs/2 -q LIBEXECDIR gives you the
path to modules directory of the apache with which this apxs/2 is
associated. Pardon my knowledge, if you want to investigate if this is
the best way to discover this, please consult apxs/2 documentation or
apache web server docs. You have two different locations for apache
modules and they have several modules in common, which suggests that you
have two different installations of apache. The apxs under discussion
/usr/sbin/apxs -q LIBEXECDIR
/usr/local/psa/admin/libexec
gives you the path to modules directory with which this apxs/2 is
associated through respective apache.
hope this explains the behaviour of apxs/2.
regards
syed
On Tue, 2008-01-29 at 19:44 +0000, Roger Hull wrote:
Hi Syed,
mod_perl does seem to be installed: perl.conf (in
httpdconf_extra.tar.gz that I sent you) is included by the main
httpd.conf as noted below:
Include conf.d/*.conf
You can see the loadmodule directive for mod_perl in perl.conf:
LoadModule perl_module modules/mod_perl.so
I think that configureBioMart.pl does not find mod_perl because the
directory returned by
/usr/sbin/apxs -q LIBEXECDIR is
/usr/local/psa/admin/libexec
which does contain so modules:
ls /usr/local/psa/admin/libexec
httpd.exp mod_alias.so mod_autoindex.so mod_digest.so
mod_headers.so mod_log_config.so mod_negotiation.so mod_status.so
mod_vhost_alias.so
libproxy.so mod_asis.so mod_cern_meta.so mod_dir.so
mod_imap.so mod_log_forensic.so mod_rewrite.so
mod_unique_id.so
mod_access.so mod_auth.so mod_cgi.so mod_env.so
mod_include.so mod_mime.so mod_setenvif.so
mod_userdir.so
mod_actions.so mod_auth_anon.so mod_define.so mod_expires.so
mod_info.so mod_mime_magic.so mod_speling.so
mod_usertrack.so
but not mode_perl, whereas mod_perl is in this directory:
ls /etc/httpd/modules
libphp5.so mod_authn_dbm.so mod_authz_user.so
mod_deflate.so mod_headers.so mod_mem_cache.so
mod_proxy_ftp.so mod_unique_id.so
mod_actions.so mod_authn_default.so mod_autoindex.so
mod_dir.so mod_ident.so mod_mime.so
mod_proxy_http.so mod_userdir.so
mod_alias.so mod_authn_file.so mod_cache.so
mod_disk_cache.so mod_imagemap.so mod_mime_magic.so
mod_python.so mod_usertrack.so
mod_asis.so mod_authnz_ldap.so mod_cern_meta.so
mod_dumpio.so mod_include.so mod_negotiation.so
mod_rewrite.so mod_version.so
mod_auth_basic.so mod_authz_dbm.so mod_cgi.so
mod_env.so mod_info.so mod_perl.so
mod_setenvif.so mod_vhost_alias.so
mod_auth_digest.so mod_authz_default.so mod_cgid.so
mod_expires.so mod_ldap.so mod_proxy.so
mod_speling.so
mod_authn_alias.so mod_authz_groupfile.so mod_dav.so
mod_ext_filter.so mod_log_config.so mod_proxy_ajp.so
mod_ssl.so
mod_authn_anon.so mod_authz_host.so mod_dav_fs.so
mod_file_cache.so mod_log_forensic.so mod_proxy_balancer.so
mod_status.so
mod_authn_dbd.so mod_authz_owner.so mod_dbd.so
mod_filter.so mod_logio.so mod_proxy_connect.so
mod_suexec.so
and this is the modules directory under ServerRoot, which is where
Apache looks for modules loaded with a relative path.
ServerRoot "/etc/httpd"
I have apxs, not apxs2, but this is what Apache 2.2 refers to - see
http://httpd.apache.org/docs/2.2/programs/apxs.html
but where in the Apache documentation does it say that LIBEXECDIR is
where to find the modules to be loaded?
Regards,
Roger.
Syed Haider wrote:
Hi Roger,
Before we further this, you do not have mod_perl. Get mod_perl.so for
your apache. Once done, you will witness its presence right after the
following onscreen message when you run configure script.
Got usable Apache in /usr/sbin/httpd, probing for version & ModPerl
configuration
In addition, the corresponding 'LoadModule' statement will be added to
httpd.conf which BioMart generates. BioMart does not work with out
mod_perl.
let me know if it resolves your problem.
cheers
syed
On Tue, 2008-01-29 at 15:10 +0000, Roger Hull wrote:
Hi Syed,
My comments below your questions. I will send the files you request
directly to you,
Regards,
Roger.
Syed Haider wrote:
Hi Roger
as far as specific version of PERL modules is concerned, they should all
work except Time::HiRes if thats not already in your perl. Avoid using
the latest one.
after cvs co biomart-perl
do you run perl bin/configure.pl ... from biomart-perl directory ?
Of course, as instructed in 'BioMart 0.6 Documentation'. I copy/paste
the line from the manual, changing only the name of the registry
file.
send me the onscreen response when you run this script.
Sent separately.
please send me your conf/settings.conf, conf/httpd.conf,
cgi-bin/martview
Sent separately.
whats the command you use to run apache server, and which directory do
you run it from?
I normally start Apache from Plesk (server management utility), but I
get the same effect loading the martview page if I start it like this
in /home/biomart-perl:
/usr/sbin/httpd -d /etc/httpd/conf
-f /etc/httpd/conf/httpd.conf
[Tue Jan 29 14:25:56 2008] [warn] Useless use of AllowOverride
in line 592.
[Tue Jan 29 14:25:56 2008] [warn] Useless use of AllowOverride
in line 610.
[Tue Jan 29 14:25:56 2008] [warn] Useless use of AllowOverride
in line 620.
[Tue Jan 29 14:25:56 2008] [warn] Useless use of AllowOverride
in line 630.
[Tue Jan 29 14:25:56 2008] [warn] Useless use of AllowOverride
in line 640.
In the above httpd.conf, the following lines are to be found, which
includes the files in the conf.d directory in alphabetical order. I
have also sent those to you along with the httpd.conf used to start
Apache.
# Load config files from the config directory
"/etc/httpd/conf.d".
#
Include conf.d/*.conf
thanks
syed
On Mon, 2008-01-28 at 23:27 +0000, Roger Hull wrote:
Hi Syed,
Thanks for the quick response. I still have some comments/questions
about the Apache configuration, but I'll raise those in another thread
(as that doesn't seem to be causing me a problem).
could you first try neat and independent installation of BioMart.
I should have said, I already did this after I found problems. I
created a new empty directory and reinstalled everything from scratch
- same results.
Also please run the configure script i-e
(biomart-perl$ perl bin/configure.pl -r conf/reg.xml --clean ), then kill/restart your server.
And I did this a number of times!
Should this .cached file exist in the conf directory?
no, it should reside under conf/cachedRegistries/
So there is a problem here, Web.pm is looking for it in the conf
directory, as I said below. But why? (My hack to copy the .cached file
into conf/ was only to try to get to the next step, I would like to go
back and get this working without hacks.)
As you see TAG_path's value is missing and you are already familiar
with the code, you can manually stitch it in main.tt and see if
everything works fine.
I'm not so familiar with the code, I just looked to see the immediate
cause of the problem. But I don't think hacking main.tt would get me
far, this problem seems to be more far reaching.
Also, this test installation will be a guide for a future real
installation, so I would like to get to the bottom of these problems.
Is there any further information I could send you - for example, would
it help to run this with log4perl logging set to debug?
Are there any perl modules for which it is critical to install the
exact version, rather than the latest version - and might be relevant
to such issues (I guess not, or someone else would have hit the same
problem).
By the way, the '#!perl -w' vs '#!/usr/bin/perl -w' shebangs caused me
some head scratching at first, martview just gave a blank browser
window, with no clue in the Apache log. It was only when I installed a
test perl script, which worked, that I realised that the shebang was
the cause of this.
Regards,
Roger
Syed Haider wrote:
Hi Roger,
On Mon, 2008-01-28 at 18:48 +0000, Roger Hull wrote:
Hi,
I have been trying to install biomart to run martview and martservice,
using an external biomart as the data source. The purpose is to test
out customising the biomart web interface. I hit two problems as
described below. I'll try to give full details of what I did.
uname -a gives Linux <hostname> 2.6.9-023stab046.2-enterprise #1 SMP
Mon Dec 10 15:22:33 MSK 2007 i686 i686 i386 GNU/Linux.
perl -v gives This is perl, v5.8.8 built for i386-linux-thread-multi
I loaded the latest versions of the perl modules required by biomart
from CPAN.
After installing biomart-perl, I changed conf/settings.conf to:
[httpdSettings]
apacheBinary=/usr/sbin/httpd
serverHost=localHost
port=80
# to use proxying set the proxy port below (even if its 80)
and set serverHost as your proxy host
proxy=
location=biomart
I also changed !#perl -w to !#/usr/bin/perl -w in any scripts that I
found the former.
I ran perl bin/configure.pl -r conf/registryDBPointer.xml, using the
central registry xml file as installed, and it seemed to be
successful, ending with "Building templates for visible datasets..."
Problem 1: Apache (Apache/2.2.2) does not like the generated
htttp.conf - httpd reports:
Syntax error on line 14 of /home/biomart/biomart-perl/conf/httpd.conf:
Invalid command 'DirectoryIndex', perhaps misspelled or defined by a
module not included in the server configuration
this means apache module mod_dir.so is missing from apache modules
directory, add it and this message will vanish away.
The httpd.conf generated looks OK - it starts:
PidFile logs/httpd.pid
Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15
MinSpareServers 2
MaxSpareServers 2
StartServers 2
MaxClients 50
MaxRequestsPerChild 0
Listen 80
DirectoryIndex index.html
Anyway, I took the lines from the generated httpd.conf and amalgamated
them into the previous (working) httpd.conf. Now the server starts up
and I can see, for example, http://<my server>/index.html as the
introductory biomart page.
I also added a small perl test script in cgi-bin, and this ran OK from
my browser.
(In my opinion this method of giving a completely new httpd.conf is
anyway not very convenient if someone wants to run other services than
martview on their server).
It is possible to merge our directives into other httpd.conf files, but
i guess adding it automatically to an existing file is'nt safe. We
provide a simple/basic httpd.conf which is expected to work anywhere.
Problem 2: When I loaded the page http://<my server>/biomart/martview
from a browser, I got
ERROR: caught BioMart::Exception: non-BioMart die(): Can't call method
"settingsParams" on an undefined value
at /home/biomart/biomart-perl/lib/BioMart/Web.pm line 118.
line 118: my $mart_registry = $self->get_mart_registry();
and get_mart_registry: return $self->get('mart_registry');
and 'mart_registry' doesn't seem to be in the hash, so we get null.
This seems to be caused by Web.pm looking for
conf/registryDBPointer.xml.cached, which does not exist. Web.pm
doesn't seem to handle properly the case that the file doesn't exist,
only the case that it fails to deserialise correctly.
(By the way, in cgi-bin/martview, I have $CONF_FILE =
'/home/biomart/biomart-perl/conf/registryDBPointer.xml';)
Should this .cached file exist in the conf directory?
no, it should reside under conf/cachedRegistries/
Just to move things forward, I tried copying
registryDBPointer.xml.cached from conf/cachedRegistries/ (where there
was such a file) to conf/. Now http://<my
server>/biomart/martviewgives a page that looks like it's trying to be
martview! But just some plain text, like "New Count Results". Looking
at the page source I can see why: I have things like
<link rel="stylesheet" type="text/css" href="" />
<script src="" type="text/_javascript_" ></script>
where the 'location', biomart, is missing from between the double forward slashes. Looks like the TAG_path tag did not get filled in the Template main.tt for some reason.
could you first try neat and independent installation of BioMart. This
would identify platform conflicts if there are any. As you see
TAG_path's value is missing and you are already familiar with the code,
you can manually stitch it in main.tt and see if everything works fine.
Also please run the configure script i-e
(biomart-perl$ perl bin/configure.pl -r conf/reg.xml --clean )
each time you edit settings.conf or stylesheets, and then kill/restart
your server.
regards
syed
Your help would be appreciated,
Roger.
|