SOLVED Tasks Cron Job not working

Status
Not open for further replies.

NasKar

Guru
Joined
Jan 8, 2016
Messages
739
I can send a task in the Task/Cron job manually by clicking Run Now, and I get an email about my smart drive status. It doesn't run automatically anymore. My /var/log/cron doesn't have any recent entries. Any thoughts on how to fix this?
Task Error.jpg
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
Just a few things since this is an odd problem...

1) Power Off and wait a few seconds, then power back on.
2) Copy down the CRON task and then delete it, reboot, add the CRON task again and cross your fingers.
3) If you are booting from a USB Flash drive, replace it. If you are booting from a SSD then reinstall FreeNAS.

Of course you will have a copy of your configuration file before doing any deleting of anything.

Are you still running FreeNAS 9.10.2-U6 ?
 

NasKar

Guru
Joined
Jan 8, 2016
Messages
739
@joeschmuck thanks for the response.
Step 1&2 didn't work. Created a new task that runs every minute to see if it will email me the smart status but it still only works if I manually run the task. I'm running Freenas 9.10.2-U6 with 2 USB sticks mirrored. Can I try bootin from the 2nd USB? If so how do you do that? Do I have to reinstall the Freenas OS from scratch after formating the USB sticks and then reinstall the config?
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
Stop the presses, try this from the shell service cron start and see if it makes any difference. I did a quick google search and a person had this as a problem from the FreeNAS 9.3 days. Why do you have it now? I can't say but if this fixes your issue but the problem comes back after a reboot, I recommend reinstalling FreeNAS after getting a new USB Flash drive. And I'd also consider updating to FreeNAS 9.10 or later so you don't kill another USB flash drive. Code was changed to limit writing to a USB Flash drive, it was causing all sorts of deaths.

I hope the command works.
 

NasKar

Guru
Joined
Jan 8, 2016
Messages
739
starting the cron service got it working. I was having issues with the email earlier and was told that the email setting are sticky and should persist after a reboot but they don't seem to I have not rebooted yet to see if the cron sticks. While I was waiting for a response I did a fresh install of 9.10.2U6 and the tasks worked. I save the config and reloaded my original after I got your last response. I'm thinking I should just go with the fresh install as there seems to be a bug somewhere. Will all my jails get assigned the same IPs and work as before after running the wizard? Will I only have to redo my shares and user/groups?
 

NasKar

Guru
Joined
Jan 8, 2016
Messages
739
Look like all the jails are gone is there a way to resurrect them without building from scratch?
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
If your jails were on the pool then if you restore your configuration file the jails should be back. If your jails were on your boot device by chance (some people did set it up that way) then they are gone. This doesn't mean your data is gone, hopefully the data was linked to a dataset on your pool.

I agree, a clean install is likely the best way to do it.
 

NasKar

Guru
Joined
Jan 8, 2016
Messages
739
If your jails were on the pool then if you restore your configuration file the jails should be back. If your jails were on your boot device by chance (some people did set it up that way) then they are gone. This doesn't mean your data is gone, hopefully the data was linked to a dataset on your pool.

I agree, a clean install is likely the best way to do it.
I am able to reload my current config into the fresh install and have everything work. The issue is I have a few bugs with my current system that I don't think can be fixed. The cron service doesn't start after a reboot, UPS and email settings don't stick after reboot and some standard jails don't autostart even though that parameter is set. My preference as you said would be to do a clean install. All my jails are on the pool not on the boot USB. How can I recreate the reference to the jails that already exist on the pool in the fresh install USB? I tried to search for this issue in the forums but I'm not sure how to phrase the search.
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
When you say "fresh install", youa re only talking about installing FreeNAS from the ISO (or similar), not destroying your pool, right?

So if you do another fresh install as you did before but do not restore your config file, does everything appear to work properly even after rebooting? I know you won't see your jails so you will need to configure something. You could create a new jails dataset and create one jail for testing.

As for migrating data for your old jails, I can't help there. I'd have to search the same as you. My advice would be to upgrade to FreeNAS 11.0-U2 if you are fine with that and then reconfigure your system and build up new jails. Just retain the old jail dataset in case there is some data there you need to access while building up your new jails.

Hopefully I conveyed my thoughts to you okay.

Good luck!
 

NasKar

Guru
Joined
Jan 8, 2016
Messages
739
Yes I have not destroyed my pool just the USB boot.
Just to clarify I will have recreate my jails on the clean boot of the OS then copy my data from the old jails. In order not to overwrite the old jails create a new dataset like Jails2 and then change Jails/Configuration/Jail Root: to /mnt/v1/Jails2

Is that correct? Any issues with jails/ plugins in freenas 11? have not kept up with FN 11 stuff.
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
You cannot simply copy your present jails over, you will need to create new jails and install new software in the jails. You may be able to use an old configuration file for whatever program you are putting into the new jail but not copy the entire jail.

I have not used any plugins but have used the jails. My Plex jail transferred fine from 9.10.2 and I have created several jails to help other troubleshoot. I can't say iv'e done extensive work with the jails though in FreeNAS 11, buit it does seem fine.

So to re-itterate: I would do like you are, create a new jail dataset, change your jails mount point to the new dataset, create you new jails and install the software you desire. If there are any files in the old jails then you should copy those over using the cp command line or some other means. If you are storing data within a jail, you should try to stop that and store data in a seperate dataset. Example: You are downloading TV shows and you need to ensure they are stored outside the jail. Some folks have done it wrong and when they delete a jail, all the data goes away too.

Once you have your system running properly (not a second before) then you can destroy the old jail dataset.

Good Luck!
 
Status
Not open for further replies.
Top