1855167 Members
4646 Online
104109 Solutions
New Discussion

Re: crontab jobs

 
ajk_2
Advisor

crontab jobs

Dear all,

I created a crontab file. After I run it, it caused an error:

"# Apr 22 05:45:00 D270 sendmail[14129]: unable to qualify my own domain name (D2
70) -- using short name"

What is it? Did I do something wrong?
Thanks for your help!

Best Regards
ajk
17 REPLIES 17
Acer_1
Occasional Advisor

Re: crontab jobs

Hi,sir:
it's nothing about your crontable.
just vi /etc/hosts and add an alias .(hostname)
for example
172.20.5.11 test .test

it will solve the problem

Hope it helps
joseph
Ian Dennison_1
Honored Contributor

Re: crontab jobs

Check sendmail.cf, there should be an entry with D$j and something else. Check what this is set to, and configure it to be the same as your Domain Name for Addressing.

Also check you have configured in the hosts or DNS File for the fully qualified name.

Share and Enjoy! Ian
Building a dumber user
Steve Steel
Honored Contributor

Re: crontab jobs

Hi


or add the name with full domain in the hosts file to each entry needed.

1.2.3.4 test test.donain.x.x


Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
James R. Ferguson
Acclaimed Contributor

Re: crontab jobs

Hi:

This is a 'sendmail' configuration issue, not a 'cron' problem.

If you are using DNS, make sure '/etc/resolv.conf' exists, and includes the line:

domain

for example:
domain your.com

If you are not using DNS, make sure '/etc/hosts' first line reads:



Lastly, set up the Dj$w macro in '/etc/mail/sendmail.cf' and change:

#Dj$w.Foo.com
to read:
Dj$w.

Then add to '/etc/mail/sendmail.cw' and restart 'sendmail':

# /usr/sbin/sendmail stop
# /usr/sbin/sendmail start

Regards!

...JRF...
Magdi KAMAL
Respected Contributor

Re: crontab jobs

Hi ajk,

The error message "unable to qualify my own domain name" is most case is comming from application which need your domain host name for a server like.

Example :
IF your server is "server1", your organisation is "org1" and your country iso code is "fr"
THEN
Your domain host name will be "server1.org1.fr"

and you must put this string as an alias to the TCPIP address of your server "server1" in your /etc/hosts file.


Magdi
Magdi KAMAL
Respected Contributor

Re: crontab jobs

Hi again,

example of your /etc/hosts file will be :


128.102.11.10 server1.org1.fr server1 #my server number one


Magdi
Nagarathinam
Advisor

Re: crontab jobs

The message is nothing to do with cron jobs.
You have some problem with sendmail.
You can do
1) In /etc/hosts add an alias to Your server
2) # /sbin/initd/sendmail stop


Nagarathinam
ajk_2
Advisor

Re: crontab jobs

Hi there,

I changed everything, but it is still happening the same. Please help. Thank you very much!

Best Regards
ajk
Ruediger Noack
Valued Contributor

Re: crontab jobs

Hi,

you need to know your domain name (nslookup D270).
Replace similar JRF's suggestion the dummy domain name Foo.COM with your domain name in sendmail.cf entry Dj$w.
The restart sendmail.

Hope this helps

Ruediger
Deepak Extross
Honored Contributor

Re: crontab jobs

Can you paste your cron job here? Did you try to run the job from the command line?
Steve Post
Trusted Contributor

Re: crontab jobs

This is probably unrelated but.....
Unlike shell, batch, and at, your environment is not set in the cronjob.
As a result maybe there's a variable not set like PATH?
Isn't LOGNAME supposed to be set?
You can set the environment within your program by "sourcing" it in.

#!bin/ksh
. /myhome/.profile
< my script text goes here >




Hai Nguyen_1
Honored Contributor

Re: crontab jobs

Try to run the command in the crontab at the command prompt as the same user to see if you run into the same error. If not, then there is some difference in environment settings (run "env" to study the working environment and post its output if you need help spot the root cause.)

Hai
benoit Bruckert
Honored Contributor

Re: crontab jobs

THe trouble is that your cron job generate an output to stdout or stderr.
As it's run in background, then an email is sent to the crontab's owner.
and the mail command is using sendmail.cf to define headers of the mail.
2 ways to solve it :
1 - redirect output (stdout and stderr) of you cronjob to logfiles. Then you can check theses log files. sendmail is not used in this case.
2 - use the standard way (I.E. sendmail) then change Dj as described by others, and use the mail command (as crontab's owner) to see the outputs.

Once you will know what are theses outputs, you can redirect/manage them.

regards
Benoit
Une application mal pansée aboutit à une usine à gaze (GHG)
ajk_2
Advisor

Re: crontab jobs

15 10 * * * ls /tmp >> /tmp/ls.log
07 17 * * * sh /home/isdlun/abc.sh

This is my cron jobs, very simple. I did change the Dj$w to D270, but nothing changed. Please help! Thanks!

Best Regards
ajk
Deepak Extross
Honored Contributor

Re: crontab jobs

now, what does
cat /home/isdlun/abc.sh
show?
ajk_2
Advisor

Re: crontab jobs

In the file abc.sh:

echo testing!
Deepak Extross
Honored Contributor

Re: crontab jobs

Doesn't look like the error is related to your cron jobs.
When exactly do you get the error? Is it at 10:15 / 17:07 everyday? Any idea what triggers off this error?