June 17, 201115 yr Lol, sorry, good idea! FYI: you are quick! Do you have a shock collar around your balls alerting you when one of your threads is posted in? No, they reserve those for us Mods.
June 17, 201115 yr So was a new thread created, or should I or madburg do so? Go ahead, I would just copy all the post here pertaining to it right off the back as a starting point in the new thread.
June 17, 201115 yr Author Hmm, could a mod copy over the last few pages, beginning with the "hostname" posts to a new thread in General Support for us? Here's the thread I started: http://lime-technology.com/forum/index.php?topic=13545.msg128373#msg128373
June 17, 201115 yr Author Basically, a few of us are unable to use the unraid_notify script to send emails out, because: It won't work unless there is a valid DNS server in the unRAID network settings. Please make sure there is something set up there before trying again. If there is one set and it still isn't working, make sure unRAID can resolve domain names. In a telnet session, type hostname -i *your.smtp.server.com* See if that brings back an IP address. If it does, then I'll take a further look into it. Cheers! When I do hostname -i smtp.gmail.com It returns 127.0.0.1 I'm able to ping smtp.gmail.com and it returns Google's IP address...so DNS resolution on my server does work. I've had no problem downloading packages through the Pkg Manager. Also, the ssmtp works wonderfully, too; I get emails nightly with my status, and can run from the command line without a problem. ifconfig output: eth0 Link encap:Ethernet HWaddr 00:30:67:0f:54:d9 inet addr:192.168.1.75 Bcast:192.168.1.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:22549701 errors:0 dropped:0 overruns:0 frame:0 TX packets:11419565 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:277452759 (264.5 MiB) TX bytes:245410197 (234.0 MiB) Interrupt:40 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:211420 errors:0 dropped:0 overruns:0 frame:0 TX packets:211420 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:18740439 (17.8 MiB) TX bytes:18740439 (17.8 MiB) /etc/resolv.conf, /etc/hosts contents: root@Tower:/# more /etc/resolv.conf # Generated by dhcpcd from eth0 # /etc/resolv.conf.head can replace this line domain gateway.2wire.net nameserver 192.168.1.254 # /etc/resolv.conf.tail can replace this line root@Tower:/# more /etc/hosts # Generated 127.0.0.1 Tower localhost madburg, feel free to add anything else, but I believe this sums up our problems. Anything else we can check?
June 17, 201115 yr I get the same results from the hostname command, root@Rack:~# hostname -i smtp.gmail.com 127.0.0.1 UnMenu package manager and SMTP messages work fine.
June 17, 201115 yr Author What about Email Notifications from the "Simple Features" / WebGUI plugin? Do you have that setup and does it work?
June 17, 201115 yr @defected, what's your /etc/host.conf? That's in charge of how resolver functions, no?
June 17, 201115 yr What about Email Notifications from the "Simple Features" / WebGUI plugin? Do you have that setup and does it work? I don't have this yet, but I'll get to it soon. I'm guessing it won't work based on this discussion.
June 17, 201115 yr Author @defected, what's your /etc/host.conf? That's in charge of how resolver functions, no? Do you mean /etc/hosts? It's in my larger post a few up...just has "127.0.0.1 Tower localhost" Now, I've never actually seen a "hosts" file with two names following the IP, but I guess this is allowed? Or could this be my problem? Edit: According to Wikipedia, this is ok: http://en.wikipedia.org/wiki/Hosts_%28file%29#File_content
June 17, 201115 yr So I guess the question is, why on earth does DNS resolution work for some, and not for others? Hmm, I might work at getting the unRAID_notify script to send via SSMTP instead. Off the top of your head, is that included or shall I include it in my package? Cheers
June 17, 201115 yr So I guess the question is, why on earth does DNS resolution work for some, and not for others? Hmm, I might work at getting the unRAID_notify script to send via SSMTP instead. Off the top of your head, is that included or shall I include it in my package? Cheers speeding_ant, can you post your config of each file like i did using 'cat' and a "hostname -iv "%fqdn%" of a host being resolved by your setup... and what version of unRAID are u running?
June 17, 201115 yr Yep - resolv.conf shows my server IP and hostname hostname -iv smtp.gmail.com at first showed 127.0.0.1, then ran it after I pinged the SMTP server (which worked) and it bought back the correct IP. Curious.
June 17, 201115 yr That's not what I get: root@Rack:~# hostname -i smtp.gmail.com 127.0.0.1 root@Rack:~# ping smtp.gmail.com PING gmail-smtp-msa.l.google.com (72.14.213.109) 56(84) bytes of data. 64 bytes from pv-in-f109.1e100.net (72.14.213.109): icmp_req=1 ttl=48 time=54.0 ms 64 bytes from pv-in-f109.1e100.net (72.14.213.109): icmp_req=2 ttl=48 time=53.3 ms 64 bytes from pv-in-f109.1e100.net (72.14.213.109): icmp_req=3 ttl=48 time=51.6 ms 64 bytes from pv-in-f109.1e100.net (72.14.213.109): icmp_req=4 ttl=48 time=52.2 ms ^C --- gmail-smtp-msa.l.google.com ping statistics --- 4 packets transmitted, 4 received, 0% packet loss, time 3030ms rtt min/avg/max/mdev = 51.680/52.842/54.028/0.933 ms root@Rack:~# hostname -iv smtp.gmail.com gethostname()=`Rack' Resolving `Rack' ... Result: h_name=`Rack' Result: h_aliases=`localhost' Result: h_addr_list=`127.0.0.1' 127.0.0.1 root@Rack:~# cat /etc/resolv.conf # Generated by dhcpcd from eth0 # /etc/resolv.conf.head can replace this line domain gateway.2wire.net nameserver 192.168.0.1 # /etc/resolv.conf.tail can replace this line root@Rack:~#
June 17, 201115 yr Yep - resolv.conf shows my server IP and hostname hostname -iv smtp.gmail.com at first showed 127.0.0.1, then ran it after I pinged the SMTP server (which worked) and it bought back the correct IP. Curious. Sorry but that just made no sense? " at first showed 127.0.0.1 "? that what we are all getting "then ran it after I pinged the SMTP server (which worked) and it bought back the correct IP." so your saying you got a 127.0.0.1 using hostname -vi, then you pinged smtp.gmail.com "(which worked)" does for us too... "and it brought back the correct IP." I have to assume you mean the ping resolution brought back the IP (like it does for us) not because your reran hostname -iv after you pinged? Are you worried about posting your internal IP/hosts, if so renamed them and post (call them mickey mouse, whatever, show us some code... )
June 17, 201115 yr Sorry - edit that out. At some point I must have changed my hostname to smtp.gmail.com....
June 17, 201115 yr You original stated to run this command 'hostname -i "smpt.gmail.com"' using qoutes around the fqdn address. In your screenshot you are not using qoutes around the fqdn name. now that I tried it that way I get: root@PNTower:~# hostname -i smtp.gmail.com hostname: Host name lookup failure root@PNTower:~# ping smtp.gmail.com PING gmail-smtp-msa.l.google.com (74.125.113.109) 56(84) bytes of data. 64 bytes from vw-in-f109.1e100.net (74.125.113.109): icmp_req=1 ttl=251 time=26. 6 ms 64 bytes from vw-in-f109.1e100.net (74.125.113.109): icmp_req=2 ttl=251 time=47. 8 ms 64 bytes from vw-in-f109.1e100.net (74.125.113.109): icmp_req=3 ttl=251 time=30. 4 ms ^C64 bytes from vw-in-f109.1e100.net (74.125.113.109): icmp_req=4 ttl=251 time=2 7.8 ms --- gmail-smtp-msa.l.google.com ping statistics --- 4 packets transmitted, 4 received, 0% packet loss, time 3031ms rtt min/avg/max/mdev = 26.657/33.218/47.887/8.582 ms root@PNTower:~# hostname -i smtp.gmail.com hostname: Host name lookup failure can you post a screenshot of the same lookup using -iv? doing a lookup once (and getting loopback address 127.0.0.1) and then pinging and then a second lookup makes no sense, as each one is resolving via DNS... added to my post with the code above for you.
June 17, 201115 yr I figured it out, I know something was wrong with the way the command was formulated. Try this out guys: 'hostname %whatever you want of resolve% -i' 'hostname %whatever you want of resolve% -iv' root@PNTower:~# hostname smtp.gmail.com -i 74.125.115.109 root@PNTower:~# hostname smtp.gmail.com -iv gethostname()=`smtp.gmail.com' Resolving `smtp.gmail.com' ... Result: h_name=`gmail-smtp-msa.l.google.com' Result: h_aliases=`smtp.gmail.com' Result: h_addr_list=`74.125.115.109' 74.125.115.109 Got to drive home now, this was driving me crazy so I stuck around
June 17, 201115 yr That works: root@Rack:~# hostname smtp.gmail.com -iv gethostname()=`smtp.gmail.com' Resolving `smtp.gmail.com' ... Result: h_name=`gmail-smtp-msa.l.google.com' Result: h_aliases=`smtp.gmail.com' Result: h_addr_list=`74.125.127.109' 74.125.127.109 root@Rack:~#
June 17, 201115 yr After a fresh restart, I ran hostname smtp.gmail.com -i , and it still loops back to 127.0.0.1. I don't think hostname is really the best tool to use here. unRAID should really include dig or nslookup at a minimum. DNS Resolution appears to be working in unRAID (demonstrated by the fact that the NTP daemon etc can resolve domains), so why SOCAT isn't resolving DNS, I'm not sure. I think easiest way to sort this is to move the unraid_notify script to send via SSMTP. I should say that unRAID needs a search domain field in DNS settings as well.
June 17, 201115 yr Author "hostname <dns server>" sets your box's hostname to <dns server> root@Tower:/# hostname smtp.gmail.com -iv gethostname()=`Tower' Resolving `Tower' ... Result: h_name=`Tower' Result: h_aliases=`localhost' Result: h_addr_list=`127.0.0.1' 127.0.0.1 root@Tower:/# hostname Tower root@Tower:/# hostname smtp.gmail.com root@Tower:/# hostname smtp.gmail.com root@Tower:/# hostname smtp.gmail.com -i 74.125.91.109 root@Tower:/# hostname smtp.gmail.com -iv gethostname()=`smtp.gmail.com' Resolving `smtp.gmail.com' ... Result: h_name=`gmail-smtp-msa.l.google.com' Result: h_aliases=`smtp.gmail.com' Result: h_addr_list=`74.125.93.109' 74.125.93.109 root@Tower:/# hostname smtp.gmail.com I don't understand the point of that damn command!
Archived
This topic is now archived and is closed to further replies.