Restart Httpd On Fail

Aug 4, 2007

I'm using this script (I think I got it off of WHT) to restart httpd whenever a file failed to download on my server.

Code:
#!/bin/bash

FILE=[url]

rm -f test.file
wget -q $FILE -O test.file

if [ ! -f test.file ]
then
/etc/init.d/httpd restart
echo 'ALERT - HTTPD restarted on:' `date` | mail -s "Alert: HTTPD Restarted" user@domain.tld
fi

exit $?
I have it on crontab


Code:
*/5 * * * * /bin/nfup > /dev/null 2>&1
but it didn't seem to restart httpd, I got no e-mail and our site was down for several hours.

Is there anything wrong with the script?

View 10 Replies


ADVERTISEMENT

Restart Httpd

Sep 12, 2007

[root@server1 /]# ps -aux |grep httpd
Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.3/FAQ
apache 26023 0.5 0.9 12064 8744 ? S 05:28 0:04 /usr/sbin/lighttpd -f /etc/lighttpd/lighttpd.conf
root 32333 0.7 2.5 24456 22772 ? S 05:39 0:00 /usr/local/cpanel/whostmgr/bin/whostmgr ./reshttpd
root 32384 0.0 0.0 2152 524 pts/1 S+ 05:39 0:00 grep httpd

i want removed "lighttpd"

how may?

i don`t want killed it

View 0 Replies View Related

Httpd FAILED Restart

Apr 30, 2009

i had just wake up and see my vps server witch work under centOS 5.2 wont up my domains ... just i can ping my domain and when i open my domains name its give me

Network Error (tcp_error)
even i cannot logged in my ssh account so i give it a hard reboot from my slice manager and after that i can log , i turn my firewall of .. restart my apache and my sqlserver

and same error ..

i can restart my sql fine .. stop my firewall and modsecurity fine , but when i restart my httpd server its wont , its give me FAILED

View 10 Replies View Related

Cant Restart Apache Httpd

Aug 3, 2008

I am trying to restart my apache since i made changes to my php.ini file.

I tried using this command /etc/init.d/httpd restart which didnt work for me..any ideas guys? Its a basic dedicated server from a hosting company..

View 10 Replies View Related

Httpd Unable To Restart

Nov 29, 2007

I am using cPanel server which I am unable to restart the Apache service
httpd has failed, please contact the sysadmin.

root@samajaya [~]# service httpd restart
/etc/init.d/httpd restart: httpd not running, trying to start
[Thu Nov 29 02:27:00 2007] [warn] NameVirtualHost xx.xx.xx.xx:80 has no VirtualHosts
[Thu Nov 29 02:27:00 2007] [warn] NameVirtualHost xx.xx.xx.xx:80 has no VirtualHosts
[Thu Nov 29 02:27:00 2007] [warn] NameVirtualHost xx.xx.xx.xx:80 has no VirtualHosts
[Thu Nov 29 02:27:00 2007] [warn] NameVirtualHost xx.xx.xx.xx:80 has no VirtualHosts
[Thu Nov 29 02:27:00 2007] [warn] NameVirtualHost xx.xx.xx.xx:80 has no VirtualHosts
[Thu Nov 29 02:27:00 2007] [warn] NameVirtualHost xx.xx.xx.xx:80 has no VirtualHosts
[Thu Nov 29 02:27:00 2007] [warn] NameVirtualHost xx.xx.xx.xx:80 has no VirtualHosts
/etc/init.d/httpd restart: httpd started

View 14 Replies View Related

Httpd Restart Problem In WHM

Jan 28, 2007

Whenever i try to restart httpd server in whm then got the following error

root 20655 0.9 0.9 20716 19408 ? S 18:23 0:00 /usr/local/cpanel/whostmgr/bin/whostmgr ./reshttpd

httpd has failed, please contact the sysadmin.

But in shell when i tried to check httpd status then its working fine what was the reason how can i fix this problem in whm

View 5 Replies View Related

Apache/httpd Wont Restart

Jan 25, 2008

I keep trying to restart Apache but it wont restart... I run a command line to restart it, but nothing happens. Here is what I have tried:

Quote:

-bash-3.1# chroot /home/fatehost.net/runtime_layeredpanel/
fatehost:/# /etc/
bash: /etc/: is a directory
fatehost:/# /etc/init.d
bash: /etc/init.d: is a directory
fatehost:/# /etc/init.d/httpd-users
Usage: /etc/init.d/apache2 start|stop|restart|reload|force-reload
fatehost:/# /etc/init.d/httpd-users start
Starting web server: Apache2(98)Address already in use: make_sock: could not bind to address 205.209.135.132:80
no listening sockets available, shutting down
Unable to open logs
fatehost:/# /etc/init.d/httpd-users restart
Forcing reload of web server: Apache2httpd (pid 5955) already running
.
fatehost:/# /etc/init.d/httpd-users force-reload
Forcing reload of web server: Apache2.
fatehost:/# /etc/init.d/httpd force-reload
Forcing reload of web server: Apache2.
fatehost:/# /etc/init.d/httpd-users restart
Forcing reload of web server: Apache2httpd (pid 13475) already running
.
fatehost:/#
fatehost:/# /etc/init.d/httpd-users start
Starting web server: Apache2(98)Address already in use: make_sock: could not bind to address 205.209.135.132:80
no listening sockets available, shutting down
Unable to open logs
fatehost:/# /etc/init.d/httpd-users stop
Stopping web server: Apache2.
fatehost:/#
fatehost:/# /etc/init.d/httpd-users start
Starting web server: Apache2(98)Address already in use: make_sock: could not bind to address 205.209.135.132:80
no listening sockets available, shutting down
Unable to open logs
fatehost:/#
fatehost:/# sudo /etc/init.d/httpd-users stop
bash: sudo: command not found
fatehost:/# su root /etc/init.d/httpd-users restart
Forcing reload of web server: Apache2httpd (pid 20391) already running
.
fatehost:/# /etc/init.d/httpd-users reboot
Usage: /etc/init.d/apache2 start|stop|restart|reload|force-reload
fatehost:/# reboot
WARNING: could not determine runlevel - doing soft reboot
(it's better to use shutdown instead of reboot from the command line)
shutdown: timeout opening/writing control channel /dev/initctl
init: timeout opening/writing control channel /dev/initctl
fatehost:/# WARNING: could not determine runlevel - doing soft reboot
bash: WARNING:: command not found
fatehost:/# (it's better to use shutdown instead of reboot from the command line)
> shutdown: timeout opening/writing control channel /dev/initctl
> init: timeout opening/writing control channel /dev/initctl
>
fatehost:/# /home/fatehost.net/runtime_layeredpanel
bash: /home/fatehost.net/runtime_layeredpanel: No such file or directory
fatehost:/#

View 6 Replies View Related

VPS Httpd Failed And Restart Automatically

Feb 17, 2008

almost daily my VPS httpd failed and restart automatically, after that all services show UP but my sites not working.. Only start working when I restart DNS Server (BIND).

I am using CPanel

View 7 Replies View Related

Cannot Restart MySQL, HTTPD And Server

Nov 22, 2007

I am not being able to restart the server, or MySQL or httpd via SSH.

PHP Code:

root@server [~]# /etc/init.d/httpd fullstatusLooking up localhostMaking HTTP connection to localhostAlert!: Unable to connect to remote host.lynx: Can't access startfile http://localhost/server-statusroot@server [~]# 

PHP Code:

root@server [~]# /etc/init.d/mysql reload/etc/init.d/mysql: line 244: kill: (3375) - No such processtouch: cannot touch `/var/lib/mysql/server.lubnan.us.pid': Read-only file system 

View 14 Replies View Related

My Apache Any 1h Going To Down And I Force Run Restart Httpd

Oct 22, 2007

i ask of cpanel.net that why : my apache any 1h going to down and i force run restart httpd

cpanel :
Howdy,

This is occurring because your server is consistently hitting the maximum
allowed concurrent connection limit, defined by MaxClients in httpd.conf:

[root@part7 ~]# grep MaxClient /usr/local/apache/logs/error_log | tail -5
[Mon Oct 22 13:07:46 2007] [error] server reached MaxClients setting, consider
raising the MaxClients setting
[Mon Oct 22 13:32:03 2007] [error] server reached MaxClients setting, consider
raising the MaxClients setting
[Mon Oct 22 14:03:29 2007] [error] server reached MaxClients setting, consider
raising the MaxClients setting
[Mon Oct 22 14:16:07 2007] [error] server reached MaxClients setting, consider
raising the MaxClients setting
[Mon Oct 22 16:48:36 2007] [error] server reached MaxClients setting, consider
raising the MaxClients setting
[root@part7 ~]#

You will need to adjust this setting to a value which better accommodates your
server to prevent any further downtime.

View 5 Replies View Related

Apache Does Not Restart After Editing Httpd.conf

Jun 12, 2009

I am having a problem on my VPS. I am running the latest version of Apache on Windows Server 2K3, and after editing httpd.conf to allow virtual hosts (#Include /conf/extra/httpd-vhosts.conf) and trying to restart the service, an error appears saying the operation failed.

I have even tried restarting/starting the service via services.msc

If I am not using the default httpd.conf Apache will not restart at all... it is very strange. I have also tried doing a repair of the installation of Apache.

View 11 Replies View Related

Speed Of Page Loading Goes Down Some Minutes After Httpd Restart

Nov 22, 2007

Recently we have launched our new cpanel server, We have some problems on that.

When we restart httpd, all things will be good before 15 min, but after that, speed goes down to 1/10 and after some hours that will get as low as nobody can view pages on the server.

We are using cPanel latest release and CSF on CentOS4.5.

Apache 1.3.7 and PHP4.4.7 is running on the server with Zend.

View 6 Replies View Related

Apache Stops Working And Have To Restart The Httpd Service

Jul 21, 2014

Out of nowhere apache stops working, and I have to restart the httpd service that restablesca

The message it throws is "Service Unavailable"

The server is a CentOS Linux Centos 6.5

It has 24 cores and 24 GB RAM

These are the values ​​that I have in httpd.conf

Timeout 60
KeepAlive Off
MaxKeepAliveRequests 100
KeepAliveTimeout 15

[Code]....

View 3 Replies View Related

SQL Server Using Maxmimum Httpd Connection On My Httpd Server

Feb 6, 2007

i am using seperate server for sql .But my httpd server failed many time when i checked maximum number of httpd connection then my sql server using too many connection what is the reason of this problem . Is my sql server using as a slave in a ddos attack or sql server need http connection?

View 2 Replies View Related

Will This HDD Fail

Jun 13, 2008

My messages log is full of such type of messages:

... smartd[2493]: Device: /dev/sda, 5 Currently unreadable (pending) sectors
... smartd[2493]: Device: /dev/sda, 5 Offline uncorrectable sectors
... smartd[2493]: Device: /dev/sda, 5 Currently unreadable (pending) sectors
... smartd[2493]: Device: /dev/sda, 5 Offline uncorrectable sectors

I run: smartctl --all -d ata /dev/sda2
and got this table:

Code:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
1 Raw_Read_Error_Rate 0x000f 118 093 006 Pre-fail Always - 195271338
3 Spin_Up_Time 0x0003 094 094 000 Pre-fail Always - 0
4 Start_Stop_Count 0x0032 100 100 020 Old_age Always - 48
5 Reallocated_Sector_Ct 0x0033 100 100 036 Pre-fail Always - 0
7 Seek_Error_Rate 0x000f 084 060 030 Pre-fail Always - 259244139
9 Power_On_Hours 0x0032 090 090 000 Old_age Always - 9516
10 Spin_Retry_Count 0x0013 100 100 097 Pre-fail Always - 0
12 Power_Cycle_Count 0x0032 100 100 020 Old_age Always - 51
187 Unknown_Attribute 0x0032 087 087 000 Old_age Always - 13
189 Unknown_Attribute 0x003a 100 100 000 Old_age Always - 0
190 Unknown_Attribute 0x0022 056 044 045 Old_age Always In_the_past 740163628
194 Temperature_Celsius 0x0022 044 056 000 Old_age Always - 44 (Lifetime Min/Max 0/14)
195 Hardware_ECC_Recovered 0x001a 067 049 000 Old_age Always - 145805438
197 Current_Pending_Sector 0x0012 100 100 000 Old_age Always - 5
198 Offline_Uncorrectable 0x0010 100 100 000 Old_age Offline - 5
199 UDMA_CRC_Error_Count 0x003e 200 200 000 Old_age Always - 0
200 Multi_Zone_Error_Rate 0x0000 100 253 000 Old_age Offline - 0
202 TA_Increase_Count 0x0032 100 253 000 Old_age Always - 0

Machine freezes several times a day.

I have this machine with FDCservers. They kindly replaced power supply but I'm worrying that it's not caused by power supply but HDD.

take a look at table and let me know your opinion.. Is this HDD ok or will it fail soon ?

View 3 Replies View Related

DNS Fail-Over

Oct 22, 2007

way to get a complete DNS Fail-Over solution for my website.

Currently I'm hosted at one Hosting Facility in NY, and I'm thinking on getting a backup location either in TX or CA but my biggest problem is visitors as even If I will get the secondary location and set the TTL to 10-20min some ISPs are caching the ip address for 24hrs, so even If I will change the IPs from the old range to the new, some ISP's around the world will still cache the old IP and the visitors will get nowhere in case the main location has an issue.

And I was wondering if there’s a way to send people to one direct IP let’s say 1.2.3.4 and from there to load the pages / db or mask there connection under the domain name to a different location without them noticing it so the SSL certificate wont produce error messages.

As I'm sure that Yahoo, CNN and other major websites don’t use one web server for accept connections all over the world to their websites.

View 7 Replies View Related

FTP Fail.

Nov 19, 2007

My server getting huge number of anonymous user.

Even I had disabled anonymous login at the WHM.

When the max user reach it will make the ftp fail and restart.

It usually reach max user within a 5 to 10 minute.

How to block this?

View 10 Replies View Related

Redundancy DNS Fail

Oct 7, 2006

what happens when I have 2 DNS servers on my domain and 1 fails?
around 50% of the access fails... or they detect DNS timeout and try the other one, so 50% of the access would just take more time?

View 2 Replies View Related

CentOS Yum Fail

Apr 12, 2009

cpanel tech staff say my server

---------------

in a broken state halfway upgraded from centos 4 to centos 5. You'll need to either complete the update to centos 5 or revert to centos 4. Easyapache and some other cPanel functions require that yum be working, but "yum update" on your server currently fails due to the mix of centos 4 and 5 rpm's you have installed

---------------

i want to ask how can i fix the issue?

because i run "yum update",it fail.

View 4 Replies View Related

Yum Install Always Fail

Jan 27, 2008

i try to install packages using yum, but at the end yum always say nothing to do

Reading repository metadata in from local files
Parsing package install arguments
Nothing to do

OS centos 5

View 5 Replies View Related

Speakeasy = Fail

Aug 29, 2008

So speakeasy decided to jump on the dedicated server business, and I tried them. My recommendation: Do not sign up for a dedicated server with them - that is unless you want to wait more than a month on your server (took them 35 days) in which they will lie to you and make up excuses for why they take so long. Then once they set up your server, expect it to get piss poor bandwidth and not function properly. The customer service takes 72+ hours to respond 10% of the time. The other 90% they don't respond at all. My sales rep apologized more than 15 times to me in the 35 day period I waited on my server claiming they are "new to the managed services business." This was more than obvious - I basically handed them $600 and got a worthless piece of junk which sat idle for 30 days in return.

View 3 Replies View Related

Ban After X Time Fail

Dec 26, 2007

I have APF and Brute Force install on the server how can i set so if the same IP try to login ssh 5 consecutive time and it fail it will be ban.

View 4 Replies View Related

[cPanel]: "httpd Not Running, Trying To Start" And "httpd Could Not Be Started"

Sep 1, 2007

I trying:

Code:
[root@serwer /]# httpd restart
/usr/sbin/httpd restart: httpd not running, trying to start
/usr/sbin/httpd restart: httpd could not be started

Code:
[root@serwer /]# /etc/rc.d/init.d/httpd configtest
Syntax OK
Help

View 7 Replies View Related

Liquidweb - Migraiton FAIL

Oct 8, 2009

I am only writing this post here because I used webhosting talk to research my recent purchase of a dedicated server with liquidweb.

I have been a happy liquidweb VPS customer for the last year and have grown my business with them. Last week I decided to upgrade from a VPS to a dedicated server and that is where things went wrong.

Stefan in sales was nice in taking my order and had my new server setup in very little time. I got an email that everything had been migrated and they would do the cut over Friday morning.

Friday morning I awoke to phone calls from my clients saying they were not getting emails, their site was down, etc.

I do some initial research and find out that liquidweb sold me a new dedicated server with old used dirty ip addressees that were blocked by ATT / sbcglobal / pacbell. To compound this problem a week later and three ip changes all of which were blocked I am still being blocked and on their blacklist. See below for list of other problems.

I was transferred to Bret my account manager who has done nothing for me and hung up on me through web today while pleading with him to get someone to help me.

I can only talk to a support supervisor and no one will let me talk to a real manager. I went on vacation to Boston this week and have been dealing with these issues the entire time.

I feel like I have been pawned off and shuffled around from person to person and can not get my issues resolved.

And to throw salt on the wound they billed $209 for a $159 server and then charged me a seperate $10 for 2 days from last month. Stefan assured me this transfer would be done at the end of the month so there would be no additional charges. Another lie.

Below is the short list of all the issues I have had with liquid web over that last since my migration.

Mysql databases were copied over

Email forwarders were not copied over

Email was being blocked by ATT/SBC/Pacbell

SPF records were not copied over

A records were not copied over

They sold me a new server with old drity blacklisted ip addresses.

After three sets of ip addresses I am still being blocked.

I was billed for both my old VPS and my new server when stefan the sales agent told me it would be a seamless migration and I would be billed for the server starting next month.

Can never talk to the same person twice. Have talked to about 20 people total over the talk week no one will take responsibility to get my issues resolved.

Can anyone recommend a fully managed dedicated server that will handle my migration with care and take responsibility when issues arise.

View 14 Replies View Related

SAN - Fail Over / High Availability

Sep 24, 2009

we are currently planning to implement SAN to our enviroment - VPS hosting.

Al VPS should be placed on the SAN - iSCSI connected to be able live motion etc.

Currently we are fighting with idea of Failover/High avalability.
There has been rumors that dual controller SAN from HP/DELL are much more problematic than single controller versions.

We are also thinking about running some opensource like OpenFiler/FreeNAS/OpenSolaris or NexentaStore on supermicro boxes with SATA or single RAID controller.

But in that case - how make the iSCSI target highly available? Mirroring of the data/space is pretty easy with DRBD or ZFS but when one SAN box goes down, there should be no interruption in iSCSI targe service - no IP change etc..

View 10 Replies View Related

Fail: (regarding Email Accounts)

Apr 5, 2008

I know I have seen a command line you can use which will activate :fail: in all the accounts on the server simultaneously so that you don't have to do each account separately, but I can't find that command.

Does anyone here know what that command is? I'm assuming it would involve /etc/valiases/?

View 4 Replies View Related

Restore Data From HDD Fail

Feb 23, 2008

I have OS fail , now im install new OS on new HDD, how can i mount and get data from fail hdd ?

Here is info:

[root@server-210-245-124-170 ~]# fdisk -l

Disk /dev/sda: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 1971 15727635 83 Linux
/dev/sda3 1972 3929 15727635 83 Linux
/dev/sda4 3930 30401 212636340 5 Extended
/dev/sda5 3930 9151 41945683+ 83 Linux
/dev/sda6 9152 13067 31455238+ 83 Linux
/dev/sda7 13068 14111 8385898+ 82 Linux swap / Solaris
/dev/sda8 14112 14372 2096451 83 Linux
/dev/sda9 14373 30401 128752911 83 Linux

Disk /dev/sdb: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdb1 * 1 30401 244196001 8e Linux LVM

Disk /dev/sdc: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdc1 * 1 13 104391 83 Linux
/dev/sdc2 14 30401 244091610 8e Linux LVM
[root@server-210-245-124-170 ~]#

/dev/sdc is old HDD with OS failed. I wanna mount is and all data to /oldroot folder for copy and restore data.

View 10 Replies View Related

Proftpd Fail On Start

Oct 6, 2007

I wanted to upgrade proftpd and dit this.

I followed an how-to on directadminforums:

Code:
cd /usr/local/directadmin/customapache/
wget ftp://ftp.proftpd.org/distrib/source....3.1rc2.tar.gz
tar xzf proftpd-1.3.1rc2.tar.gz
rm -rf proftpd-1.3.1rc2.tar.gz
cd proftpd-1.3.1rc2
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var/run --with-modules=mod_ratio:mod_readme:mod_tls
make
make install
perl -pi -e "s/^AuthPAM on/#AuthPAM on/g" /etc/proftpd.conf
/etc/rc.d/init.d/proftpd restart
I changed the proftpd-1.3.1rc2 version to the newest version of proftpd.org

When I run /etc/init.d/proftpd start, I get the following:

Code:
Starting proftpd: - mod_tls/2.1.2: compiled using OpenSSL version 'OpenSSL 0.9.7k 05 Sep 2006' headers, but linked to OpenSSL version 'OpenSSL 0.9.7a Feb 19 2003' library
- Fatal: unable to load module 'mod_tls.c': Operation not permitted
[FAILED]

View 4 Replies View Related

Fail To Connect To Mailservers

Mar 16, 2007

I have this server with no control panel and dnsreport could not connect to mailservers on all my domains. But the server can send out emails because I'm receiving logwatch emails, etc. I'm also using dnsmadeeasy for my nameservers.

Quote:

ERROR: I could not complete a connection to any of your mailservers!

mail.mydomain.com: Timed out [Last data sent: [Did not connect]]

If this is a timeout problem, note that the DNS report only waits about 40 seconds for responses, so your mail *may* work fine in this case but you will need to use testing tools specifically designed for such situations to be certain.

I tried adding the domains on /etc/mail/local-host-names and restart sendmail but the error is still there.

View 0 Replies View Related

FAIL DNS Servers Have A Records

Aug 19, 2007

i make a dns for reseller client by edit it from edit dns zone and i put the two nameserver and with record type A and i point them to the two nameserver ip

but when someone host with him and use that dns he got in the dnsstuff.com that error

FAIL DNS servers have A records

ERROR. One or more of your DNS servers are missing A records (per NS records that may be cached). As a result, they cannot be used. The problem hostnames are:

well i want to know what's the wrong here?

my server CENTOS Enterprise 5 i686 with apache 1.3.37 with whm 11

Another note : this server not running on main site but run only on the dns (two server one domain name )

View 7 Replies View Related







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