Friday, October 3, 2014

Cronjob is executing twice / multiple times

If you have set a script in cron and it executes twice, check following things.

1) Check if there is another entry of same cronjob.

2) Check if two different users are executing the same cron.

If both solutions are not working, Try this.

3) There may be high chances if cron daemon is running twice. Check if it is true using command

ps aux | grep cron | grep -v grep

If there are two entries, kill one job or stop the cron service twice and run it again. Make sure you check again that there is only one cron daemon is running.

Alias "bootstrap.helpers.*" is invalid. Make sure it points to an existing directory or file

Alias "bootstrap.helpers.*" is invalid. Make sure it points to an existing directory or file

If you are getting this error while executing a php web application. The reason may be your php version is less than 5.3. Upgrade it equal to or greater than 5.3 and try again.

If you have PHP Version 5.2.17 or similar, you may have this error.

Wednesday, September 3, 2014

Errors were encountered while processing: mysql-server-5.5 ... E: Sub-process /usr/bin/dpkg returned an error code (1)

start: Job failed to start
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing mysql-server-5.5 (--configure):

subprocess installed post-installation script returned error exit status 1
No apport report written because MaxReports is reached already
Errors were encountered while processing:
mysql-server-5.5
E: Sub-process /usr/bin/dpkg returned an error code (1)


I know you have tried all these solutions that's why you are here but just take a look at once before watching my final solution which is going to work for you.

Solution : 1
Run command
sudo dpkg --configure -a
Solution : 2
Remove and install mysql server again, Run commands :
sudo apt-get --purge remove mysql-server
sudo apt-get install mysql-server

Solution : 3
Remove mysql-server and mysql-server-5.5 package from the file /var/lib/dpkg/status and reconfigure mysql-server
sudo dpkg --configure -a
But you have tried all these solutions and still you are facing same problem, try this Final Solution.
 
Final Solution
Run Command :
sudo apt-get install --reinstall apparmor
Now comment following line in the file /etc/mysql/my.cnf
skip-bdb
Restart mysql
sudo service mysql start
Now your mysql will be started.