Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I had set my cron job but I was not getting any output via mail. I saw
the log 'syslog'. It contained the below:
Quote:
Aug 20 21:00:02 ravbholua-Aspire-5315 sm-msp-queue[14158]: My unqualified host name (ravbholua-Aspire
-5315) unknown; sleeping for retry
Aug 20 21:01:03 ravbholua-Aspire-5315 sm-msp-queue[14158]: unable to qualify my own domain name (ravb
holua-Aspire-5315) -- using short name
The same error was in mail.log.
It seems it is not finding my FQDN. What's then my FQDN?
I searched regarding this issue in net but couldn't get solution. Google
has posts having the same error but nowhere I got how to know my
FQDN.
Please see the below files if it may be of use:
Code:
ravbholua@ravbholua-Aspire-5315:/etc$ cat hosts
127.0.0.1 localhost
127.0.1.1 ravbholua-Aspire-5315
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ravbholua@ravbholua-Aspire-5315:/etc$
You might want to update /etc/sysconfig/network with your full hostname.domainname
What you see looks like the default applied when you did the install. You can change that to whatever you like (almost). e.g., you could set it to aspire.mydomain.net or rav.example.net or something similar.
Technically the FQDN ends with a period (.) but for these purposes won't matter afaik.
there is no path /etc/sysconfig/network
There is 1 file and 1 directory named network/s as shown below.
/etc/networks
/etc/network/
where to go now?
Plese see the output below:
Quote:
ravbholua@ravbholua-Aspire-5315:/etc$ cat networks
# symbolic names for networks, see networks(5) for more information
link-local 169.254.0.0
ravbholua@ravbholua-Aspire-5315:/etc$ cd network
ravbholua@ravbholua-Aspire-5315:/etc/network$ ls
if-down.d if-post-down.d if-pre-up.d if-up.d interfaces run
ravbholua@ravbholua-Aspire-5315:/etc/network$ ^C
ravbholua@ravbholua-Aspire-5315:/etc/network$
I've never used Ubuntu so I don't know what goes on there. You can either create that file (although I don't know if Ubuntu will recognize it), or add your domain info to the /etc/hosts file. How you do that will depend on whether you have fixed IPs set up or not.
Hopefully somebody with Ubuntu networking nous will pipe up with more info.
Just as a note. FQDN's are not used normally by home users as such. A FQDN may be google.com or amazon.com or such. You may indeed have a FQDN but if you don't you need to either remove references or as some distro's do they put in a false FQDN that tends to refer to local. You can't really use it as a way to access like you would a normal domain name.
Now what should I expect the output should go? In which mail id shoud it go.What's my mail id? Is it what is shown in prompt, i.e. "ravbholua@ravbholua-Aspire-5315"
Is the email id of root is:
Quote:
root@ravbholua-Aspire-5315
I am not getting any mail.
See the output of /var/log/mail.log ( shown for ravbholua)
Code:
Aug 27 14:29:55 ravbholua-Aspire-5315 sm-mta[6065]: r7R8S13d003261: to=<ravbholua@ravbholua-Aspire-53
15>, ctladdr=<ravbholua@ravbholua-Aspire-5315> (1000/1000), delay=00:31:54, xdelay=00:00:00, mailer=l
ocal, pri=390580, dsn=4.0.0, stat=Operating system error
Aug 27 14:29:56 ravbholua-Aspire-5315 sm-mta[6086]: r7R8T181003274: Warning: program /usr/sbin/sensib
le-mda unsafe: No such file or directory
Aug 27 14:29:56 ravbholua-Aspire-5315 sm-mta[6086]: r7R8T181003274: SYSERR(root): Cannot exec /usr/sb
in/sensible-mda: No such file or directory
Below is also a part of the output of the same log file (shown for root)
Quote:
Aug 27 14:29:55 ravbholua-Aspire-5315 sm-mta[6065]: r7R8bxHY004566: to=<root@ravbholua-Aspire-5315>, ctladdr=<root@ravbholua-Aspire-5315> (0/0), delay=00:21:56, xdelay=00:00:00, mailer=local, pri=300942, dsn=4.0.0, stat=Operating system error
Aug 27 14:29:55 ravbholua-Aspire-5315 sm-mta[6084]: r7R8U4am003983: Warning: program /usr/sbin/sensible-mda unsafe: No such file or directory
Aug 27 14:29:55 ravbholua-Aspire-5315 sm-mta[6084]: r7R8U4am003983: SYSERR(root): Cannot exec /usr/sbin/sensible-mda: No such file or directory
Aug 27 14:29:55 ravbholua-Aspire-5315 sm-mta[6065]: r7R8U4am003983: to=<root@ravbholua-Aspire-5315>, ctladdr=<root@ravbholua-Aspire-5315> (0/0), delay=00:29:51, xdelay=00:00:00, mailer=local, pri=301660, dsn=4.0.0, stat=Operating system error
Aug 27 14:29:55 ravbholua-Aspire-5315 sm-mta[6085]: r7R8S13d003261: Warning: program /usr/sbin/sensible-mda unsafe: No such file or directory
But root is gettig mail. This I confirmed when I entered 'sudo -i' and entered as root. Then when I ran command "mailx",it outputs the mails.
But why no mails showing for ravbholua.
Quote:
ravbholua@ravbholua-Aspire-5315:/var/log$ mailx
No mail for ravbholua
----------------------------------------------------------------
OHHHHHH!!! A big issue here I encountered. My internet disconnected and when I try to reconnect, it's not connecting. Then I tried running one script (mentioned below) for connecting it and got the below error message.
Quote:
ravbholua@ravbholua-Aspire-5315:~$ sudo ./mob* start
sudo: unable to resolve host ravbholua-Aspire-5315
[sudo] password for ravbholua:
^C** Message: Caught signal 2, shutting down...
Then I changed the /etc/hosts file to what was earlier. Restarted twice but still net wasn't connecting.
Now , after 2 hours I tried again and it seems a matter of chance than now I could get connected. Uffff!!!
Also earlier, I twice executed the below command after I edited /etc/hosts to include domain name. Is it that this has resulted in my system not connecting to ineternet?????
Quote:
Originally Posted by zhjim
But only the hostname, no domainame. After that reread the hostname with
Code:
hostname -F /etc/hostname
This spares a reboot. After this see what the mailer says and maybe do some config there as well as mentioned by Mike
Last edited by ravisingh1; 08-27-2013 at 07:09 AM.
You seem to be missing a program. /usr/sbin/sensible-mda But I don't know which package this is in and I say it should have been installed when installing your mailer. Maybe
Code:
apt-cache search sensible-mda
might tell us which packages hold the file.
For root getting mail but not your user. Did you send anymail to your user?
Judging from the way you changed your /etc/hosts file I say you did not read man hosts, did you? You need a fqdn name for your machine and one short one without the domainname. This should also fix the issue with your inet connection script.
The file hosts contains name to ip resolution data. So 127.0.0.1 localhost makes your computer use the ip 127.0.0.1 if you call on localhost. And if you call on ravbholua-Aspire-5315 it also gives back the ip 127.0.0.1. /etc/hosts is just a local DNS type of file.
You seem to be missing a program. /usr/sbin/sensible-mda But I don't know which package this is in and I say it should have been installed when installing your mailer. Maybe
Oh it didn't tell the package name. Now how to know ?
Quote:
Originally Posted by zhjim
For root getting mail but not your user. Did you send anymail to your user?
When I as user ravbholua use cron, it is supposed to send in ravbholua's email id!But ravbholua isn't getting any mail.
See the crontab file for both ravbholua and root (root has no file)
Code:
ravbholua@ravbholua-Aspire-5315:~$ crontab -l
* * * * * echo bholu
ravbholua@ravbholua-Aspire-5315:~$ sudo -i
[sudo] password for ravbholua:
root@ravbholua-Aspire-5315:~# crontab -l
no crontab for root
root@ravbholua-Aspire-5315:~#
You seem to be missing a program. /usr/sbin/sensible-mda But I don't know which package this is in and I say it should have been installed when installing your mailer. Maybe
Code:
apt-cache search sensible-mda
might tell us which packages hold the file.
For root getting mail but not your user. Did you send anymail to your user?
Amazing, the below command worked
Code:
sudo apt-get install sensible-mda
That means the package name is the same.
And my problem seems to be resolved as I (ravbholua) have started getting mails!!!!!!!!!!!!!!!!!
What that means? Does it mean /etc/hosts not reqd. for receiving mails?
Now please see the output fragment of /var/log/mail.log
Code:
Aug 27 20:28:02 ravbholua-Aspire-5315 sendmail[14916]: My unqualified host name (ravbholua-Aspire-531
5) unknown; sleeping for retry
Aug 27 20:28:02 ravbholua-Aspire-5315 sendmail[14824]: unable to qualify my own domain name (ravbholua-Aspire-5315) -- using short name
Aug 27 20:28:02 ravbholua-Aspire-5315 sendmail[14824]: r7REw2dM014824: from=ravbholua, size=283, class=0, nrcpts=1, msgid=<201308271458.r7REw2dM014824@ravbholua-Aspire-5315>, relay=ravbholua@localhost
Aug 27 20:28:03 ravbholua-Aspire-5315 sm-mta[14917]: r7REw2TF014917: from=<ravbholua@ravbholua-Aspire-5315>, size=581, class=0, nrcpts=1, msgid=<201308271458.r7REw2dM014824@ravbholua-Aspire-5315>, proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1]
Aug 27 20:28:03 ravbholua-Aspire-5315 sendmail[14824]: r7REw2dM014824: to=ravbholua, ctladdr=ravbholua (1000/1000), delay=00:00:01, xdelay=00:00:01, mailer=relay, pri=30283, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (r7REw2TF014917 Message accepted for delivery)
Aug 27 20:28:03 ravbholua-Aspire-5315 sm-mta[14921]: r7REw2TF014917: to=<ravbholua@ravbholua-Aspire-5315>, ctladdr=<ravbholua@ravbholua-Aspire-5315> (1000/1000), delay=00:00:00, xdelay=00:00:00, mailer=local, pri=30829, dsn=2.0.0, stat=Sent
Aug 27 20:29:02 ravbholua-Aspire-5315 sendmail[15007]: My unqualified host name (ravbholua-Aspire-5315) unknown; sleeping for retry
Aug 27 20:29:02 ravbholua-Aspire-5315 sendmail[14916]: unable to qualify my own domain name (ravbholua-Aspire-5315) -- using short name
Also a fragment of the output of mailx command is:
Code:
U 21 Cron Daemon Tue Aug 27 20:19 22/888 Cron <ravbholua@ravbholua-Aspire-5315> echo bh
U 22 Mail Delivery Subs Tue Aug 27 20:19 69/2590 Warning: could not send message for past 4 hou
U 23 Mail Delivery Subs Tue Aug 27 20:19 69/2590 Warning: could not send message for past 4 hou
U 24 Mail Delivery Subs Tue Aug 27 20:19 69/2590 Warning: could not send message for past 4 hou
U 25 Mail Delivery Subs Tue Aug 27 20:19 70/2634 Warning: could not send message for past 4 hou
U 26 Cron Daemon Tue Aug 27 20:19 22/888 Cron <ravbholua@ravbholua-Aspire-5315> echo bh
U 27 Cron Daemon Tue Aug 27 20:19 22/888 Cron <ravbholua@ravbholua-Aspire-5315> echo bh
One thing which I need to look is why sometimes the same cron output it is giving in mails as you can see there are many same mails for time 20:19 although it's expected to mail every minute once.
For sending mail you do not necessarily need a FQDN. Depends on how you configure your mailer. It's just more robust to have the hostname, domainname setup correctly on the lowest level. Which is /etc/hosts. On top of this goes the mailer which most of the time is configured to use the system FQDN. Also it can just be set hard coded.
And as I like my logs not to print out errors than can be fixed I normaly do this. Just correct your /etc/hosts. Check out the man page or view my previous post.
Regarding the output of mailx I don't know what the time output actually represent. Just see how/if it changes.
You need to set your IP address to something outside the "Loopback" address space and you need to remove the ".com" TLD.
Figure out what IP address your router has (probably something like 192.168.1.1). Then in your /etc/hosts file, change
127.0.1.1 ravbholua-Aspire-5315.localdomain.com
...to something like:
192.168.1.2 ravbholua-Aspire-5315.localdomain ravbholua-Aspire-5315
Configure your interface to have this address:
`ifconfig eth0 192.168.1.2 netmask 255.255.255.0 up`
Of course you'll have to update your network config files so the IP address is configured upon reboot.
Check your routing table with `route -n` to verify your default route points to the router so you can access the internet:
Host# route -n
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.1.1 0.0.0.0 UG 204 0 0 eth0
If you don't see this, you can add it with:
`route add default gw 192.168.1.1`
Finally, check your router's DHCP service config to make sure 192.168.1.2 is outside the range of IP's it hands out.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.