Logrotate Cron Not Working

Jun 19, 2007

I recently purchased a new dedicated server, since I have had this server (8 days) I have being receiving the following email:

Quote:

/etc/cron.daily/logrotate:

error: error accessing /var/log/httpd: No such file or directory
error: httpd:1 glob failed for /var/log/httpd/*log

View 9 Replies


ADVERTISEMENT

Doubt About Csf :: Check /etc/cron.daily/logrotate

Nov 1, 2009

i need information about this option 'Check /etc/cron.daily/logrotate for /tmp noexec workaround', there are in the server check, of the csf test, someone can explain to me about this function? should do it?

the actually state is 'warning'.

View 12 Replies View Related

Cron Working But Command Isn't ?

Jun 27, 2005

I'm needing some info i have been pulling my hair out for hours trying to get some cronjobs lined up i started out with knowing nothing about it and i'm a little better off now i got the cron running but the commands aren't executing so maybe someone can help me figure out why i would greatly appreciate it

Here's The deal I telnetted in set the following crontab ...

View 4 Replies View Related

Cron Quit Working...

Oct 6, 2007

I have a dedicated CentOS 4.5 Server. However, as you can probably guess I am new to linux and managing a server...

Anyway, beginning of this month my crons quit working, I still receive emails as if they are ran but I can't get the scripts to actually execute.

I have not touched the crontabs or anything prior to them not working, they simply quit working... I did not notice immediatly they did not work, I am guessing that it was around the time of which I rebuilt apache to a new version of PHP. Today I tried changing them to "php path/to/script.php" and I also tried "path/to/php /path/to/script.php", neither worked.

Any ideas or suggestions as to how I can fix this?

View 9 Replies View Related

Cron Job Not Working Properly

Jun 9, 2007

I have a slight problem with a cron job I have setup.

I wanted to save a copy of iptables every hour to a folder, so I created a script... here it is:

Code:
varDate=`date +%y%m%d`
varTime=`date +%H%M`

filename="IPtablesBackup-$varDate-$varTime"
iptables-save -c > /etc/IPtablesBackup/$filename
and called is Backup-Script.sh

Now if I just execute the script will in root ./Backup-Script.sh I get a new file with the correct filename and iptables info is saved ! Great ! So then I thought, how can I setup this automatically every hour.

Which leads me on to my problem. I inputted "crontab -e" added this line

Code:
59 * * * * /etc/IPtablesBackup/Backup-Script.sh
The problem is the script is run, I know because it creates a new file with the correct time and date, however the file is empty?

I have set Backup-Script.sh to 777 and owner and group are both root?

View 4 Replies View Related

Cron - Not Working - Apache

Jul 4, 2007

I did not realize the significance of the Apache sub-forum. I thought perhaps this would be a more general Server management query, but I realize now I should have posted in Apache forum.

I have been banging my head against the wall for the last couple of days trying to get cron jobs working. It's actually making me quite depressed, a lot of people are waiting on me to get this working, and for the life of me I see no light. I'm not a stupid person, i'm a PHP developer, and have some linux skills. This is the single most annoying issue I have had to deal with simply because I cannot find any troubleshooting methods to my issue.

I have tried every different combination of command under the sun and I cannot get any sign that the cron is running the commands.

I own a "virtual" dedicated server with a hosting company, I have full root access. Linux / Apache

The script file is a PHP file which simply mail() an email saying that cron is working, I am yet to receive this mail that was executed by cron.

I have ensured there are no errors in this simple PHP file, I have executed the script from the shell and all is well there..

So, firstly I tried to setup the cron table from CPanel, on the account where the script resides.

I used the following command combinations:
Code:
0-59 * * * * /usr/local/bin/php /home/username/public_html/cron.php
0-59 * * * * php -q /home/username/public_html/cron.php
0-59 * * * * php /home/username/public_html/cron.php
0-59 * * * * cd "/home/username/public_html/"; php cron.php
0-59 * * * * wget [url]
with time combinations of:
* * * * *
to get the command to be executed evey minute, for testing purposes.

All these commands work fine when executed through the shell.

I set the mail address for cron output to be my mail address also.

I do not get any mail from cpanel with an overview of the cron executions.

I then gave up trying to get cron to work on that account, and decided to go root.

I logged into the shell via root, checked the cron table for root. I edited the root cron table (that contains commands for various cpanel scripts etc) to include a command to execute the php script, even with the script residing on the root directory.

I also added MAILTO="myemail@email.com" to the first line of the cron table.

I do not get any emails of the cron actions.

How can I check if the cron scheduler is working when I get no sign that the cron commands are being executed, and when I do not receive any cron emails? What methods are there for me to troubleshoot this issue?

Could it be possible that cron shedular is not active on my server?

I have lurked the net with great detail to find any method to troubleshoot my issue, and all the related pages I find are to do with troubleshooting the commands. I know my commands are fine, there is some other issue here.

View 2 Replies View Related

Cron Job Not Working, Restart Services

Jan 1, 2008

I'm having a bit of trouble with one cron job that doesn't seem to work.

I have others scripts that run hourly fine. However this one does not.

The script:

restart_monitoring.sh

Code:
#!/bin/bash
service iptables stop
service iptables start
/root/bandwidth_rules.sh
/root/portforward_config.sh
exit
The two scripts at the end just load a lot of iptables rules back in.

The cron job should run hourly (59th minute)

The cron job entry

Code:
59 * * * * /root/restart_monitoring.sh
I have restart crond to enable the new job, still doesn't run.

The job is to restart iptables, thus flushing all rules that I have running, then reloading them. I have figured out the problem to be with the "service iptables stop/start" command, it doesn't seem to like doing this...?

View 2 Replies View Related

Cron Not Working On CPanel Server

Nov 9, 2008

How do I make sure that there are cron jobs running on my cPanel server? I have root access, etc...just not sure why my crons aren't running. Nothing weird going on.

View 7 Replies View Related

Cron As Postgres User Not Working

Jun 14, 2007

I was hoping someone could shed some light on a cron related issue I'm having.

I've been using linux for a while...but never really used crons.

My cron is supposed to dump a postgres db in tar.gz format every minute (for testing purposes) but it doesn't.

I opened my cron in vim via:

Code:
postgres@myhost:~$ crontab -e
And here's the cron:

Code:
* * * * * /usr/bin/pg_dump -D warranty_1_6_test | gzip -c > /var/www/test/postgres/backup$(date +"%Y%m%d_%H%M").tar.gz

Also:

Code:
postgres@myhost:~$ ls -lah /var/www/test/postgres/
total 8.0K
drwxrwxrwx 2 postgres postgres 4.0K 2007-06-14 12:01 .
drwxr-xr-x 3 user user 4.0K 2007-06-14 11:47 ..

Running the backup command via CLI works fine.

View 5 Replies View Related

Cron Command Remove File Not Working

Jan 1, 2007

I have edited /var/spool/cron/root file

and I've added this line:

*/1 * * * * rm -f /tmp/*.pl

and I have created file lol.pl

and after 10 minute file is still there, why?

View 4 Replies View Related

Plesk 12.x / Linux :: Cron Job Working On Console But Not Automatic In Task Manager

Aug 19, 2014

i have setup fresh Centos 6.5 with Plesk Pannel 12.0.18. When i execute the attached command from the console, i get it work, some posts are auto created within wordpress. When i enter the attached command within Plesk (Tools / Settings - Taskmanager - root New Task, the command is not executed...

/usr/bin/wget --post-data='id=4&minposts=1&maxposts=3' -O /dev/null http://www.mydomain.com/wp/wp-content/plugins/WPRobot3/cron.php?code=UNIQUEID

I tried also without /usr/bin at the beginning, but its not working with cron automatic

View 3 Replies View Related

Apache Logrotate

Jun 22, 2009

This is our logrotate definition for Apache's logs folder:

Code:
/var/log/httpd/*log {
rotate 5
missingok
notifempty
size=100M
sharedscripts
postrotate
/bin/kill -HUP `cat /var/run/httpd.pid 2>/dev/null` 2> /dev/null || true
endscript
}
Yet, while it does truncate logs in five, we seem to have fairly different sizes: 182M, 168M, 968M (!)... It seems to be ignoring "size=100M",

View 2 Replies View Related

Disable Logrotate

Oct 25, 2009

is it possible to disable log rotate? I can't seem to find the cron under my weeklys or dailys nor monthlys unless it's named "mad-db" but is there a way to make it say yearly? or just disable it all together? I say this because the script I use has a function already to clear the logs and when log rotate runs it kills all processes going by the script

View 8 Replies View Related

Change Frequency Of Logrotate

Jul 21, 2008

In /etc/logrotate.conf

I have the following:

Quote:

daily
rotate 7
create
compress
include /etc/logrotate.d
/var/log/wtmp {
monthly
create 0664 root utmp
rotate 4
}

How can I keep my logs until the 18th of every month?

Would:
monthly
rotate 18

View 6 Replies View Related

How Can I Setup Logrotate To Rotate Domlogs?

Jun 30, 2008

i have a little issue with the domlogs folder.

I should empty this files but i don't know if it is possible to do without reboot Apache.

a) how can i setup logrotate to rotate domlogs?
And if it is possible:

b) how can i setup logrotate to rotate domlogs without restart apache?

I have already setup whm-> tweak settings to delete old domain's access logs after stats run and the whm is setup to generate statistics every 20 hours.

But every day the site is slowly because the domlogs are too big.

View 6 Replies View Related

Changing Access_log Filename In Logrotate

Aug 4, 2008

how to rename access logs according to Week Number?

I notice that 1&1 do this, producing a file like "access.log.31.gz".
I'd like the access log to be in this format: access_log_[domain-name]_[Week-Number].gz, or if domain-name is not possible: access_log_[Week-Number].gz

Here's my current logrotate script for access_log:

Code:
/home/default/muro.co.uk/user/logfiles/access_log {
missingok
rotate 8
weekly
postrotate
/bin/kill -USR1 `cat /var/run/httpd.pid`
endscript
}

View 4 Replies View Related

Plesk 12.x / Linux :: Logrotate For Modsecurity

Aug 1, 2014

I want to create logrotate in logrotate.d for modsecurity log.

I find following code, but it don't works.

Code:
/var/log/modsec_audit.log {
rotate 7
compress
missingok
notifempty
sharedscripts
postrotate
/sbin/service httpd reload > /dev/null 2>/dev/null || true
endscript
}

View 1 Replies View Related

Plesk 12.x / Linux :: After Mod Security Logrotate New Log Is Empty

Jul 6, 2014

Plesk 12 on Centos 6.5

I added the following to my /etc/logrotate.conf

/var/log/modsec_audit.log {
missingok
daily
rotate 4
compress
}

I'm not exactly sure if the above is the correct syntax, but the result was that two days later my current modsec_audit.log was Gzipped and a new modsec_audit.log was created.

The problem is that nothing was logged to this new file.

From the Plesk 12 control panel I turned off mod security and then turned it back on again and hey presto, the new logfile started to log events.

This leaves the problem of why nothing was recorded when the file was created.

View 2 Replies View Related

Non-working Forwarding Email Account On Working Domain

Apr 24, 2008

I have a domain with a few forwarding email accounts that forward to mac.com email accounts... for some reason every once in a while these accounts stop working...

This is the error I get when I email to that account:

This message was created automatically by mail delivery software.

A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed: ...

View 9 Replies View Related

SSH Cron Job

Feb 28, 2007

I wanna run this command "./adfsas.sh" Every 4 Hours can someone tell me what command I can use via SSH to set this cronjob?

View 8 Replies View Related

Cron Job

Oct 4, 2008

PHP Code:

* */1 * * *

But I didnt understand the difference from

PHP Code:

* * * * *

time property? Why is there a need for /1?

View 7 Replies View Related

Cron

Sep 17, 2007

I have root access to a server. Is it possible to create a cron that would restart my ftp and http server every so often. Like once a week or somthing. If so how would i do it?

View 6 Replies View Related

Cron Job

Feb 24, 2007

in order to backup db automatically i want to use cron job. So i set cron job at 00 AM

suppose that : my infos
db name : db
db user : zode
db pass : 123

the command i use is following

PHP Code:

mysqldump -u zode -p123 of -K -c -f --compatible=mysql40 --default-character-set=utf8 db > backup/db_`date +%d%m%y`.sql 

in good time i am looking into backup directory db is in it or not

but there is nothing in it

View 3 Replies View Related

Cron Job

Jun 18, 2007

I run A Centos 4.xx latest kernel server and Ive got a problem with Cron Job reporting.

The Cron Jobs themselves are working fine but I keep getting this message, on the hour, every hour

Quote:

Originally Posted by Email from the Cron Daemon

Not a directory: /etc/cron.hourly

The folder etc/cron.hourly DOES EXIST! and I cannot work out what could be causing this?

Does anyone hgave any ideas what could be causing it

View 2 Replies View Related

CRON Job Timing Out

Sep 19, 2007

i have had a problem for some time now, regarding my CRON jobs. I am trying to download a large amount of data from ebay (through their API, totally legal and aboveboard) using php, but my CRONjob times out.

I have tried resetting the timeout variable, but then it exceeds the maximum filesize
SO, my question: is there any way to have a script run as a CRON job, and wen it is complete, call another script?

View 4 Replies View Related

Per Second Cron Jobs?

Apr 5, 2009

Hey everyone, my friend's dad is looking for a web host that will allow his cron jobs to run every second. Most hosts apparently dont allow cron jobs faster than 5 seconds apart.

How often a host can run cron jobs isn't really advertised on their sites so I'm having a bit of trouble finding a host. I've resorted to just sending emails to sales addresses asking about it.

Does anyone know how I can find a host like this?

View 7 Replies View Related

Reboot Cron Job

Aug 20, 2007

VPS isn't rebooting by itself when it goes down. Anyone has any program/script that monitors heartbeat of the server? Like when it goes down, the program will automatically reboots the system. I know there's such a script out there but I forgot what it called.

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved