Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Cron newbie question in Sarge

Posted on 2006-11-27
7
Medium Priority
?
360 Views
Last Modified: 2010-04-20
Hi experts,

Every Sunday at 6:25am, I receive this message in /var/log/apache2/error.log
[Sun Nov 26 06:25:39 2006] [error] Init: Unable to read pass phrase [Hint: key introduced or changed before restart?]

It appears that cron(?) is restarting apache2 once per week, but I don't know how to stop that. I tried #crontab -e, but the cron job is not listed. I also looked in /etc/cron.weekly, but no luck either. I could try keychain, but how do I stop that job?

Other helpful info:
===
#uname -a
Linux 2.4.27-2-386 #1 Wed Aug 17 09:33:35 UTC 2005 i686 GNU/Linux


Thanks!
0
Comment
Question by:sow56091
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
7 Comments
 
LVL 48

Expert Comment

by:Tintin
ID: 18022272
Apache gets restarted as part of the weekly log rotation.  

See /etc/logrotate.d/apache*
0
 
LVL 35

Expert Comment

by:Duncan Roe
ID: 18022332
Probably there is a script in /etc/cron.weekly which is doing it.
The way to stop a script in that dir from running is to remove its execute access:

   chmod a-x {script name}

By way of explanation as to how this works, when you (as root) did  crontab -e, did you notice a line like the one following?

  30 4 * * 0 /usr/bin/run-parts /etc/cron.weekly 1> /dev/null

(That one runs jobs at 0430hrs, yours will be different). /usr/bin/run-parts is a shell script - have a look if you are interested
0
 
LVL 35

Expert Comment

by:Duncan Roe
ID: 18022373
OTOH it could be what Tintin said. Especially seeing you looked in cron.weekly
0
Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

 
LVL 48

Expert Comment

by:Tintin
ID: 18022396
The logrotate is actually invoked daily

/etc/cron.daily/logrotate

If you really want to stop apache from having logs rotated and being restarted (not sure why you'd want to do that), then just remove

/etc/logrotate.d/apache
/etc/logrotate.d/apache-ssl
0
 
LVL 3

Author Comment

by:sow56091
ID: 18029989
Tintin, yes, that is the cause. Thank you!

>>not sure why you'd want to do that
  I have an SSL cert with passphrase, and when Apache2 restarts, it asks me for my passphrase though I'm not available to provide it, causing the web site to go down. I imagine this is a common problem. How would you fix that? My thought was to prevent the restart, but as you've pointed out, that would also affect the log rotation...

0
 
LVL 48

Accepted Solution

by:
Tintin earned 2000 total points
ID: 18030885
Ah, the classic XY problem.

So what you *really* want to do is configure Apache to automatically start your SSL site.  To do this, you need to remove the passphrase from the cert, by doing:

cd /etc/httpd/conf/ssl.key
cp yoursite.key yoursite.crypt
openssl rsa -in yoursite.crypt -out yoursite.key
chmod 400 yoursite*

0
 
LVL 3

Author Comment

by:sow56091
ID: 18143925
thank you Tintin
0

Featured Post

Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Suggested Courses

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question