How to quickly find error messages within icinga-web
I frequently recieved “The server encountered an error: Internal Exception, check your logs!” while rolling out icinga-web and the various cronks.
I located the testing wiki page which details a lot of information about checking logs, etc.
Some valuable logs are:
Sometimes, simply checking the httpd logs revealed errors. However, I just loaded the EventDB cronk, and saw no errors logged in any log files.
So I began to dive deeper into the testing wiki page and came across the problem.
1) Receive annoying non descript pop up with “The server encountered an error: Internal Exception, check your logs!”
2) Look at the java script console (ctrl-shift-j in chrome).
I see an error logged “POST https://SERVER/icinga-web/modules/eventdb/events 500 (Internal Server Error)”
3) Clicking on the URL will bring upo the Network tab. While on the Network tab, click on the Name/Path (file) that is causing the error.
This should reveal the exception that is the response sent by the server, in my case:
“A critical exception occured!
Uncaught Doctrine_Connection_Exception thrown:
PDO Connection Error: SQLSTATE  Access denied for user ‘eventdb’@’localhost’ to database ‘eventdb'”
So, I went into the agavi config file used by the eventdb cronk (/usr/local/icinga-web/app/modules/EventDB/config/databases.xml) and verified the credentials.
It turned out to be a problem with my GRANT statement where the case of the database was incorrect.