itsonlyme
Posts: 131
Joined: Sun Feb 12, 2012 12:43 pm

Re: Networking - Cannot Resolve Host Name

Tue Apr 17, 2012 4:14 pm

Latest debian. Am unable to access local network or internet. The only clue I can give is that when attempting to access a site through Midori it returns "Cannot resolve hostname".

The pi is seen by my router and after boot it does show a time (GMT, rather than GMT+1), so is obviously accessing somewhere at boot.

I have searched various places, and tried correcting resolv.conf but this has not worked.

Any help or clues appreciated.

plugwash
Forum Moderator
Forum Moderator
Posts: 3602
Joined: Wed Dec 28, 2011 11:45 pm

Re: Networking - Cannot Resolve Host Name

Tue Apr 17, 2012 4:17 pm

What IP range are you using for your network?

Do you use DHCP?

Can you ping your router?

Can you ping an IP address on the internet (e.g. 8.8.8.8)

What is the contents of your /etc/network/interfaces file?

What is the contents of your /etc/resolv.conf file?

User avatar
RaTTuS
Posts: 10558
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK
Contact: Twitter YouTube

Re: Networking - Cannot Resolve Host Name

Tue Apr 17, 2012 4:21 pm

open a command line and what does

ifconfig

say ?

sudo apt-get install pastebinit

ifconfig | pastebinit
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

plugwash
Forum Moderator
Forum Moderator
Posts: 3602
Joined: Wed Dec 28, 2011 11:45 pm

Re: Networking - Cannot Resolve Host Name

Tue Apr 17, 2012 4:22 pm

RaTTuS said:


sudo apt-get install pastebinit

ifconfig | pastebinit


Not going to be much use when he doesn't have a working network is it?

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 26442
Joined: Sat Jul 30, 2011 7:41 pm

Re: Networking - Cannot Resolve Host Name

Tue Apr 17, 2012 4:26 pm

It does sound like DHCP isn't resolving, and giving you a DNS server. Although getting the correct time is odd if DHCP has failed.

See plugwash's post #2 above - answers to those Q's would help a lot.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

ianm1981
Posts: 15
Joined: Wed Nov 30, 2011 2:18 pm

Re: Networking - Cannot Resolve Host Name

Tue Apr 17, 2012 9:03 pm

i also have this. the network is fine untill i run startx then nothing run from the gui has an ip address (so apt-get works fine before i load the gui)

bredman
Posts: 1415
Joined: Tue Jan 17, 2012 2:38 pm

Re: Networking - Cannot Resolve Host Name

Tue Apr 17, 2012 9:09 pm

Some people today have reported that Ethernet shuts down within a few minutes after boot. This seems to be related to inadequate power supplies or cheap power cables.

Just a thought, not sure if it is the case here.

It might be worthwhile to look at the output from the dmesg command to see if there are any useful diagnostic messages. You might see reports that the Ethernet NIC has shut down.

bredman
Posts: 1415
Joined: Tue Jan 17, 2012 2:38 pm

Re: Networking - Cannot Resolve Host Name

Tue Apr 17, 2012 9:12 pm

If you think you have a DHCP problem, you can use the following commands

ifdown eth0

ifup eth0

(assuming the Ethernet port is called eth0, use the command ifconfig to show all of the interfaces available)

This will show you details of exactly what happens when the eth0 port is disabled and enabled. You may see unsuccessful attempts to find a DHCP server.

ianm1981
Posts: 15
Joined: Wed Nov 30, 2011 2:18 pm

Re: Networking - Cannot Resolve Host Name

Tue Apr 17, 2012 9:19 pm

I also suspected that but I'm using a 1A phone charger so I dont think its that.

the desmg report does have a few intresting lines right at the end that arent there untill startx is run

smsc95xx 1-1.1:1.0: eth0: failed to write register index 0x00000114

smsc95xx 1-1.1:1.0: eth0: failed to read register index 0x00000114

smsc95xx 1-1.1:1.0: eth0: failed to read register index 0x00000118

smsc95xx 1-1.1:1.0: eth0: failed to read register index 0x00000114

smsc95xx 1-1.1:1.0: eth0: failed to write register index 0x00000114

smsc95xx 1-1.1:1.0: eth0: failed to read register index 0x00000114

This doesn't mean that much to me but looks like it might be relevant

ianm1981
Posts: 15
Joined: Wed Nov 30, 2011 2:18 pm

Re: Networking - Cannot Resolve Host Name

Tue Apr 17, 2012 9:24 pm

also just tried again now it seems to be just repeating the line

smsc95xx 1-1.1:1.0: eth0: kevent 4 may have been dropped

I'm guessing its just spamming that message as I got a page of them and a flashing line of it at the bottom before the terminal window cleared itself and went back to the prompt

itsonlyme
Posts: 131
Joined: Sun Feb 12, 2012 12:43 pm

Re: Networking - Cannot Resolve Host Name

Tue Apr 17, 2012 9:29 pm

Thanks to those who have responded, I try your suggestions tomorrow and respond then. In the meantime if anybody else has any clues plesae post them. Thanks

plugwash
Forum Moderator
Forum Moderator
Posts: 3602
Joined: Wed Dec 28, 2011 11:45 pm

Re: Networking - Cannot Resolve Host Name

Tue Apr 17, 2012 10:44 pm

ianm1981 said:


I also suspected that but I'm using a 1A phone charger so I dont think its that.


Unfortunately claiming to be able to deliver 1A and actually being able to deliver 1A while maintaining a decent output voltage are not the same thing. As has been mentioned in other threads cheap cables can be the culprit too.

Mobile phones have a complex power/charge management system that is generally pretty tolerant. If the voltage from the PSU drops off the phone will just charge slower and an equalibrium will be reached with the PSU. The Pi has much tighter requiremets on it's power input.

If you are having problems with any USB devices inlcuding the onboard ethernet controller I would STRONGLY suggest measuring the voltage on the 5V line and checking it is readonable.

ianm1981
Posts: 15
Joined: Wed Nov 30, 2011 2:18 pm

Re: Networking - Cannot Resolve Host Name

Tue Apr 17, 2012 11:05 pm

yeah, my further reserch into the problem seems to indicate this is the case.

I do however have a workarround! YAY!

at the initial command prompt (when hopefully all should be working)

type

sudo apt-get install matchbox-keyboard

Press enter

Let that download and install.

Then type startx as normal to load the gui.

once its started to load, unplug the usb keyboard to save power and use the onscreen one which can now be found in Accessories.

not the best fix but until I can find a cheaper power supply or a cheaper keyboard that uses less power it looks like that's what I'm stuck with.

itsonlyme
Posts: 131
Joined: Sun Feb 12, 2012 12:43 pm

Re: Networking - Cannot Resolve Host Name

Wed Apr 18, 2012 1:04 pm

Thanks to all who replied. The problem does appear to be a power related one. Following iamn1981's instructions above all worked OK and continued working without problem for about 45minutes.

I am, however, very mystified. The keyboard was connected through a powered usb hub, not directly to the raspberry. Should it not be drawing its power from the Hub's power supply, not the raspberry?

To the others who responded I did run all your tests from the command line and saw no problem. The problem appeared to only arise once the GUI is loaded.

bredman
Posts: 1415
Joined: Tue Jan 17, 2012 2:38 pm

Re: Networking - Cannot Resolve Host Name

Wed Apr 18, 2012 1:51 pm

itsonlyme said:


I am, however, very mystified. The keyboard was connected through a powered usb hub, not directly to the raspberry. Should it not be drawing its power from the Hub's power supply, not the raspberry?


A properly-designed USB hub should use a Schottky diode to ensure that power is not sucked from the host (your RPi) if the USB power is connected. If this is not done properly, the USB device can suck power from the host. You could be suffering from a cheap USB hub.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 26442
Joined: Sat Jul 30, 2011 7:41 pm

Re: Networking - Cannot Resolve Host Name

Wed Apr 18, 2012 2:18 pm

I had the same issue last night. I reckon my powered hub really isn't very good. I was powering everything off it - keyboard, mouse, wireless, bluetooth, but keyboard was erratic. When I changed the Raspi power from Kindle plug to PC USB, the problem went away, which implies the keyboard was using power from the Raspi, not the hub.

Had this hub for years. Never noticed.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

itsonlyme
Posts: 131
Joined: Sun Feb 12, 2012 12:43 pm

Re: Networking - Cannot Resolve Host Name

Thu Apr 19, 2012 11:59 am

Does anybody have a powered USB Hub that is working, if so which one?

I have tried one by Logik and now one by Belkin but problem persists.

itsonlyme
Posts: 131
Joined: Sun Feb 12, 2012 12:43 pm

Re: Networking - Cannot Resolve Host Name

Sat Apr 21, 2012 10:42 am

Well I have it working but with a weird connection setup. Could you experts confirm that I am not likely to damage my raspberry with the following connections.

Power Socket >5v Power supply (actually 5.08 with no load)>USB Hub>Raspberry Power input. (No other connections to/from Hub).

Raspberry USB Output 1 > Keyboard

Raspberry USB Output 2 > Mouse

(I do suspect the USB Hub is breaking the spec somewhere.)

The Power Supply I was using before was an HTC Phone charger 5v (actually 4.80 with no load)

In addition I have also swapped the HDMI Cable. The original one on connection was causing a voltage drop of 0.09v on the Raspberry. The new one only causes a 0.04v drop but did not solve the problem on its own.

Reading now from Raspberry with GUi open and downloading through Midori 4.81v

Many thanks

sycophantic
Posts: 2
Joined: Sat Aug 06, 2011 7:40 pm

Re: Networking - Cannot Resolve Host Name

Mon Apr 23, 2012 12:57 am

itsonlyme said:


Well I have it working but with a weird connection setup. Could you experts confirm that I am not likely to damage my raspberry with the following connections.

Power Socket >5v Power supply (actually 5.08 with no load)>USB Hub>Raspberry Power input. (No other connections to/from Hub).

Raspberry USB Output 1 > Keyboard

Raspberry USB Output 2 > Mouse

(I do suspect the USB Hub is breaking the spec somewhere.)

The Power Supply I was using before was an HTC Phone charger 5v (actually 4.80 with no load)

In addition I have also swapped the HDMI Cable. The original one on connection was causing a voltage drop of 0.09v on the Raspberry. The new one only causes a 0.04v drop but did not solve the problem on its own.

Reading now from Raspberry with GUi open and downloading through Midori 4.81v

Many thanks


I measure 4.80 V on TP1.  With and without the usb hub.  With a hub the rpi same problems as described without the hub everything works fine.

Bagpuss
Posts: 3
Joined: Sun Jan 15, 2012 7:42 pm

Re: Networking - Cannot Resolve Host Name

Fri Apr 27, 2012 5:19 pm

I am also suffering from this problem. Networking operates just fine until I start X.

At this point, I get literally thousands of "kevent 4 may have been dropped" messages in the syslog, and networking appears to totally stop working.

If I run ifconfig, then it will either hang completely, or take upwards of 25 seconds to return.

I am using the PSU that RS are selling with the Pi, so figure it should be adequate. Voltage on TP1/TP2 is a constant 4.83V, both outside and inside of X.

In the USB sockets on the Pi, I have a Logitech Unifying receiver (for the keyboard) and a Nano receiver (for the mouse). According to lsusb, the USB receivers require 98mA each, so I should be well within tolerance for the PSU, which can supposedly supply 1.2A.

I'm going to tried a wired keyboard and mouse to see if it makes any difference, but it's very concerning that two relatively low power USB devices can overwhelm things.

Does anyone have any other suggestions?

Bagpuss
Posts: 3
Joined: Sun Jan 15, 2012 7:42 pm

Re: Networking - Cannot Resolve Host Name

Fri Apr 27, 2012 5:58 pm

Done some testing with various other PSUs, and got some disappointing results.

Have tried a Huawei PSU designed for a MiFi device. This is rated at 5V 1A.

Have also tried an iPhone PSU, which is similarly rated, and also an original iPad PSU which is rated at 5.1V 2.1A. I used the same USB -> MicroUSB cable each time (which came from my Kindle).

I also tried powering the Pi from a USB port on the front of my MacPro, using a very short (15cm) USB -> MicroUSB cable.

Results were as follows:

Hauwei: 4.73V during bootup, settling at 4.71V when at login prompt.

iPhone: 4.71V at all times.

iPad: 4.65V at all times.

MacPro: 4.69V at all times.

The best performer is still the RS supply, which manages to maintain a constant 4.83V.

I've found that unplugging the HDMI cable results in a 0.02V increase in these numbers. Unplugging the ethernet cable results in a 0.03V increase.

Removing the USB keyboard and mouse receivers did not impact on the voltages at all.

With all PSUs, I am still having the problem of networking going out to lunch when I run X.

Does anyone have any further suggestions for how I might solve this?

ianm1981
Posts: 15
Joined: Wed Nov 30, 2011 2:18 pm

Re: Networking - Cannot Resolve Host Name

Fri Apr 27, 2012 6:02 pm

If Ive learned anything about RasPi problems its that power seems to solve them.

I had this problem and noticed it was fine before startx, was run and even then it was fine if i ran an on onscreen keyboard and had the regular one unplugged.

I then ran it fine with tightvncserver installed and accessed the from my desktop pc that way for a few days untill I could get a better generic power supply.

now it works with its own keyboard and mouse  with an adapter that's putting out around 5.5v but I got more problems when I plugged in a wireless adapter. on paper it shouldn't be a problem but in reality it just needed more juice. I upped the voltage on the psu to 6 and then it worked fine. (measured across the pi at 5.5) I cant say i'm totaly comfortable about overvolting the pi, even if it is only half a volt or so in practice. but bigger and better psus seem to solve the problem.

My plan for the weekend is, as an experiment, to wire it up to an ATX power supply's 5v line which should be more than capable of providing a proper steady 5 volts without dropping under load like the little plug in adapters seem to do.

Bagpuss
Posts: 3
Joined: Sun Jan 15, 2012 7:42 pm

Re: Networking - Cannot Resolve Host Name

Fri Apr 27, 2012 6:40 pm

Okay. So I went back to the RS PSU, and removed the Nano receiver, leaving the Unifying receiver for the keyboard. Driving X via keyboard, instead.

Now, everything works as intended. So, I guess it must just be power related.

Am I alone in thinking that it's a bit c**p that even the RS PSU (specifically supplied for the job) is unable to properly power the Pi when using two 98mA USB devices.

When using this supply, I'm removing the USB cable issue, as it's got a hardwired cable into the supply.

Anyone got any suggestions for a PSU that is up to the job?

pdp7
Posts: 31
Joined: Sat Mar 03, 2012 12:49 am
Contact: Website

Re: Networking - Cannot Resolve Host Name

Sun Apr 29, 2012 4:55 am

I noticed this adapter from Adafruit which is 5.25V:

https://www.adafruit.com/products/501

"This adapter was specifically designed to provide 5.25V not 5V, but we still call it a 5V USB adapter. We did this on purpose to solve a problem that occurs often with USB-powered gadgets: they draw so much current than the resistance of the cable causes a voltage drop, so instead of 5V, the device sees 4.75V or so. To avoid this problem, we made the adapter 5.25V. This is because the USB power specification allows up to 5.25V, and its safe for all 5V electronics, and has the benefit of making up for any loss due to thin USB cables."

I wonder if it would be helpful?  It seems that ianm1981 had luck by applying more voltage (though idea kinda of scares me without having a better understanding).

alistairspalding
Posts: 1
Joined: Fri Aug 16, 2013 9:33 pm

Re: Networking - Cannot Resolve Host Name

Fri Aug 16, 2013 9:39 pm

Just a note to say that ianm1981's post of Tue Apr 17, 2012 11:05 pm worked for me.

Thanks for the (temporary) solution. I'm back online.

I'm using a logitech wireless keyboard and mouse.

My Pi is powered by a 5V microusb charger (from a Samsung galaxy).

Don't have a volt-o-meter so can't tell you what power it's actually producing, or what the Pi is drawing but it's a disappointing problem to encounter.

Will try a powered usb hub, or a better adapter.

Return to “Troubleshooting”