Mail Archives: cygwin/2009/06/09/17:08:10
--- On Tue, 6/9/09, Pierre A. Humblet <Pierre DOT Humblet AT ieee DOT org> wrote:
> From: Pierre A. Humblet <Pierre DOT Humblet AT ieee DOT org>
> Subject: Re: Cron jobs stopped working : can't lock cron.pid .. Resouce t=
emporarily unavailable
> To: "sam naqvi" <email_amn AT yahoo DOT com>, cygwin AT cygwin DOT com
> Date: Tuesday, June 9, 2009, 11:45 AM
>=20
> ----- Original Message -----=20
> From: "sam naqvi" <>
> To: <cygwin AT cygwin DOT com>
> Sent: Tuesday, June 09, 2009 11:48 AM
>=20
>=20
> |i had setup some cron jobs on cygwin last Friday. a few of
> them were test scripts to see if the
> cron is firing smoothly on the right time without errors.
> And there were some actual scripts
> too.
> | It was working fine on Friday, giving output to all the
> test scripts at correct times.
> |
> | however, it did not work for the jobs that it had to run
> over the weekend. in fact, now, it
> does not even run the test scripts.
> |
> | an error that i could locate in var/log/Cygwin\
> cron.log=A0 file is as follows:
> | /usr/sbin/cron: can't lock /var/run/cron.pid, otherpid
> may be 9556: Resource temporarily
> unavailable
> | please see the attachment for details.
> |
> | i have gone through the cygwin mail archives and general
> google search on any similar reported
> problem. this problem looks similar (http://www.cygwin.com/ml/cygwin/2008=
-05/msg00280.html)
> but
> i could not understand what is causing a lock in my case
> and how to fix it. i am a beginner in
> cygwin crons and could not find the problem or the cause of
> it. can someone please help here?
>=20
> ****************
> You are running the cron daemon as SYSTEM on a Windows 2003
> Enterprise Server.
> On such a system the demon cannot change user context
> (setuid), thus the jobs don't run.
>=20
> According to the log, you started using SYSTEM on May 12
> but on May 13 you were able to
> successfully run the daemon under a user named EXSAN.
> However on Jun 5 at 20:34:54
> you reverted to using SYSTEM.... All of that is clearly
> visible in the cronbug.txt file you
> sent us.
>=20
> The message "can't lock /var/run/cron.pid" probably
> indicates that you are trying to start
> a new cron while one is already running.
>=20
> Looks like you are not using cron-config to configure and
> start the daemon.
>=20
> Pierre
>=20
>=20
Thank you for your attention and assistance, Pierce.=20
cron was reinstalled as 'Cygwin cron' service later under 'Local System' ow=
nership so that any local user who has the local admin rights should be abl=
e to have their jobs executed through it. It was to correct an earlier inst=
allation which was user specific (EXSAN, as you pointed out), and which did=
not allow other users (eg, ogbad) to execute their jobs.=20
Even after this installation, it was working fine all that Friday 2009/06/0=
5, when the user ogbad was logged in. this user is a member of Local Admin =
group. however, after (2009/06/05 13:45:02), none of the scheduled jobs exe=
cuted, neither of exsan ownership, nor of ogbad ownership.=20
i did not use cron-config to install, didn't know about it.=20
here is how i installed it again as "Cygwin cron".
----------=20
cygrunsrv --stop "Cron daemon" && cygrunsrv --remove "Cron daemon"
# -- did not work
cygrunsrv --stop cron && cygrunsrv --remove cron
# -- took it quietly
cygrunsrv --stop "Cygwin cron" && cygrunsrv --remove "Cygwin cron"
cygrunsrv -I "Cygwin cron" -p /usr/sbin/cron -a '-D' -e "CYGWIN=3Dntsec"
cygrunsrv --start "Cygwin cron"
cron_diagnose.sh
#-- asked not to install
#-- it found no problems;
----------=20
1. can anyone see please what is locking the cron.pid from (2009/06/05 13:4=
5:02)?
2. do we have to be logged in in order for cron to work?
thank you
AMN
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
- Raw text -