[Bug 9941] New: Web installer should not die with stacktrace when database does not exist
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9941 Bug ID: 9941 Summary: Web installer should not die with stacktrace when database does not exist Classification: Unclassified Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: Installation and upgrade (web-based installer) Assignee: koha-bugs@lists.koha-community.org Reporter: jcamins@cpbibliography.com CC: gmcharlt@gmail.com When running under Plack with $ENV{DEBUG} set, the installer dies with a stacktrace when checking if the database exists, rather than simply reporting it does not exist. This is not good. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9941 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|major |blocker -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9941 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9941 --- Comment #1 from Jared Camins-Esakov <jcamins@cpbibliography.com> --- Created attachment 17041 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=17041&action=edit Bug 9941: Web installer should give error message when db connection fails To test: 1) Point Koha at a database that does not exist in koha-conf.xml. 2) Start up web installer. 3) Watch web installer crash and burn. 4) Apply patch. 5) Start up web installer. 6) Watch the web installer tell you it failed to connect without any sort of horrible error message. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9941 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |chris@bigballofwax.co.nz -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9941 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9941 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #17041|0 |1 is obsolete| | --- Comment #2 from Chris Cormack <chris@bigballofwax.co.nz> --- Created attachment 17070 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=17070&action=edit Bug 9941: Web installer should give error message when db connection fails To test: 1) Point Koha at a database that does not exist in koha-conf.xml. 2) Start up web installer. 3) Watch web installer crash and burn. 4) Apply patch. 5) Start up web installer. 6) Watch the web installer tell you it failed to connect without any sort of horrible error message. Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9941 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA CC| |katrin.fischer@bsz-bw.de --- Comment #3 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I can't get this to work for me, maybe I am missing something: - Changed the database name in my koha-conf.xml file to a non existing one. - Tried to access http://localhost:8080/cgi-bin/koha/installer/install.pl and got a perl error message. - Reinstated correct database name and page can be accessed correctly. I am not running Plack. Switching to "Failed QA" for now, waiting for fix/ideas/instructions. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9941 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9941 --- Comment #4 from Chris Cormack <chris@bigballofwax.co.nz> --- Created attachment 17228 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=17228&action=edit Bug 9941: Follow up to make the error message print nicely -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9941 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #17070|0 |1 is obsolete| | Attachment #17228|0 |1 is obsolete| | --- Comment #5 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 17380 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=17380&action=edit Bug 9941: Web installer should give error message when db connection fails To test: 1) Point Koha at a database that does not exist in koha-conf.xml. 2) Start up web installer. 3) Watch web installer crash and burn. 4) Apply patch. 5) Start up web installer. 6) Watch the web installer tell you it failed to connect without any sort of horrible error message. Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9941 --- Comment #6 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 17381 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=17381&action=edit Bug 9941: Follow up to make the error message print nicely Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9941 Kyle M Hall <kyle.m.hall@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |kyle.m.hall@gmail.com -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9941 --- Comment #7 from Kyle M Hall <kyle.m.hall@gmail.com> --- One question. I normally access the web installer by just browsing to the root of the Koha intranet site. If I do that I get the following error: Software error: Unknown database 'koha3' at /home/koha/kohaclone/C4/Context.pm line 803. BEGIN failed--compilation aborted at /home/koha/kohaclone/C4/Auth.pm line 63. Compilation failed in require at /home/koha/kohaclone/mainpage.pl line 25. BEGIN failed--compilation aborted at /home/koha/kohaclone/mainpage.pl line 25. For help, please send mail to the webmaster (webmaster@kohadev), giving this error message and the time and date of the error. Is it possible to display the same "Unable to connect to database. Please check your database configuration in koha-conf.xml" message for this case? -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9941 --- Comment #8 from Chris Cormack <chris@bigballofwax.co.nz> --- (In reply to comment #7)
One question. I normally access the web installer by just browsing to the root of the Koha intranet site. If I do that I get the following error:
Software error:
Unknown database 'koha3' at /home/koha/kohaclone/C4/Context.pm line 803. BEGIN failed--compilation aborted at /home/koha/kohaclone/C4/Auth.pm line 63. Compilation failed in require at /home/koha/kohaclone/mainpage.pl line 25. BEGIN failed--compilation aborted at /home/koha/kohaclone/mainpage.pl line 25. For help, please send mail to the webmaster (webmaster@kohadev), giving this error message and the time and date of the error.
Is it possible to display the same "Unable to connect to database. Please check your database configuration in koha-conf.xml" message for this case?
It is, but that isn't the webinstaller throughing that error :) So that might be better on it's bug. Something like make C4::Context handle dbh errors more nicely -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9941 --- Comment #9 from Chris Cormack <chris@bigballofwax.co.nz> --- (In reply to comment #8)
It is, but that isn't the webinstaller throughing that error :) So that might be better on it's bug.
Throughing??? I meant throwing :) -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9941 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@biblibre.co | |m --- Comment #10 from Jonathan Druart <jonathan.druart@biblibre.com> --- Jared, could you confirm this patch is for Plack? The error message appears without Plack and patches work as expected. But under Plack, I got a ugly 'An Error Occurred 500 Internal Server Error', without anything in the log files. Same behavior with and without patches. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9941 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |In Discussion CC| |mtj@kohaaloha.com --- Comment #11 from Mason James <mtj@kohaaloha.com> --- (In reply to comment #10)
Jared, could you confirm this patch is for Plack?
The error message appears without Plack and patches work as expected.
But under Plack, I got a ugly 'An Error Occurred 500 Internal Server Error', without anything in the log files. Same behavior with and without patches.
hmm, the patch fails for me using plack, too Jared, shall we hold back for a patch that works with plack too? -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9941 --- Comment #12 from Jared Camins-Esakov <jcamins@cpbibliography.com> --- Since this is a Plack-only patch, yes, we should wait until someone contributes one that works for Plack. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9941 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Web installer should not |with Plack, Web installer |die with stacktrace when |should not die with |database does not exist |stacktrace when database | |does not exist -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9941 Robin Sheat <robin@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |robin@catalyst.net.nz Assignee|koha-bugs@lists.koha-commun |robin@catalyst.net.nz |ity.org | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9941 --- Comment #13 from Robin Sheat <robin@catalyst.net.nz> --- I did some experimenting with this, and it seems pretty difficult, given that we do so much in BEGIN and I don't see a nice way we can return a meaningful exception from it. If we die() we get a stacktrace. The long-term best way is to move things more toward lazy initialisation, but in most cases that ship has long sailed. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9941 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|blocker |normal --- Comment #14 from Galen Charlton <gmcharlt@gmail.com> --- Setting severity to normal - this is not a release blocker. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org