In this document we will list the most common issues that occur with an on premise BillRun system deployment and common operational issues. It will specify the main indication or sympthoms of a given issue and how it should be solved.
Logs directory isn’t writable :
Issue indication
/var/log/php-fpm/erros.log) a permission error to <App Directory>/logs/<Environment>/debug.log is logged.<App Directory>/logs/<Environment>/debug.log is logged/displayed.Solution
Allow write access to the billrun user and the web server user :
$ export $APP_DIR=<App Directory>
$ chown billrun:apache -R $APP_DIR/logs
$ find $APP_DIR/logs -type f -name "*.log" -exec chmod 664 {} \;
$ find $APP_DIR/logs -type d -exec chmod 775 {} \;
Invoices cannot be generated due to incorrect write permission :
Issue indication
/var/log/php-fpm/erros.log) a permission error to <App Directory>/shared/<Environment>/invoices/... is logged.Solution
Allow write access to the shared directory for billrun user and the web server user :
$ export $APP_DIR=<App Directory>
$ chown billrun:apache -R $APP_DIR/shared
$ find $APP_DIR/shared -type f -name "*.log" -exec chmod 664 {} \;
$ find $APP_DIR/shared -type d -exec chmod 775 {} \;
Temp directory is inaccessiable
Issue indication
/var/log/php-fpm/erros.log) a permission error to /tmp/<Configured Company name>/* is logged./tmp/<Configured Company name>/* is logged When running the cycle.Possible Causes
Running the billrun in command line not under the billrun user.
$ chown billrun:apache -R /tmp/<Configured Company name>
$ find /tmp/<Configured Company name> -type f -name "*.log" -exec chmod 664 {} \;
$ find /tmp/<Configured Company name> -type d -exec chmod 775 {} \;
billrun log has filled the hard drive
/etc/logrotate.d/billrun) if it does not exist create it with sudo nano /etc/logrotate.d/billrun and copy the follwing into it : <Application_Directory>/logs/*/*.log
{
size 200M
copytruncate
create 0777 billrun apache
rotate 5
missingok
notifempty
compress
dateext
}
Replace <Application_Directory> with the path location of the billrun application
Updating with git pull fails due to local changes
* Issue Indication
Run git diff in the <Application_Directory>. It will list all the local changes that might interfere with an update.
$APP_DIR/conf/"`hostname`".ini configuration file)Copy the local changes to a temporary directory
Check the local diff and save it to a patch file
$ git diff | tee ~/”`date +%Y%m%d`”.patch
reset the git changes to the branch original:
$ git reset --hard
Update the code as specified above (in "Upgrading BillRun").
Merge local changes back into the repository prod.ini version :
$ git apply -v ~/"`date +%Y%m%d`"_prod.patch
(This might fail so the merging might need to be done manually with vimdiff)
Finish the update process (updating the DB if needed)
mongo service has crashed
Issue indication
Possible Causes
Check the mongos server at /var/log/mongo/mongos.log for the possible cause of the crash.
Solution
Simply restart the mongos service (normally with sudo service mongos restart)