Hello! I am getting the error below.... We can get into MYSQL from the command line. The Koha database and tables are viewable through MYSQL. I am getting this error on both the OPAC and the server. The file Koha.conf is world readable, owned by root, and has a group of www-data. Software error: Access denied for user 'www-data'@'localhost' (using password: NO) at /usr/share/koha/lib/C4/Context.pm line 758. Compilation failed in require at /usr/share/koha/lib/C4/Auth.pm line 31. BEGIN failed--compilation aborted at /usr/share/koha/lib/C4/Auth.pm line 31. Compilation failed in require at /usr/share/koha/opac/cgi-bin/opac/opac-main.pl line 22. BEGIN failed--compilation aborted at /usr/share/koha/opac/cgi-bin/opac/opac-main.pl line 22. For help, please send mail to the webmaster (webmaster@debmaker32<mailto:webmaster@debmaker32>), giving this error message and the time and date of the error.
Software error:
Access denied for user 'www-data'@'localhost' (using password: NO) at /usr/share/koha/lib/C4/Context.pm line 758.
Are you using the apache user "www-data" to access Koha's database?
I think that is good practice to use a different database user for koha, as well a system user to own all the files. Bernardo
No, we are not using apache server and Koha was working on Friday .. it has suddenly stopped (broke over the weekend). No system changes were made. From: Bernardo Gonzalez Kriegel [mailto:bgkriegel@gmail.com] Sent: Tuesday, September 04, 2012 9:42 AM To: Hartman, David W. - GBTS Library Cc: koha@lists.katipo.co.nz Subject: Re: [Koha] My Koha is down .. Software error? Software error: Access denied for user 'www-data'@'localhost' (using password: NO) at /usr/share/koha/lib/C4/Context.pm line 758. Are you using the apache user "www-data" to access Koha's database? I think that is good practice to use a different database user for koha, as well a system user to own all the files. Bernardo
David, No, we are not using apache server and Koha was working on Friday .. it has
suddenly stopped (broke over the weekend). No system changes were made.
The error you describe is the result of the MySQL user being incorrect in the koha-conf.xml file. In this case, you have it configured to log into Koha using the MySQL user www-data. You will want to make sure the user name and password at the end of koha-conf.xml are correct, and that you have the KOHA_CONF variable set correctly for Plack (I presume you are using Plack, if you are not using Apache?) Regards, Jared -- Jared Camins-Esakov Bibliographer, C & P Bibliography Services, LLC (phone) +1 (917) 727-3445 (e-mail) jcamins@cpbibliography.com (web) http://www.cpbibliography.com/
Well, the message "Access denied for user 'www-data'@'localhost' (using password: NO)" clearly indicates that something is wrong with the access rights of the Koha user (in this case www-data) Please check your /etc/koha/koha-conf.xml, at the bottom is declared which database, host, user and password you are using. Verify with the command line client "mysl" And normally 'www-data' is the apache user, at least on Debian/Ubuntu :) Bernardo -- Bernardo Gonzalez Kriegel bgkriegel@gmail.com On Tue, Sep 4, 2012 at 10:43 AM, Hartman, David W. - GBTS Library < David.W.Hartman@disney.com> wrote:
No, we are not using apache server and Koha was working on Friday .. it has suddenly stopped (broke over the weekend). No system changes were made. ****
** **
*From:* Bernardo Gonzalez Kriegel [mailto:bgkriegel@gmail.com] *Sent:* Tuesday, September 04, 2012 9:42 AM *To:* Hartman, David W. - GBTS Library *Cc:* koha@lists.katipo.co.nz *Subject:* Re: [Koha] My Koha is down .. Software error?****
** **
Software error:
Access denied for user 'www-data'@'localhost' (using password: NO) at /usr/share/koha/lib/C4/Context.pm line 758.****
Are you using the apache user "www-data" to access Koha's database?****
I think that is good practice to use a different database user for koha,** **
as well a system user to own all the files.****
** **
Bernardo****
** **
** **
FIXED - ☺ Looks like the xml file was corrupted .. we are backing it up and noting error for future reference. THANKS ALL! David From: Bernardo Gonzalez Kriegel [mailto:bgkriegel@gmail.com] Sent: Tuesday, September 04, 2012 9:50 AM To: Hartman, David W. - GBTS Library Cc: koha@lists.katipo.co.nz Subject: Re: [Koha] My Koha is down .. Software error? Well, the message "Access denied for user 'www-data'@'localhost' (using password: NO)" clearly indicates that something is wrong with the access rights of the Koha user (in this case www-data) Please check your /etc/koha/koha-conf.xml, at the bottom is declared which database, host, user and password you are using. Verify with the command line client "mysl" And normally 'www-data' is the apache user, at least on Debian/Ubuntu :) Bernardo -- Bernardo Gonzalez Kriegel bgkriegel@gmail.com<mailto:bgkriegel@gmail.com> On Tue, Sep 4, 2012 at 10:43 AM, Hartman, David W. - GBTS Library <David.W.Hartman@disney.com<mailto:David.W.Hartman@disney.com>> wrote: No, we are not using apache server and Koha was working on Friday .. it has suddenly stopped (broke over the weekend). No system changes were made. From: Bernardo Gonzalez Kriegel [mailto:bgkriegel@gmail.com<mailto:bgkriegel@gmail.com>] Sent: Tuesday, September 04, 2012 9:42 AM To: Hartman, David W. - GBTS Library Cc: koha@lists.katipo.co.nz<mailto:koha@lists.katipo.co.nz> Subject: Re: [Koha] My Koha is down .. Software error? Software error: Access denied for user 'www-data'@'localhost' (using password: NO) at /usr/share/koha/lib/C4/Context.pm line 758. Are you using the apache user "www-data" to access Koha's database? I think that is good practice to use a different database user for koha, as well a system user to own all the files. Bernardo
Ok, We got the OPAC running but the Koha Admin is down. We got an error 404 – must be a broken link in the xml file? Please advise.. From: Hartman, David W. - GBTS Library Sent: Tuesday, September 04, 2012 10:03 AM To: 'Bernardo Gonzalez Kriegel' Cc: koha@lists.katipo.co.nz Subject: RE: [Koha] My Koha is down .. Software error? FIXED - ☺ Looks like the xml file was corrupted .. we are backing it up and noting error for future reference. THANKS ALL! David From: Bernardo Gonzalez Kriegel [mailto:bgkriegel@gmail.com] Sent: Tuesday, September 04, 2012 9:50 AM To: Hartman, David W. - GBTS Library Cc: koha@lists.katipo.co.nz Subject: Re: [Koha] My Koha is down .. Software error? Well, the message "Access denied for user 'www-data'@'localhost' (using password: NO)" clearly indicates that something is wrong with the access rights of the Koha user (in this case www-data) Please check your /etc/koha/koha-conf.xml, at the bottom is declared which database, host, user and password you are using. Verify with the command line client "mysl" And normally 'www-data' is the apache user, at least on Debian/Ubuntu :) Bernardo -- Bernardo Gonzalez Kriegel bgkriegel@gmail.com<mailto:bgkriegel@gmail.com> On Tue, Sep 4, 2012 at 10:43 AM, Hartman, David W. - GBTS Library <David.W.Hartman@disney.com<mailto:David.W.Hartman@disney.com>> wrote: No, we are not using apache server and Koha was working on Friday .. it has suddenly stopped (broke over the weekend). No system changes were made. From: Bernardo Gonzalez Kriegel [mailto:bgkriegel@gmail.com<mailto:bgkriegel@gmail.com>] Sent: Tuesday, September 04, 2012 9:42 AM To: Hartman, David W. - GBTS Library Cc: koha@lists.katipo.co.nz<mailto:koha@lists.katipo.co.nz> Subject: Re: [Koha] My Koha is down .. Software error? Software error: Access denied for user 'www-data'@'localhost' (using password: NO) at /usr/share/koha/lib/C4/Context.pm line 758. Are you using the apache user "www-data" to access Koha's database? I think that is good practice to use a different database user for koha, as well a system user to own all the files. Bernardo
Ok, we can find the admin client at this URL: http://btlibrary:8080 Not sure what happened to the other URL. Thoughts? From: Hartman, David W. - GBTS Library Sent: Tuesday, September 04, 2012 10:19 AM To: Hartman, David W. - GBTS Library; Bernardo Gonzalez Kriegel Cc: koha@lists.katipo.co.nz; Weissman, Brian S. Subject: RE: [Koha] My Koha is down .. Software error? Ok, We got the OPAC running but the Koha Admin is down. We got an error 404 – must be a broken link in the xml file? Please advise.. From: Hartman, David W. - GBTS Library Sent: Tuesday, September 04, 2012 10:03 AM To: 'Bernardo Gonzalez Kriegel' Cc: koha@lists.katipo.co.nz Subject: RE: [Koha] My Koha is down .. Software error? FIXED - ☺ Looks like the xml file was corrupted .. we are backing it up and noting error for future reference. THANKS ALL! David From: Bernardo Gonzalez Kriegel [mailto:bgkriegel@gmail.com] Sent: Tuesday, September 04, 2012 9:50 AM To: Hartman, David W. - GBTS Library Cc: koha@lists.katipo.co.nz Subject: Re: [Koha] My Koha is down .. Software error? Well, the message "Access denied for user 'www-data'@'localhost' (using password: NO)" clearly indicates that something is wrong with the access rights of the Koha user (in this case www-data) Please check your /etc/koha/koha-conf.xml, at the bottom is declared which database, host, user and password you are using. Verify with the command line client "mysl" And normally 'www-data' is the apache user, at least on Debian/Ubuntu :) Bernardo -- Bernardo Gonzalez Kriegel bgkriegel@gmail.com<mailto:bgkriegel@gmail.com> On Tue, Sep 4, 2012 at 10:43 AM, Hartman, David W. - GBTS Library <David.W.Hartman@disney.com<mailto:David.W.Hartman@disney.com>> wrote: No, we are not using apache server and Koha was working on Friday .. it has suddenly stopped (broke over the weekend). No system changes were made. From: Bernardo Gonzalez Kriegel [mailto:bgkriegel@gmail.com<mailto:bgkriegel@gmail.com>] Sent: Tuesday, September 04, 2012 9:42 AM To: Hartman, David W. - GBTS Library Cc: koha@lists.katipo.co.nz<mailto:koha@lists.katipo.co.nz> Subject: Re: [Koha] My Koha is down .. Software error? Software error: Access denied for user 'www-data'@'localhost' (using password: NO) at /usr/share/koha/lib/C4/Context.pm line 758. Are you using the apache user "www-data" to access Koha's database? I think that is good practice to use a different database user for koha, as well a system user to own all the files. Bernardo
Op 04-09-12 19:34, Hartman, David W. - GBTS Library schreef:
Ok, we can find the admin client at this URL: http://btlibrary:8080
Not sure what happened to the other URL. Thoughts?
All this depends on your apache configuration, you should check to see that it's set up as you'd expect and hasn't changed/broken. -- Robin Sheat Catalyst IT Ltd. ✆ +64 4 803 2204 GPG: 5957 6D23 8B16 EFAB FEF8 7175 14D3 6485 A99C EB6D
To recap, our Koha system was working great Friday then something went wrong over the weekend. We are able to connect to the admin client at http://btlibrary:8080 We can connect to the OPAC but every search comes up blank. Patron records are correct and people can login. Does anyone have a suggestion for troubleshooting? David From: Hartman, David W. - GBTS Library Sent: Tuesday, September 04, 2012 1:34 PM To: Hartman, David W. - GBTS Library; Bernardo Gonzalez Kriegel Cc: koha@lists.katipo.co.nz Subject: RE: [Koha] My Koha is down .. Software error? Ok, we can find the admin client at this URL: http://btlibrary:8080 Not sure what happened to the other URL. Thoughts? From: Hartman, David W. - GBTS Library Sent: Tuesday, September 04, 2012 10:19 AM To: Hartman, David W. - GBTS Library; Bernardo Gonzalez Kriegel Cc: koha@lists.katipo.co.nz; Weissman, Brian S. Subject: RE: [Koha] My Koha is down .. Software error? Ok, We got the OPAC running but the Koha Admin is down. We got an error 404 – must be a broken link in the xml file? Please advise.. From: Hartman, David W. - GBTS Library Sent: Tuesday, September 04, 2012 10:03 AM To: 'Bernardo Gonzalez Kriegel' Cc: koha@lists.katipo.co.nz Subject: RE: [Koha] My Koha is down .. Software error? FIXED - ☺ Looks like the xml file was corrupted .. we are backing it up and noting error for future reference. THANKS ALL! David From: Bernardo Gonzalez Kriegel [mailto:bgkriegel@gmail.com] Sent: Tuesday, September 04, 2012 9:50 AM To: Hartman, David W. - GBTS Library Cc: koha@lists.katipo.co.nz Subject: Re: [Koha] My Koha is down .. Software error? Well, the message "Access denied for user 'www-data'@'localhost' (using password: NO)" clearly indicates that something is wrong with the access rights of the Koha user (in this case www-data) Please check your /etc/koha/koha-conf.xml, at the bottom is declared which database, host, user and password you are using. Verify with the command line client "mysl" And normally 'www-data' is the apache user, at least on Debian/Ubuntu :) Bernardo -- Bernardo Gonzalez Kriegel bgkriegel@gmail.com<mailto:bgkriegel@gmail.com> On Tue, Sep 4, 2012 at 10:43 AM, Hartman, David W. - GBTS Library <David.W.Hartman@disney.com<mailto:David.W.Hartman@disney.com>> wrote: No, we are not using apache server and Koha was working on Friday .. it has suddenly stopped (broke over the weekend). No system changes were made. From: Bernardo Gonzalez Kriegel [mailto:bgkriegel@gmail.com<mailto:bgkriegel@gmail.com>] Sent: Tuesday, September 04, 2012 9:42 AM To: Hartman, David W. - GBTS Library Cc: koha@lists.katipo.co.nz<mailto:koha@lists.katipo.co.nz> Subject: Re: [Koha] My Koha is down .. Software error? Software error: Access denied for user 'www-data'@'localhost' (using password: NO) at /usr/share/koha/lib/C4/Context.pm line 758. Are you using the apache user "www-data" to access Koha's database? I think that is good practice to use a different database user for koha, as well a system user to own all the files. Bernardo
On Wed, Sep 5, 2012 at 1:36 PM, Hartman, David W. - GBTS Library < David.W.Hartman@disney.com> wrote:
To recap, our Koha system was working great Friday then something went wrong over the weekend.****
** **
We are able to connect to the admin client at http://btlibrary:8080****
** **
We can connect to the OPAC but every search comes up blank. Patron records are correct and people can login. Does anyone have a suggestion for troubleshooting?****
**
If you are using zebra, then it could be that it's down. Try starting zebra, (/usr/share/koha/bin/koha-zebra-ctl.sh start) Regards, Bernardo
Thank you Bernardo, We executed that command line and returns back to console window – not sure if it executed. Still no search results. David From: Bernardo Gonzalez Kriegel [mailto:bgkriegel@gmail.com] Sent: Wednesday, September 05, 2012 12:51 PM To: Hartman, David W. - GBTS Library Cc: koha@lists.katipo.co.nz; Weissman, Brian S. Subject: Re: Koha searches are bringing no results On Wed, Sep 5, 2012 at 1:36 PM, Hartman, David W. - GBTS Library <David.W.Hartman@disney.com<mailto:David.W.Hartman@disney.com>> wrote: To recap, our Koha system was working great Friday then something went wrong over the weekend. We are able to connect to the admin client at http://btlibrary:8080 We can connect to the OPAC but every search comes up blank. Patron records are correct and people can login. Does anyone have a suggestion for troubleshooting? If you are using zebra, then it could be that it's down. Try starting zebra, (/usr/share/koha/bin/koha-zebra-ctl.sh start) Regards, Bernardo
On Wed, Sep 5, 2012 at 2:01 PM, Hartman, David W. - GBTS Library < David.W.Hartman@disney.com> wrote:
Thank you Bernardo,****
** **
We executed that command line and returns back to console window – not sure if it executed. Still no search results.****
**
Well, there are some things you can try. 1) Do you have an index? (as user koha make /usr/share/koha/bin/migration_tools/rebuild_zebra.pl -r -a -b -v) 2) Check if zebra daemon works (ps aux | grep zebra) 3) Check if zebra reports errors (look in /var/log/koha/zebra *. err) 4) Check for correct permissions (all in /etc/koha, /usr/share/koha, /var/log/koha, /var/run/koha, /var/lock/koha must be owned by koha user) On the command indicated in the previous post: according to the installation guide you should have a link to it in /etc/init.d/, and should respond with a message "Starting Zebra server" Regards, Bernardo -- Bernardo Gonzalez Kriegel bgkriegel@gmail.com
participants (4)
-
Bernardo Gonzalez Kriegel -
Hartman, David W. - GBTS Library -
Jared Camins-Esakov -
Robin Sheat