Centova Technologies Forum

Centova Cast v3 => General discussion => Topic started by: Mark Carney on July 04, 2012, 12:48:59 pm

Title: Remove V2 from same server as V3 install
Post by: Mark Carney on July 04, 2012, 12:48:59 pm
May I ask what is the correct way to remove V2 off the same server as a V3 install via SSH so it does not destroy any of the V3 files or directories which might be crossed linked?

Many thanks.
Title: Re: Remove V2 from same server as V3 install
Post by: Alexiu on July 05, 2012, 10:20:46 am
You can uninstall Centova Cast as follows:

1. Edit /etc/crontab and remove its cron job which should look like:
*/5 * * * * centovacast /home/centovacast/system/runascc/runascc exec ccmanage cronjob all >/dev/null

2. Delete the /home/centovacast/ directory.
3. Delete the Centova Cast MySQL database.
4. Delete the Centova Cast files from your web root.
5. If FTP integration was configured automatically by the installer, you can remove it as follows:
   a. For ProFTPd, edit /etc/proftpd.conf (or /etc/proftpd/proftpd.conf, depending on your Linux distribution) and remove any lines containing the word "centovacast".
   b. For Pure-FTPd on CPanel servers, edit /etc/init.d/pure-ftpd, search for "centovacast-pureauth" and replace it with "pureauth".
6. If FTP integration was configured manually by yourself, you can remove it by reversing the steps you followed in the installation guide.
Title: Re: Remove V2 from same server as V3 install
Post by: Mark Carney on July 08, 2012, 05:25:46 am
Thanks AlexiuB,

I have done as suggested and all appeared OK however today I now have V3 complaining the cron is not running and referring me back to the example page below which is for V2 I believe?

https://secure.centova.com/pages/faqs/display/diagnosing_cron_job_problems_113

Here were to two lines I had within crontab and which I removed, any idea why V3 has no additional crons showing within crontab? or is it doing things deferentially now.


*/5 * * * * centovacast /home/centovacast/system/runascc/runascc exec ccmanage cronjob all >/dev/null
*/5 * * * * centovacast /usr/bin/php  -q /home/centovacast/ftp/centovacast-userdump.php /home/centovacast/ftp/passwd /home/centovacast/ftp/group
Title: Re: Remove V2 from same server as V3 install
Post by: Centova - Steve B. on July 08, 2012, 03:52:34 pm
They don't show up in /etc/crontab because they're in /etc/cron.d/centovacast.

If you're getting a cron job warning in the v3 UI then either you've found a bug, or (more likely) there's something wrong with cron on your server.  Note that if you mess up your /etc/crontab while editing it, ALL of your cron jobs will stop working, not just the one that was messed up.

We just went through and fixed a bunch of bugs in the v3 cron job though, and a whole bunch of people confirmed it was working fine after that, so it seems more likely to be a cron issue on your server.
Title: Re: Remove V2 from same server as V3 install
Post by: Mark Carney on July 09, 2012, 12:04:19 pm
Many thanks Steve for the clarification, I have rechecked my etc/crontab againt my backup and all seems OK and both old lines are removed.

Out of interest I checked the etc/cron.d/centovacast and have the following:

*/5 * * * * root /etc/init.d/centovacast check >/dev/null 2>&1
*/5 * * * * centovacast /usr/local/centovacast/bin/ccmanage cronjob all >/dev/null
* * * * * ccuser /usr/local/centovacast/bin/mediascan >/dev/null
* * * * * ccuser /usr/local/centovacast/bin/mediascan >/dev/null

I assume the double ccuser line is correct?

The error being reported when entering Account Management via a top right hand popup is:

Cron job error
Centova Cast's cron job is not running on schedule (possibly not at all). This may result in various Centova Cast problems ranging from statistics problems to licensing errors. Most often this is the result of a cron configuration error.

For assistance in diagnosing this problem, please consult the Cron Job Problems article in the Centova Cast knowledge base.

Link currently goes to the V2 explanation as expected as not all documentation up to date due to development.

https://secure.centova.com/pages/faqs/display/diagnosing_cron_job_problems_113
Title: Re: Remove V2 from same server as V3 install
Post by: Mark Carney on July 09, 2012, 12:24:07 pm
Thought I would look at the var/log/cron and post part of the file for you:

Jul  9 20:00:01 s16992366 CROND[22568]: (root) CMD (/etc/init.d/centovacast check >/dev/null 2>&1)
Jul  9 20:00:01 s16992366 CROND[22569]: (CRON) ERROR chdir failed (/home/centovacast): No such file or directory
Jul  9 20:01:01 s16992366 CROND[22645]: (root) CMD (run-parts /etc/cron.hourly)
Jul  9 20:01:01 s16992366 CROND[22646]: (ccuser) CMD (/usr/local/centovacast/bin/mediascan >/dev/null)
Jul  9 20:01:01 s16992366 CROND[22647]: (ccuser) CMD (/usr/local/centovacast/bin/mediascan >/dev/null)
Jul  9 20:01:01 s16992366 run-parts(/etc/cron.hourly)[22645]: starting 0anacron
Jul  9 20:01:01 s16992366 run-parts(/etc/cron.hourly)[22672]: finished 0anacron
Jul  9 20:01:01 s16992366 run-parts(/etc/cron.hourly)[22645]: starting plesk-php-cleanuper
Jul  9 20:01:01 s16992366 run-parts(/etc/cron.hourly)[22687]: finished plesk-php-cleanuper
Jul  9 20:02:01 s16992366 CROND[22696]: (ccuser) CMD (/usr/local/centovacast/bin/mediascan >/dev/null)
Jul  9 20:02:01 s16992366 CROND[22697]: (ccuser) CMD (/usr/local/centovacast/bin/mediascan >/dev/null)
Jul  9 20:03:01 s16992366 CROND[22736]: (ccuser) CMD (/usr/local/centovacast/bin/mediascan >/dev/null)
Jul  9 20:03:01 s16992366 CROND[22737]: (ccuser) CMD (/usr/local/centovacast/bin/mediascan >/dev/null)
Jul  9 20:04:01 s16992366 CROND[22800]: (ccuser) CMD (/usr/local/centovacast/bin/mediascan >/dev/null)
Jul  9 20:04:01 s16992366 CROND[22801]: (ccuser) CMD (/usr/local/centovacast/bin/mediascan >/dev/null)
Jul  9 20:05:01 s16992366 CROND[22839]: (ccuser) CMD (/usr/local/centovacast/bin/mediascan >/dev/null)
Jul  9 20:05:01 s16992366 CROND[22840]: (root) CMD (/etc/init.d/centovacast check >/dev/null 2>&1)
Jul  9 20:05:01 s16992366 CROND[22841]: (ccuser) CMD (/usr/local/centovacast/bin/mediascan >/dev/null)
Jul  9 20:05:01 s16992366 CROND[22842]: (CRON) ERROR chdir failed (/home/centovacast): No such file or directory
Jul  9 20:06:01 s16992366 CROND[22914]: (ccuser) CMD (/usr/local/centovacast/bin/mediascan >/dev/null)
Jul  9 20:06:01 s16992366 CROND[22915]: (ccuser) CMD (/usr/local/centovacast/bin/mediascan >/dev/null)
Jul  9 20:07:01 s16992366 CROND[22937]: (ccuser) CMD (/usr/local/centovacast/bin/mediascan >/dev/null)
Jul  9 20:07:01 s16992366 CROND[22938]: (ccuser) CMD (/usr/local/centovacast/bin/mediascan >/dev/null)
Jul  9 20:08:01 s16992366 CROND[22961]: (ccuser) CMD (/usr/local/centovacast/bin/mediascan >/dev/null)
Jul  9 20:08:01 s16992366 CROND[22962]: (ccuser) CMD (/usr/local/centovacast/bin/mediascan >/dev/null)
Jul  9 20:09:01 s16992366 CROND[23026]: (ccuser) CMD (/usr/local/centovacast/bin/mediascan >/dev/null)
Jul  9 20:09:01 s16992366 CROND[23027]: (ccuser) CMD (/usr/local/centovacast/bin/mediascan >/dev/null)
Jul  9 20:10:01 s16992366 CROND[23065]: (ccuser) CMD (/usr/local/centovacast/bin/mediascan >/dev/null)
Jul  9 20:10:01 s16992366 CROND[23066]: (root) CMD (/etc/init.d/centovacast check >/dev/null 2>&1)
Jul  9 20:10:01 s16992366 CROND[23067]: (ccuser) CMD (/usr/local/centovacast/bin/mediascan >/dev/null)
Jul  9 20:10:01 s16992366 CROND[23068]: (CRON) ERROR chdir failed (/home/centovacast): No such file or directory
Jul  9 20:11:01 s16992366 CROND[23152]: (ccuser) CMD (/usr/local/centovacast/bin/mediascan >/dev/null)
Jul  9 20:11:01 s16992366 CROND[23153]: (ccuser) CMD (/usr/local/centovacast/bin/mediascan >/dev/null)
Jul  9 20:12:01 s16992366 CROND[23174]: (ccuser) CMD (/usr/local/centovacast/bin/mediascan >/dev/null)
Jul  9 20:12:01 s16992366 CROND[23175]: (ccuser) CMD (/usr/local/centovacast/bin/mediascan >/dev/null)
Jul  9 20:13:01 s16992366 CROND[23196]: (ccuser) CMD (/usr/local/centovacast/bin/mediascan >/dev/null)
Jul  9 20:13:01 s16992366 CROND[23197]: (ccuser) CMD (/usr/local/centovacast/bin/mediascan >/dev/null)
Jul  9 20:14:01 s16992366 CROND[23266]: (ccuser) CMD (/usr/local/centovacast/bin/mediascan >/dev/null)
Jul  9 20:14:01 s16992366 CROND[23267]: (ccuser) CMD (/usr/local/centovacast/bin/mediascan >/dev/null)
Jul  9 20:15:01 s16992366 CROND[23294]: (ccuser) CMD (/usr/local/centovacast/bin/mediascan >/dev/null)
Jul  9 20:15:01 s16992366 CROND[23295]: (ccuser) CMD (/usr/local/centovacast/bin/mediascan >/dev/null)
Jul  9 20:15:01 s16992366 CROND[23296]: (root) CMD (/etc/init.d/centovacast check >/dev/null 2>&1)
Jul  9 20:15:01 s16992366 CROND[23297]: (CRON) ERROR chdir failed (/home/centovacast): No such file or directory


Interesting to see there is still a cron running for /home/centovacast ?
Title: Re: Remove V2 from same server as V3 install
Post by: Mark Carney on July 09, 2012, 12:26:13 pm
Contents of etc/crontab after removal of V2 lines:


SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/

# For details see man 4 crontabs

# Example of job definition:
# .---------------- minute (0 - 59)
# |  .------------- hour (0 - 23)
# |  |  .---------- day of month (1 - 31)
# |  |  |  .------- month (1 - 12) OR jan,feb,mar,apr ...
# |  |  |  |  .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
# |  |  |  |  |
# *  *  *  *  * user-name command to be executed
Title: Re: Remove V2 from same server as V3 install
Post by: Centova - Steve B. on July 13, 2012, 05:54:21 pm
* * * * * ccuser /usr/local/centovacast/bin/mediascan >/dev/null
* * * * * ccuser /usr/local/centovacast/bin/mediascan >/dev/null

I assume the double ccuser line is correct?
Nope, that should be removed -- I believe there was a bug in an earlier version that could cause it to be added twice.  Having two will cause the media library to be scanned for updates twice per minute instead of once.  (This is done in a very efficient manner though so it won't put any extra load on your server, and has nothing to do with the message in the web interface.)

* * *Jul  9 20:15:01 s16992366 CROND[23297]: (CRON) ERROR chdir failed (/home/centovacast): No such file or directory

Interesting to see there is still a cron running for /home/centovacast ?
That shouldn't be caused by anything in v3 -- most likely something from your v2 installation is still in /etc/crontab or another one of crond's configuration files.  Nothing in v3 references /home/centovacast any more.

Interesting to note that I don't see any log entries regarding "/usr/local/centovacast/bin/ccmanage cronjob all >/dev/null" in your cron logs... and that's the one that the error in the web interface is referring to.

Have you tried restarting/reloading cron?  Only changes to /etc/crontab are imported automatically -- changes to other cron files need to be applied by running "killall -HUP cron".  It could be that an old configuration is still in memory even though a correct, new one is on disk.

Normally your log should look like this (taken straight from one of our staging servers);

Code: [Select]
Jul 13 17:30:01 ccstaging /USR/SBIN/CRON[12085]: (centovacast) CMD (/usr/local/centovacast/bin/ccmanage cronjob all >/dev/null)
Jul 13 17:30:01 ccstaging /USR/SBIN/CRON[12087]: (root) CMD (/etc/init.d/centovacast check >/dev/null 2>&1)
Jul 13 17:30:01 ccstaging /USR/SBIN/CRON[12086]: (ccuser) CMD (/usr/local/centovacast/bin/mediascan >/dev/null)
Jul 13 17:31:02 ccstaging /USR/SBIN/CRON[12106]: (ccuser) CMD (/usr/local/centovacast/bin/mediascan >/dev/null)
Jul 13 17:32:01 ccstaging /USR/SBIN/CRON[12117]: (ccuser) CMD (/usr/local/centovacast/bin/mediascan >/dev/null)
Jul 13 17:33:01 ccstaging /USR/SBIN/CRON[12129]: (ccuser) CMD (/usr/local/centovacast/bin/mediascan >/dev/null)
Jul 13 17:34:01 ccstaging /USR/SBIN/CRON[12141]: (ccuser) CMD (/usr/local/centovacast/bin/mediascan >/dev/null)
Jul 13 17:35:01 ccstaging /USR/SBIN/CRON[12156]: (root) CMD (/etc/init.d/centovacast check >/dev/null 2>&1)
...