FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu User

 
 
LinkBack Thread Tools
 
Old 12-04-2007, 02:05 PM
Schiz0
 
Default Cron/Sendmail Defunct Processes

Hey everyone,

I'm running Ubuntu 7.10 Server Edition. I have a cron script (
http://pastebin.ca/803903 ). I edited crontab using "crontab -e"
(Running as the ircd user) and added the line (
http://pastebin.ca/805617 ). I have exim4 installed and running (I
have send emails successfully from command line and also php scripts).
It was installed and configured via apt-get and dpkg.

My problem is as follows: When the anope services daemon is not
running, the cron script starts it, and outputs some text (Which I
want to to be emailed to me). But instead of emailing the output to
me, cron opens up defunct zombie processes for sh and sendmail and I
must kill the cron process to get rid of other processes.

The output of "ps -ef" showing the defunct processes is at
http://pastebin.ca/803916
The sendmail process stays there until I kill the "/USR/SBIN/CRON" process.

I tested this by manually stopping the anope services, then waiting 10
minutes for the cron script to run. The cron script runs, and the
services start back up, but I never get the email from the output of
the cron script. The sendmail process that started from cron freezes
up somehow for some reason and becomes a defunct zombie process.

Basically all I want is to be notified with the output of cron. I
don't know if this is a cron problem or a exim4 problem.

I tested this with both the sendmail MTA and the exim4 MTA. They both
did the same exact, which makes me suspect more so that it is some
sort of cron setting that I have misconfigured.

Thank you for everyone's time and responses.
~Schiz0

PS. I also posted this on the ubuntu forums.

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 12-04-2007, 03:31 PM
Adam Funk
 
Default Cron/Sendmail Defunct Processes

On 2007-12-04, Schiz0 wrote:

> Hey everyone,
>
> I'm running Ubuntu 7.10 Server Edition. I have a cron script (
> http://pastebin.ca/803903 ). I edited crontab using "crontab -e"
> (Running as the ircd user) and added the line (
> http://pastebin.ca/805617 ). I have exim4 installed and running (I
> have send emails successfully from command line and also php scripts).

As what user(s)?


> It was installed and configured via apt-get and dpkg.
>
> My problem is as follows: When the anope services daemon is not
> running, the cron script starts it, and outputs some text (Which I
> want to to be emailed to me). But instead of emailing the output to
> me, cron opens up defunct zombie processes for sh and sendmail and I
> must kill the cron process to get rid of other processes.
>
> The output of "ps -ef" showing the defunct processes is at
> http://pastebin.ca/803916
> The sendmail process stays there until I kill the "/USR/SBIN/CRON" process.

I'd suggest trying the following:

* send mail from the command line as the ircd user;

* send mail from a cron job from your normal account.

There might be a configuration issue that prevents the MTA from
handling mail correctly from "non-user" accounts.


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 12-04-2007, 04:42 PM
Schiz0
 
Default Cron/Sendmail Defunct Processes

On Dec 4, 2007 11:31 AM, Adam Funk <a24061@ducksburg.com> wrote:
> On 2007-12-04, Schiz0 wrote:
>
> > Hey everyone,
> >
> > I'm running Ubuntu 7.10 Server Edition. I have a cron script (
> > http://pastebin.ca/803903 ). I edited crontab using "crontab -e"
> > (Running as the ircd user) and added the line (
> > http://pastebin.ca/805617 ). I have exim4 installed and running (I
> > have send emails successfully from command line and also php scripts).
>
> As what user(s)?
>
>
> > It was installed and configured via apt-get and dpkg.
> >
> > My problem is as follows: When the anope services daemon is not
> > running, the cron script starts it, and outputs some text (Which I
> > want to to be emailed to me). But instead of emailing the output to
> > me, cron opens up defunct zombie processes for sh and sendmail and I
> > must kill the cron process to get rid of other processes.
> >
> > The output of "ps -ef" showing the defunct processes is at
> > http://pastebin.ca/803916
> > The sendmail process stays there until I kill the "/USR/SBIN/CRON" process.
>
> I'd suggest trying the following:
>
> * send mail from the command line as the ircd user;
>
> * send mail from a cron job from your normal account.
>
> There might be a configuration issue that prevents the MTA from
> handling mail correctly from "non-user" accounts.
>

The cron script is running in the "ircd" user's crontab. The "ircd"
user is one I added manually, it's not a system user or anything.
The Anope Services are also running under the ircd user.
Exim4 is running by the /etc/init.d/exim4 script. The output of "ps
aux |grep exim" shows that it is running under the "Debian-exim" user.

I've successfully sent emails via php as the apache user, "www-data",
along with my own user account.

I just now sent mail as the ircd user using the following command:
mail -v -s "Testing Mail" my_emailaddy@gmail.com

I typed a quick message, ended with a . on a new line, and after 30
seconds it's in my gmail inbox.

I also did the same thing as my normal user, and it worked perfectly.

Thanks for the reply and time, I appreciate it.

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 12-05-2007, 09:52 AM
Adam Funk
 
Default Cron/Sendmail Defunct Processes

On 2007-12-04, Schiz0 wrote:

> On Dec 4, 2007 11:31 AM, Adam Funk <a24061@ducksburg.com> wrote:
>> On 2007-12-04, Schiz0 wrote:

>> > I'm running Ubuntu 7.10 Server Edition. I have a cron script (
>> > http://pastebin.ca/803903 ). I edited crontab using "crontab -e"
>> > (Running as the ircd user) and added the line (
>> > http://pastebin.ca/805617 ). I have exim4 installed and running (I
>> > have send emails successfully from command line and also php scripts).
...
>> > My problem is as follows: When the anope services daemon is not
>> > running, the cron script starts it, and outputs some text (Which I
>> > want to to be emailed to me). But instead of emailing the output to
>> > me, cron opens up defunct zombie processes for sh and sendmail and I
>> > must kill the cron process to get rid of other processes.
>> >
>> > The output of "ps -ef" showing the defunct processes is at
>> > http://pastebin.ca/803916
>> > The sendmail process stays there until I kill the "/USR/SBIN/CRON" process.

I have one more idea. If the script that you call from the crontab
doesn't terminate (and close its STDOUT), then the sendmail process is
still waiting for its STDIN to finish before sending the mail.

This might also be the case if a process started by the script (the
daemon itself) inherits the script's STDOUT.


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 

Thread Tools




All times are GMT. The time now is 10:41 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org