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


ADVERTISEMENT

SSL Certificates Not Working Properly

Mar 21, 2006

I am using SSL on my site but am having trouble in getting it to work correctly. I want to make it mandatory that the sections in <webaddress>/members and <webaddress>/admin are protected by SSL. I currently have the following in the httpd.conf file:

SSLEngine on
SSLCertificateFile /usr/local/home/pm42/finalcert.pem
SSLCertificateKeyFile /usr/local/home/pm42/privkey.pem
SSLCertificateChainFile /usr/local/home/pm42/finalcert.pem

but I dont know what to do next.

View 0 Replies View Related

SMTP Not Working Properly On IIS

Jan 15, 2008

I set up my own SMTP server on IIS.

Most of the time it sends and recieves the email OK.

From time to time, the mails bounce. For example if I send to someone at Hanmail (major korean provider) then it always bounces. Similarly, sometimes people say they sent an email to the server and it bounced back to them.

I guess something is not set up right, maybe MX record or some other mysterious thing. How can I troubleshoot/solve this?

I MUST fix this so I will be back to check on this thread often,

View 0 Replies View Related

Subdomain In Httpd.conf Not Working Properly

Jun 8, 2007

Added this in the httpd.conf but it is still pointing to the main domain xxxx.com

--------------
<VirtualHost *:80>
DocumentRoot /xxx/xxx/webmail
ServerName webmail.xxxxx.com
</VirtualHost>
-----------------

whenever i type webmail.xxxxx.com, it will see the content of xxxxx.com.

View 5 Replies View Related

Plesk 12.x / Linux :: Multiple Version Of PHP Are Not Working Properly

Dec 28, 2014

I am looking for a replacement to my existing ISPConfig 3.x installation and have heard a lot of good things about Plesk, so I decided to put up a test server with a trial version of Plesk 12.The server is running Centos 6.5 64-bit minimal install with all system updates applied before installing Plesk. After installing Plesk I used the commands from the attached text-file.After compiling PHP 5.5.20 with no errors displayed on screen I created a new subscription plan as a copy of the #default domain" plan and changed the name to "PHP 5.5 website" and in the Hosting Parameters I changed PHP to run still run as a FastCGI application but use my compiled PHP 5.5.20 instead of the OS vendors PHP 5.3.3.The configure options used are the same as I did use for my ISPConfig 3.x servers.I also tried the configure options shown here: [URL]... But the command ends with a "configure: WARNING: unrecopgnized options: --enable-fastcgi"

If I compile with the attached script I get a HTTP 500 error when visiting the selected website (which is a clean installation of Drupal 7.34) and in the error_log for my test site I get this:
"
[Sun Dec 28 18:51:48 2014] [warn] [client x.x.x.x] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server
[Sun Dec 28 18:51:48 2014] [error] [client x.x.x.x] Premature end of script headers: index.php
"
x.x.x.x is the internal IP of my router/firewall.I have also looked in the Plesk Administrator GuideIs there a known issue with Plesk 12 and CentOS 6.5 64-bit when wanting to use multiple versions of PHP, since both the version compiled using the KB article above and my own attached script worked fine on my ISPConfig 3.x servers.

View 4 Replies View Related

Plesk 12.x / Windows :: Creating New Working Subscription - DNS Does Not Work Properly

Dec 1, 2014

We can no longer create a working subscription

Microsoft Windows Server 2012 R2
12.0.18 Update #26

After the creation of a subscription, DNS does not work properly.

The last successful subcription was created Sept 26, 2014.

I thought something ontoward had happened at first so attempted to delete the subscription and re-create.

On attempting to delete the subscription the following error is given

Error: Some of the selected subscriptions were not removed.
Unable to remove domain: Error during domain.com removeZone: dnsmng failed: Unknown error 0x80131509 (COM Interop Error 80131509, Description: System.InvalidOperationException: Operation is not valid due to the current state of the object. at System.Management.ManagementObject.Delete(DeleteOptions options) at System.Management.ManagementObject.Delete() at WMIMsDNS.Provider.DeleteRecordsByType(String zone, String type) at WMIMsDNS.Provider.DeleteZone(String zone, UInt32& serial)) at removeZone ZoneName = 'domain.com'Click to expand...

View 10 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

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 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

IP Not Being Blocked Properly

Jun 28, 2009

I need to block a specific IP:
93.6.224.242

It adds fine when I do:
iptables -A INPUT -s 93.6.224.242 -j DROP

However, the IP is still accessing files and pages on the site according to Apache:

When I ban other IP's they are blocked from accessing anything on the server (e.g. it wouldn't even reach Apache level because of firewall), but this IP just isn't banning properly.

View 11 Replies View Related

CentOS - Can't Get VNC To Display Properly

Feb 2, 2009

I installed VNC on my VPS using a guide I found here. I installed KDE. It all works but when I view the VPS through VNC on my windows PC the text on the screen appears to be squares as if its a non supported language.

[url]

I've uploaded a screenshot to better help you understand what I mean.

View 11 Replies View Related

How Do I Check If I Have Reverse DNS PTR Set Up Properly

Nov 7, 2008

As title suggests I'm looking to make sure my hosting is set up to respond with valid PTR information so my server generated emails aren't flagged as spam.

I have full SSH access to the machine at root level.

Running a CentOS machine but there are also other virtual hosts using a shared ip.

View 6 Replies View Related

Domain Not Resolving Properly

Jun 22, 2007

A client recently moved one of their domains to one&one (night mare I know) he then asked us to repoint the domain name to our servers using out name servers.

We have done this and it is not resolving to our server.

The problem is that the site is no longer showing and their emails are down.

I used a domain dossier and the DNS record looks like it should be changed but I'd like some confirmation on this.

View 1 Replies View Related

Tomcat Not Connecting Properly To The Database

Mar 25, 2008

I desperately need someone to help with a tomcat installation on a dedicated server. I have tomcat working properly but the app is not connecting properly to the database.

View 1 Replies View Related

Plesk 12.x / Linux :: SSL Not Updating Properly

Mar 18, 2015

I renewed an SSL cert for one of my servers. After several hours, then days I noticed that the date had not updated to show the new expiration date.

When I do an ssl check through [URL] it shows the following when scanning https://webhost1.teksavvy.com:8443:

Valid from: 2014-Apr-11 00:00:00 GMT
Valid to: 2015-Apr-11 23:59:59 GMT
When scanning https://webhost1.teksavvy.com it shows:

[Code]....

View 6 Replies View Related

Plesk 12.x / Windows :: Only New Net Domain Will Not Add Properly

Jun 27, 2015

I get this error message when I try to add a new domain from within Plesk 12 for Windows..Error: ProtDir_IIS::update() failed: Add Protected Directory failed: columns siteId, path are not unique (Error code 1)

I have added .co.uk - .com and others no issues at all.

View 1 Replies View Related

Verify That My Mail Server Is Configured Properly?

Feb 29, 2008

how I can verify that my mail server is configured properly?

This is the problem:

I can send out mail without a problem, but I cannot receive mail from external domains (eg: google or hotmail).

Some of the message have weird bounce backs like:

PERM_FAILURE: SMTP Error (state 13): 550 No Such User Here

But the user does exist... I am logged into it right now.

View 3 Replies View Related

Backup/restore Of Cpanel Work Properly

Jan 11, 2008

I use Incremental backup feature of Cpanel but seems it does not work properly.

Yesterday when i restored my customer account, it brought back the files and database of 2 months ago. I set it backup everday so why this happen?

My server run Centos 4.5 and Cpanel Stable

View 2 Replies View Related

Windows Customers, Ensure You Are Properly Secured

May 31, 2008

There has been a recent rash of Windows 2003 customers being hacked and having "UTorrent" installed, as well as having their Administrator password changed, rendering the server inaccessible.

At the moment, we have yet to determine the vulnerability in Windows allowing the hackers to breach the systems however we believe it is related to RDP.
We highly suggest you are complying with the following, to lessen your risk of having your server compromised:

1) Run RDP on a non-standard port
[url]

2) Run a software firewall on your machine, blocking ALL unnecessary ports on your server. You should only have the bare minimum open.

3) Limit any non-public access to your IP and trusted IP's only. This will prevent any other outside networks or servers from reaching your machine through ports which are not meant to be public (http for example)

4) Ensure you have FULL updates for your Windows O/S, immediately.

5) Ensure any 3rd party software you are running, has also been fully updated to the latest version including any patches.

Please make sure these suggestions are implemented immediately to lessen you risk of being hacked by the current wave of exploits.

View 1 Replies View Related







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