cpanel migration fails at importing crons, this is a real nightmare..

8 posts / 0 new
Last post
#1 Tue, 11/01/2011 - 02:31
beakernz

cpanel migration fails at importing crons, this is a real nightmare..

Hi,

I have a 25Gb cpanel site with a 1.3GB mysql DB. I am trying to do a cpanel migration into virtualmin. There is a virtualmin tool just for this, I've used it 20 times without issue but this one site will not import. The import fails at:

"crontab: The audit context for your shell has not been set."

This is at Joyent on their SmartOS Solaris machines

The import is trying to recreate crons from the old site but (due to a misconfig i guess) NO USER on smartOS can run a cron via virtualmin, only root can. I have tried removing the cron jobs from the old site before migration but it still bombs the migration with that same error.

This is making my life total hell. I am not a unix expert. Can anyone here provide a workaround to remedy this: "crontab: The audit context for your shell has not been set."

I think the migration is controlled with a script, I thought maybe I can find this script and remove the cron section so the script ignores importing any crons, but I can't seem to locate this script in the file system anywhere.

Thanks for any help:

Also as a suggestion for the migration script, if a step fails it would be most helpful for the script to state this, then ask if you would like to continue, not just crash the migration.

Wed, 11/02/2011 - 11:41
andreychek

Howdy,

That is indeed a bug... Jamie has coded a fix for that issue will which be included in the next Virtualmin release.

I take it though that you're hoping to be able to resolve this before a few weeks time?

-Eric

Fri, 11/04/2011 - 01:47 (Reply to #2)
beakernz

yes, definitely please i tried some more things tonight and got further but it still failed with:

Failed to migrate virtual server : An error was detected in the new Cron configuration :

MAILTO=""

I will try to add the mail to in my cpanel cron account and re backup and see if that backup migration works but at 23GB my cpanel backups are huge and it takes ages to attempt.

Fri, 11/04/2011 - 06:00 (Reply to #3)
beakernz

well 3.5 more hours to attempt again and even with the mail address in place it failed again.

Failed to migrate virtual server : An error was detected in the new Cron configuration :

MAILTO="myemail@gmail.com" crontab: error on previous line; unexpected character found in line. crontab: errors detected in input, no crontab file generated.

MAILTO="myemail@gmail.com"

If anyone can help me find a work around to this it would be greatly appreciated. Even if you could supply a migration script devoid of any crontab importing.

9hrs I spent trying to migrate this site today and couldn't get it to run. Distraught is an understatement.

Fri, 11/04/2011 - 10:25
andreychek

Well, you could always try creating a smaller account to test with.

Or, you could try creating a blank crontab... that shouldn't cause any errors.

However, it sounds like the issue you're having is that there's a syntax error in the crontab file... if you like, you could paste in the contents of your crontab file, maybe we can help spot the issue.

I'll also attach a patch that can be used in order to fix the bug where an error with the crontab prevents the migration from completing.

-Eric

Fri, 11/04/2011 - 19:30 (Reply to #5)
beakernz

hi Andy, with this patch I am unsure what to do with it, can you advise how I apply the patch. Once I apply it I can try a test migration. It seems this patch will do the trick. As far as crons on my cpanel account there are none that I have made, but maybe there are ones that cpanel has itself. Anyway, I would like to try your patch first but am unsure how to use it. Thanks again!

Sun, 11/06/2011 - 22:56
beakernz

no worries i figured out how to patch it. The new script worked with a test migration I did. SHould be ok :) Thanks for all the help dood!

Mon, 11/07/2011 - 09:16
andreychek

Sorry for the delay, and I'm glad you got it figured out!

Thanks for letting us know that worked!

-Eric

Topic locked