Koozali.org: home of the SME Server

Automatic server reboot?

jeffco01

Automatic server reboot?
« on: June 05, 2006, 03:11:03 PM »
Hello,

I've spent the last hour searching for an answer to this question, but found nothing. I'm hoping someone could help?

How would I set up a cron job to automatically reboot my server once, or even twice, daily?

Sometimes everybody on our network loses the ability to surf the net... for instance, they select a page from their "favorites" list and, almost instantly, they get a 404 error.  It's so instant that I can't believe there was time to actually try the page before giving the error.

Point is, a server reboot seems to correct this. I don't suppose it hurts to reboot and "clear it's mind" once in a while, anyway.

I'm running SME7 rc2, in Server/Gateway mode, on a dual PIII/550MHz machine with 1GB of ECC RAM. I wouldn't think it would get bogged down that easily.

I don't like to just dive in and start messing with things without first asking the experts advice. Even if this isn't the "fix", I'd still like to have the server reboot itself.

Thank you for any help you could give.
Jeffrey

Offline Jáder

  • *
  • 1,099
  • +0/-0
    • LinuxFacil
auto server reboot
« Reply #1 on: June 06, 2006, 12:34:28 PM »
Jeff

In linux world server reboot is a last resort measure. :)
SO I'd like to help you to diagnose your server so a reboot is never needed.


Please let me know:
How much expertise do you have in server/linux/microsoft?
How comfortable do you are in change settings on your server?
Is a production server?
how many users connected on this server?
how do you have it connected to computers?
how much disk space do you have available?

I've seen most of internet failures to be squid related.
Even if SMB still works!
VERY OFTEN that's because the squid.log file reaching 2GB limit.
If this is your problem you can stop squid, touch squid.log  and restart it.

Keep in touch.

If your problem isn't hardware (and it do not appears to be!) we'll solve it... FAST!

Regards

Jáder

If you need more help (or help more quickly) you can gtalk with me (jader.marasca) or MSN me : jader31 AT  terra DOT com DOT br
...

Offline raem

  • *
  • 3,972
  • +4/-0
Re: Automatic server reboot?
« Reply #2 on: June 06, 2006, 01:11:45 PM »
jeffco01

> I've spent the last hour searching for an answer to this question....

Where were you searching ?
The obvious place to start is your log files.
See server manager, view log files, select messages log file

You can also view all the other log files to look for clues eg squid & http.
Make a note of what time the problem happens and look in your log files prior to the problem occurring.



> How would I set up a cron job to automatically reboot my server once, or even twice, daily?

That should not be necessary, but search these forums & web site & user contribs area for a cron manager contrib that should help you.
The command you want to schedule is
/sbin/e-smith/signal-event reboot


> ..running SME7 rc2, Server/Gateway, dual PIII/550MHz with 1GB of RAM

Has this machine been performing without problem or has it always had this problem ?
Check hardware compatibility also.

As sme 7 is still not final then bugs can still happen. The next step would be to submit a bug report to bugzilla, see the link on left.
...

jeffco01

Re: auto server reboot
« Reply #3 on: June 06, 2006, 04:26:50 PM »
Quote from: "jader"
Please let me know:
How much expertise do you have in server/linux/microsoft?
How comfortable do you are in change settings on your server?
Is a production server?
how many users connected on this server?
how do you have it connected to computers?
how much disk space do you have available?


Thank you, Jader, for offering to help.
As to your first set of questions...
Most all of my expertise is in the server/microsoft area. (but it only took about 5 minutes of using Linux for me to see the error, and much wasted time, of my ways!)
2) I am very comfortable with working in a command line enviroment. Just not very familiar with Linux... yet.
3&4) Semi-Production. I have 6 people that I have routed through this server in order to help put it to the test. Everyone else is still on my mail server.
5)Setup is like this; Internet entering the SME box, in Gateway/Server mode. Out of SME box and into a wireless router. Ther router is set to use DHCP for all connections.From there, various Desktop and Laptop systems are served.
6) With RAID set as I have it (using 5 9.1GB SCSI drives) a bit over 26GB's available.

Quote from: "jader"
I've seen most of internet failures to be squid related.
Even if SMB still works!
VERY OFTEN that's because the squid.log file reaching 2GB limit.
If this is your problem you can stop squid, touch squid.log  and restart it.


I will try this. But I'm not sure what you mean by "touch squid.log"? Do you mean for me to have a look in it after stopping squid?

Never mind that last line. I just looked up "touch" and now I get it! :oops: So I came back, edited and edited this note. :-D

After looking through my logs I found instances, that always coincided with the troubles I'm having, in the DNSCACHE/CURRENT.log. These are listed as "ServFails". A search, in the forums, for this turned up the following thread...

http://forums.contribs.org/index.php?topic=25403.0

I found no real help on this, though. Any thoughts?
Again, thank you Jader.

Quote from: "RayMitchell"
Where were you searching ?
The obvious place to start is your log files.
See server manager, view log files, select messages log file


Ray, Thank you too for helping out.
I was searching these forums. I do look through my logs, but what I was searching for was how to setup the command... /sbin/e-smith/signal-event reboot ( which I already knew, but thank you)... into a cron job so that I could have my server reboot at a given time.

Quote from: "RayMitchell"
You can also view all the other log files to look for clues eg squid & http.
Make a note of what time the problem happens and look in your log files prior to the problem occurring.


I've done this and, as I mentioned above, It seems to be related to the "ServFail" errors.

Quote from: "RayMitchell"
Has this machine been performing without problem or has it always had this problem ?


Just after the install of SME7 rc2 is the first time for me to run into this problem on this server... or any of my servers, for that matter.

Any ideas/help will be appreciated.

Thank you!
Jeffrey

jeffco01

Automatic server reboot?
« Reply #4 on: June 06, 2006, 09:05:37 PM »
I just had another one of these "episodes", and received an error page. I searched through the logs and wanted to list everything here and get opinions/help.
I'm not sure if this is a bug, or just something not configured right on this server, so I'm hesitant to fill out a bug report... at least until you smarter-than-me guys let me know what you think???
When this happens, all internet surfing comes to a halt. And it can't be that the webpage is somehow set up wrong, or is otherwise inaccessable. I get this sometimes while I'm trying to view this forum. After a reboot, I can go to every site that, just before the reboot, was giving me errors.

Here's everything;

Quote from: "error page"
The requested URL could not be retrieved

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

While trying to retrieve the URL:

http://www.americanmusical.com/sort--Eden-Nemesis-Series--m-668_937_944--src-N0603VN0E060605H-_-c

m_mmc-_-ven-Newsletter-_-060605-_-StandardHTML-_-Eden-Nemesis-Series.html

The following error was encountered:

Unable to determine IP address from host name for www.americanmusical.com
The dnsserver returned:

Server Failure: The name server was unable to process this query.
This means that:

 The cache was not able to resolve the hostname presented in the URL.
 Check if the address is correct.
Your cache administrator is admin@server.com.



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

Generated Tue, 06 Jun 2006 18:13:49 GMT by server.server.com (squid/2.5.STABLE6)

Quote from: "the squid access log"
1149617629.156  35792 192.168.2.250 TCP_MISS/503 1846 GET

http://www.americanmusical.com/sort--Eden-Nemesis-Series--m-668_937_944--src-N0603VN0E060605H-_-c

m_mmc-_-ven-Newsletter-_-060605-_-StandardHTML-_-Eden-Nemesis-Series.html - NONE/- text/html

Quote from: "squid.pid"
1149617629.156 RELEASE -1 FFFFFFFF 88F83EBC49C5A147DC8D43D0DB3220FE  503 1149617629         0

1149617629 text/html 1537/1774 GET

http://www.americanmusical.com/sort--Eden-Nemesis-Series--m-668_937_944--src-N0603VN0E060605H-_-c

m_mmc-_-ven-Newsletter-_-060605-_-StandardHTML-_-Eden-Nemesis-Series.html

Quote from: "dnscache/current"
2006-06-06 11:13:23.366599500 query 1362 c0a80201:8002:32b1 1 www.americanmusical.com.
2006-06-06 11:13:23.366717500 tx 0 1 www.americanmusical.com. . 7f000002
2006-06-06 11:13:29.047701500 query 1363 c0a80201:8002:32b1 1 www.americanmusical.com.
2006-06-06 11:13:29.047797500 tx 0 1 www.americanmusical.com. . 7f000002
2006-06-06 11:13:37.112737500 servfail www.americanmusical.com. input/output error
2006-06-06 11:13:37.113127500 sent 1362 41
2006-06-06 11:13:37.113189500 query 1364 c0a80201:8002:ebca 1 www.americanmusical.com.
2006-06-06 11:13:37.113239500 tx 0 1 www.americanmusical.com. . 7f000002
2006-06-06 11:13:40.069760500 servfail www.americanmusical.com. input/output error
2006-06-06 11:13:40.070048500 sent 1363 41
2006-06-06 11:13:48.134440500 servfail www.americanmusical.com. input/output error
2006-06-06 11:13:48.134767500 sent 1364 41
2006-06-06 11:13:48.134890500 query 1365 c0a80201:8002:2248 1 www.americanmusical.com.
2006-06-06 11:13:48.134947500 tx 0 1 www.americanmusical.com. . 7f000002
2006-06-06 11:13:59.155159500 servfail www.americanmusical.com. input/output error
2006-06-06 11:13:59.156935500 sent 1365 41


Sorry to make this post so long, but I wanted to include everything that I could find. I just hope that it's more of a help on this than a nuisance.
Thank you all for the timeand the help!
Jeffrey

Offline Mangetout

  • *
  • 22
  • +0/-0
Re: auto server reboot
« Reply #5 on: June 07, 2006, 02:18:56 AM »
Quote from: "jeffco01"
5)Setup is like this; Internet entering the SME box, in Gateway/Server mode. Out of SME box and into a wireless router. Ther router is set to use DHCP for all connections.From there, various Desktop and Laptop systems are served.
Could it be that your SME server installation is also trying to act as a DHCP server for the network and that the competition between this and the service provided by the router is causing the loss of connection - I can see that it might, if, for example, the two DHCP services are dishing out addresses in different subnets.

Offline raem

  • *
  • 3,972
  • +4/-0
Automatic server reboot?
« Reply #6 on: June 07, 2006, 06:02:30 AM »
jeffco01

> Unable to determine IP address from host name for
> www.americanmusical.com
> The dnsserver returned:
> Server Failure: The name server was unable to process this query.

Look in server manager Review configuration panel.
what is the IP setting for DNS server, is it the same as your servers local IP ?

Also check if the DHCP server setting is "enabled", it should be disabled if you are using your router as described

You should only have one DHCP server on your network, in your case the router.
Is there a reason for the router being the DHCP server rather than the sme server ?
...

Offline raem

  • *
  • 3,972
  • +4/-0
Re: auto server reboot
« Reply #7 on: June 07, 2006, 06:05:44 AM »
jeffco01

>...but what I was searching for was how to setup the command... /sbin/e-smith/signal-event reboot ... into a cron job....

As suggested already, look for the cron manager. See this link for details

http://forums.contribs.org/index.php?topic=24486.0
...