Cronjob output :You have no controlling terminal.Can't initialize readline for confirmations. ?

Cronjob output :You have no controlling terminal.Can't initialize readline for confirmations. ?

Post by Cellinc » Fri, 01 Nov 2002 05:19:36



the cron daemon keep emailing this message to a user who has defined a
script to run every 15 minutes.
You have no controlling terminal.Can't initialize readline for
confirmations.
You have no controlling terminal.Can't initialize readline for
confirmations.

I'm really confused. As I know, cron gives this error only when the job
produces output to the screen, but there's no output at all for that
script.( the script itself doesn't generate any output, and I run it by
hand, there is no runtime error neither). The more strange thing is I got
this error since I reboot the machine 2 days ago, but with the same script,
I never got this message before. I've restarted cron but still doesn't work.
:-(

Any one has any idea will be appreciated..

 
 
 

Cronjob output :You have no controlling terminal.Can't initialize readline for confirmations. ?

Post by Chris Lawrenc » Fri, 01 Nov 2002 07:14:33



> You have no controlling terminal.Can't initialize readline for
> confirmations.

> I'm really confused. As I know, cron gives this error only when the job
> produces output to the screen, but there's no output at all for that
> script.( the script itself doesn't generate any output, and I run it by
> hand, there is no runtime error neither). The more strange thing is I got
> this error since I reboot the machine 2 days ago, but with the same script,
> I never got this message before. I've restarted cron but still doesn't work.
> :-(

I had one the other day from cron for the first time in two years.
Something like "You have no controlling terminal. Parameter file was not
opened: process aborted".  I have no idea which of the various jobs
generated it nor what it means.  It's not happened since.  There's
nothing running which requires a display and indeed there is a frame
buffer in the server but it's not used.  There's nothing in cron which
would schedule a job for a one-off either.

--
Regards,
Chris Lawrence

 
 
 

Cronjob output :You have no controlling terminal.Can't initialize readline for confirmations. ?

Post by Anthony Greau » Fri, 01 Nov 2002 07:21:11



Quote:> the cron daemon keep emailing this message to a user who has defined a
> script to run every 15 minutes.
> You have no controlling terminal.Can't initialize readline for
> confirmations.
> You have no controlling terminal.Can't initialize readline for
> confirmations.

> I'm really confused. As I know, cron gives this error only when the job
> produces output to the screen, but there's no output at all for that
> script.( the script itself doesn't generate any output, and I run it by
> hand, there is no runtime error neither). The more strange thing is I got
> this error since I reboot the machine 2 days ago, but with the same
script,
> I never got this message before. I've restarted cron but still doesn't
work.
> :-(

> Any one has any idea will be appreciated..

Try to add "cat /dev/null |" in the crontab :
X X X X X* cat /dev/null | /your/script

If it does not work, try to source a dot file in the script :
    #!/bin/yourshell
    source .file  (.profile or .cshrc or what you want depending oin your
shell)
to force your script to use variable in the forked shell

HTH
Anthony

 
 
 

Cronjob output :You have no controlling terminal.Can't initialize readline for confirmations. ?

Post by Barry Margoli » Fri, 01 Nov 2002 09:56:45




>the cron daemon keep emailing this message to a user who has defined a
>script to run every 15 minutes.
>You have no controlling terminal.Can't initialize readline for
>confirmations.
>You have no controlling terminal.Can't initialize readline for
>confirmations.

The cron job is running an application that makes use of the readline
library when it needs input from the user.  This library allows the user to
perform Emacs-style input editing (like most modern shells also allow).  It
only works when used from a terminal.

--

Genuity, Woburn, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.

 
 
 

Cronjob output :You have no controlling terminal.Can't initialize readline for confirmations. ?

Post by Cellinc » Sat, 02 Nov 2002 00:09:18


Thanks for all the replies, but the problem is still there :-(
In the script I've already put lines like
export PATH= xxxxxx;
source $HOME/etc/.agent2 > /dev/null

and in the crontab, I tried to direct the output to /dev/null by
* * * * * /dir/script > /dev/null
I also tried to direct the output to a log file by
 * * * * * /dir/script > /dir/scritp_log (nothing was logged to the file at
all)
but none of them worked.

Barry,
I'm not very clear of your point, could you please explain to me usually
what kind of bash command will "makes use of the readline library" and so
produce the error? Because the script doesn't require input from  user.
Thanks


Quote:> the cron daemon keep emailing this message to a user who has defined a
> script to run every 15 minutes.
> You have no controlling terminal.Can't initialize readline for
> confirmations.
> You have no controlling terminal.Can't initialize readline for
> confirmations.

> I'm really confused. As I know, cron gives this error only when the job
> produces output to the screen, but there's no output at all for that
> script.( the script itself doesn't generate any output, and I run it by
> hand, there is no runtime error neither). The more strange thing is I got
> this error since I reboot the machine 2 days ago, but with the same
script,
> I never got this message before. I've restarted cron but still doesn't
work.
> :-(

> Any one has any idea will be appreciated..

 
 
 

Cronjob output :You have no controlling terminal.Can't initialize readline for confirmations. ?

Post by Barry Margoli » Sat, 02 Nov 2002 01:05:34




>I'm not very clear of your point, could you please explain to me usually
>what kind of bash command will "makes use of the readline library" and so
>produce the error? Because the script doesn't require input from  user.
>Thanks

Try putting "set -x" at the beginning of the script.  This will cause it to
print out all the commands as they're executed, so you'll see what command
was started just before the error message was produced.  That command will
be your culprit.

--

Genuity, Woburn, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.

 
 
 

Cronjob output :You have no controlling terminal.Can't initialize readline for confirmations. ?

Post by Barry Margoli » Sat, 02 Nov 2002 01:04:04




>Thanks for all the replies, but the problem is still there :-(
>In the script I've already put lines like
>export PATH= xxxxxx;
>source $HOME/etc/.agent2 > /dev/null

>and in the crontab, I tried to direct the output to /dev/null by
>* * * * * /dir/script > /dev/null
>I also tried to direct the output to a log file by
> * * * * * /dir/script > /dir/scritp_log (nothing was logged to the file at
>all)
>but none of them worked.

It's trying to perform *input*, not output.

Quote:>Barry,
>I'm not very clear of your point, could you please explain to me usually
>what kind of bash command will "makes use of the readline library" and so
>produce the error? Because the script doesn't require input from  user.
>Thanks

It all depends on what programs the script runs.  AFAIK, this isn't a
standard feature of most programs, so the script is probably running
something unusual that uses readline.  Maybe it only asks for user input in
certain circumstances, but it initializes the library just in case.

--

Genuity, Woburn, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.

 
 
 

Cronjob output :You have no controlling terminal.Can't initialize readline for confirmations. ?

Post by Cellinc » Sun, 03 Nov 2002 03:33:15


Thanks Barry, I've added the "set -x" to the script and found out the error
came out after a ssh command. I extract that command to run by hand, nothing
unusual. I've set up ssh-agent for the user and to keep ssh quiet, I am
using
ssh -q -S -n $HOST $COMMAND,
So it shouldn't require any input or output.
Actually I have an identical script running on another server which doesn't
cause the error message. But if I copy that script to this machine, it also
complains. Because this began after the reboot, I doubt it's something
relative to the server's configuration.




> >I'm not very clear of your point, could you please explain to me usually
> >what kind of bash command will "makes use of the readline library" and so
> >produce the error? Because the script doesn't require input from  user.
> >Thanks

> Try putting "set -x" at the beginning of the script.  This will cause it
to
> print out all the commands as they're executed, so you'll see what command
> was started just before the error message was produced.  That command will
> be your culprit.

> --

> Genuity, Woburn, MA
> *** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to
newsgroups.
> Please DON'T copy followups to me -- I'll assume it wasn't posted to the

group.
 
 
 

Cronjob output :You have no controlling terminal.Can't initialize readline for confirmations. ?

Post by Barry Margoli » Sun, 03 Nov 2002 04:22:43




>Thanks Barry, I've added the "set -x" to the script and found out the error
>came out after a ssh command. I extract that command to run by hand, nothing
>unusual. I've set up ssh-agent for the user and to keep ssh quiet, I am
>using
>ssh -q -S -n $HOST $COMMAND,
>So it shouldn't require any input or output.
>Actually I have an identical script running on another server which doesn't
>cause the error message. But if I copy that script to this machine, it also
>complains. Because this began after the reboot, I doubt it's something
>relative to the server's configuration.

I'm not sure why a reboot would affect the behavior of ssh.  It sounds more
like ssh was built differently; the version on this machine apparently uses
readline (even when -n is used to disable any input).

--

Genuity, Woburn, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.

 
 
 

Cronjob output :You have no controlling terminal.Can't initialize readline for confirmations. ?

Post by Cellinc » Sun, 03 Nov 2002 07:19:25


Hi Barry,

I stoped the complain by adding a "&"(put to background) in the crontab.
* * * * * /dir/script &> /dir/log
And the error message stops. Still nothing written to the log file.
Thanks very much for all your replies.




> >Thanks Barry, I've added the "set -x" to the script and found out the
error
> >came out after a ssh command. I extract that command to run by hand,
nothing
> >unusual. I've set up ssh-agent for the user and to keep ssh quiet, I am
> >using
> >ssh -q -S -n $HOST $COMMAND,
> >So it shouldn't require any input or output.
> >Actually I have an identical script running on another server which
doesn't
> >cause the error message. But if I copy that script to this machine, it
also
> >complains. Because this began after the reboot, I doubt it's something
> >relative to the server's configuration.

> I'm not sure why a reboot would affect the behavior of ssh.  It sounds
more
> like ssh was built differently; the version on this machine apparently
uses
> readline (even when -n is used to disable any input).

> --

> Genuity, Woburn, MA
> *** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to
newsgroups.
> Please DON'T copy followups to me -- I'll assume it wasn't posted to the

group.
 
 
 

Cronjob output :You have no controlling terminal.Can't initialize readline for confirmations. ?

Post by Barry Margoli » Sun, 03 Nov 2002 07:55:50




>Hi Barry,

>I stoped the complain by adding a "&"(put to background) in the crontab.
>* * * * * /dir/script &> /dir/log
>And the error message stops. Still nothing written to the log file.
>Thanks very much for all your replies.

The correct syntax is

/dir/script > /dir/log &

--

Genuity, Woburn, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.

 
 
 

Cronjob output :You have no controlling terminal.Can't initialize readline for confirmations. ?

Post by Cellinc » Tue, 05 Nov 2002 23:28:09


Thanks very much Barry :-)




> >Hi Barry,

> >I stoped the complain by adding a "&"(put to background) in the crontab.
> >* * * * * /dir/script &> /dir/log
> >And the error message stops. Still nothing written to the log file.
> >Thanks very much for all your replies.

> The correct syntax is

> /dir/script > /dir/log &

> --

> Genuity, Woburn, MA
> *** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to
newsgroups.
> Please DON'T copy followups to me -- I'll assume it wasn't posted to the

group.
 
 
 

1. Cronjob, confirmation via e-mail

Hi Guys!

I have a cronjob running every 3 minut as root, on solaris 2.6

Since this crontab confirmation send a lot of e-mail for cron status, I
have assigned > dev/null to stop all the e-mail, but the e-mail is still
going out and fill up the root mailbox. How can i write this command so
there is no mail send out when cronjob is running?

The crontab look like this:

0,30 * * * * /opt/ESHAxpres/servers/./expressions 167.159.121.56 >
/dev/null

Best Regards / Tomas!

2. Corel Linux installatiom problem

3. initializing a variable and simultaneously keeping terminal output

4. Remote LPD printer and filters

5. Changing Serial Nos using 'brand'

6. Red Hat 6.2 install freezes

7. Output confirmation in a script

8. adding sol8 to win2k bootloader?

9. System won't boot: Error message can't get /dev/console for controlling terminal

10. setsid and streams/device driver output to controlling terminal

11. It's not bad canned meat...

12. append date to output of a cronjob file

13. CronJob is Mailing Output?