Tuesday 20 September 2011

problems with databases

Our xpapers server got rebooted accidentally at somepoint over the last few days and now visiting the site just returns an error page saying the server can't be contacted. Further investigation into the apache logs reveals the following error:

[Tue Sep 20 19:02:10 2011] [warn] FastCGI: (dynamic) server "/home/xpapers/cgi/handler.fcgi" restarted (pid 15951)
DBD::mysql::st execute failed: Unknown column 'historicalFacetOf' in 'field list' at /usr/lib/perl5/site_perl/5.12.3/Rose/DB/Object.pm line 422.
load() - DBD::mysql::st execute failed: Unknown column 'historicalFacetOf' in 'field list' at /usr/lib/perl5/site_perl/5.12.3/Rose/DB/Object.pm line 422.
at /home/xpapers/lib/xPapers/Conf/Forums.pm line 10
Compilation failed in require at /home/xpapers/cgi/handler.fcgi line 47.
BEGIN failed--compilation aborted at /home/xpapers/cgi/handler.fcgi line 47.

It seems that 'historicalFacetOf' is a database field in the Cats table referenced by lib/xPapers/Cat.pm. I tried commenting out line 45 of this file which makes the reference and then got further errors about facetRoot, historicalLeaf, summary, keyWorks, introductions, summaryUpdated, summaryChecked and advertiseChecked. After commenting all of those out the error goes away when running /home/xpapers/lib/xPapers/Conf/Forums.pm from the command line, but i'm still getting errors on the website so something else is still broken. The fact that it worked last week makes me think that this is not the root cause of this problem and is just suppressing the symptoms of something else. Unfortunately xpapers is a rather large piece of code and I've only just started working on it and don't really understand how it works yet.

1 comment:

  1. I haven't checked, but I suspect that the doc fails to say that the perl code on github and the database schema loaded by the setup scripts aren't in sync - you also need to do

    perl bin/setup/apply-sql-patches.pl 1.0 1.1

    to bring your database up to speed with the github code. You may then have to reverse some changes to the perl code.

    ReplyDelete