Hostname/DNS Issues -- External IPs resolve as 127.0.0.1


Recommended Posts

Hey speeding_ant, did you get my emails?

 

Seems switching back to my onboard Realtek card has solved the "ping" issue in the mount.sh script--crazy shit!

 

Not sure how to fix it if I want to go back to the Intel card. We'll just have to see if I begin to encounter transfer problems with the Realtek card agan.

 


 

However, I removed the spaces from the and [Options] for the unraid_notify.cfg, but still can't send/receive any emails through the Email Notifications tool. Any other suggestions?

Link to comment
  • Replies 52
  • Created
  • Last Reply

Top Posters In This Topic

Hey Defected,

 

Yeah sorry I've been busy with work  :)  it was on the to-do list!

 

Cool that switching cards solved the ping issue. Heaps of different things could cause the ping to not resolve to that NIC.

 

Can you make sure you follow instructions above to doubly check DNS is working on the unRAID server? I've tried several different SMTP servers on my server, haven't had a problem yet. Using the exact same package as I distribute through Google code.

 

Cheers!

Link to comment

Well, that was when the Intel PCI NIC was enabled and plugged in--when the pings from my Mac wouldn't go through.

 

I'm not sure if I have been able to disable the Intel NIC, but it is not plugged in currently. I'll check the ifconfig and ethtool later tonight.

 

What else can I check to verify the DNS? 'hostname' seems to mainly set the host name of the server, but I see how the -i flag retrieves the IP address from a DNS address.

 

Hmmmm....

Link to comment

 

Sorry just re-read your post. Do you mean it still scrolls up with the page, but blocks other content?

 

 

@ speeding ant

 

Yes, status bar scrolls up with the page and blocks content. That happens on iPad (safari) only.

 

Regards.

 

Link to comment

Well, that was when the Intel PCI NIC was enabled and plugged in--when the pings from my Mac wouldn't go through.

 

I'm not sure if I have been able to disable the Intel NIC, but it is not plugged in currently. I'll check the ifconfig and ethtool later tonight.

 

What else can I check to verify the DNS? 'hostname' seems to mainly set the host name of the server, but I see how the -i flag retrieves the IP address from a DNS address.

 

Hmmmm....

 

Only eth0 and lo appear via 'ifconfig'

 

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)

Link to comment

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!

 

It brings back 127.0.0.1 , how do I change this ?  I can ping the smtp.gmail.com and get the appropiate IP addr, but running the hostname -i just gives me back localhost ip ( 127.0.01 )

to solve this in the meantime I have just replaced the smtp.gmail.com with ping's ip address and that made it work, but would like to get proper dns working if possible.

Link to comment

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!

 

It brings back 127.0.0.1 , how do I change this ?  I can ping the smtp.gmail.com and get the appropiate IP addr, but running the hostname -i just gives me back localhost ip ( 127.0.01 )

to solve this in the meantime I have just replaced the smtp.gmail.com with ping's ip address and that made it work, but would like to get proper dns working if possible.

 

Interesting. I have the same issue.

 

What's your setup? Onboard NIC? PCI NIC? Brand/model? Switch and/or router?

 

Just curious. Probably not necessary and just one simple line that needs to be changed :)

Link to comment

I have a Intel 82574L and have 2 valid internal DNS servers I point unRAID to. I receive all emails (alerts, etc..) which the unRAID server is set to send to an internal smtp server via FQDN. I am able to pull any external package down. But I have the same situation when i type hostname -i "%FQDN%" I get back the loopback ip 127.0.0.1 everytime.

Link to comment

Try hostname -iv , will give more verbose return. Or try dig, if unraid includes this. I host my own internal DNS server, not sure if that's why it is working for me.

 

So do I, have 3 internal DNS servers, i point unRAID to 2 of them, output from -iv against a register client device internally (FYI, I named my unRAID server PNTower):

 

root@PNTower:~# hostname -iv "ny01d740.private-network.com"

gethostname()=`PNTower'

Resolving `PNTower' ...

Result: h_name=`PNTower'

Result: h_aliases=`localhost'

Result: h_addr_list=`127.0.0.1'

127.0.0.1

 

If I ping that host by short name:

root@PNTower:~# ping ny01d740

PING ny01d740 (192.168.0.20) 56(84) bytes of data.

64 bytes from ny01d740.private-network.com (192.168.0.20): icmp_req=1 ttl=128 ti

me=0.269 ms

64 bytes from ny01d740.private-network.com (192.168.0.20): icmp_req=2 ttl=128 ti

me=0.315 ms

 

To me it looks like it is using the loopback adaptor and querying itself. I am sorry to tie this post up with this, its just that I found it interesting.

Link to comment

No problem - it is indeed interesting!  It doesn't appear to be checking the domain on lookups? If you do the same with an external domain, what happens?

 

Check what /etc/resolv.conf file shows (or wherever unRAID may have that conf file).

 

Sorry I should have meantioned I tried external hosts as well, same exact reply with -iv

Can you guide me how to see/list what is in the resolv.conf file (what command to run, not a linux guy, but learning), thanks. Never mind found it  ;D

 

These 2 entries are correct for me.

root@PNTower:~# cat /etc/resolv.conf

# Generated entries:

nameserver 192.168.0.151

nameserver 192.168.0.150

 

Correct as well

root@PNTower:~# cat /etc/hosts

# Generated

127.0.0.1       PNTower localhost

 

Weird but it seems like "hostname" is talking to "lo" not "eth0"? Check out my addition to the post above ping short name.

Link to comment

Yeah, my resolv.conf and /etc/hosts looks similar:

 

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

 

I wasn't able to ping the shortname for my DynDNS server.  If shortname is only supposed to be the sub-domain of the full path? Did you add that to your /etc/hosts file?

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.