To add to the body of information, this is a stack trace when using
HttpURLConnection

01-13 12:27:22.251: WARN/System.err(601):     at
java.net.Socket.connect(Socket.java:1038)
01-13 12:27:22.260: WARN/System.err(601):     at
org.apache.harmony.luni.internal.net.www.protocol.http.HttpConnection.<init>(HttpConnection.java:
62)
01-13 12:27:22.260: WARN/System.err(601):     at
org.apache.harmony.luni.internal.net.www.protocol.http.HttpConnectionPool.get(HttpConnectionPool.java:
88)
01-13 12:27:22.280: WARN/System.err(601):     at
org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.getHTTPConnection(HttpURLConnectionImpl.java:
927)
01-13 12:27:22.280: WARN/System.err(601):     at
org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:
909)

<proprietary portion snipped>

01-13 12:27:22.340: WARN/System.err(601):     at android.os.AsyncTask
$2.call(AsyncTask.java:185)
01-13 12:27:22.350: WARN/System.err(601):     at
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
01-13 12:27:22.362: WARN/System.err(601):     at
java.util.concurrent.FutureTask.run(FutureTask.java:137)
01-13 12:27:22.362: WARN/System.err(601):     at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:
1068)
01-13 12:27:22.372: WARN/System.err(601):     at
java.util.concurrent.ThreadPoolExecutor
$Worker.run(ThreadPoolExecutor.java:561)
01-13 12:27:22.381: WARN/System.err(601):     at
java.lang.Thread.run(Thread.java:1096)


On Jan 12, 5:02 pm, Dan <king...@gmail.com> wrote:
> I have tried a more extensive test with AndroidHttpClient and received
> an error:
>
> 01-12 16:58:31.614: WARN/System.err(1953):
> java.net.UnknownHostException: cs.wirelsswerx-test.com
> 01-12 16:58:31.614: WARN/System.err(1953):     at
> java.net.InetAddress.lookupHostByName(InetAddress.java:504)
> 01-12 16:58:31.622: WARN/System.err(1953):     at
> java.net.InetAddress.getAllByNameImpl(InetAddress.java:278)
> 01-12 16:58:31.630: WARN/System.err(1953):     at
> java.net.InetAddress.getAllByName(InetAddress.java:242)
> 01-12 16:58:31.630: WARN/System.err(1953):     at
> org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(De 
> faultClientConnectionOperator.java:
> 136)
> 01-12 16:58:31.630: WARN/System.err(1953):     at
> org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:
> 164)
> 01-12 16:58:31.630: WARN/System.err(1953):     at
> org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConn 
> Adapter.java:
> 119)
> 01-12 16:58:31.638: WARN/System.err(1953):     at
> org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDi 
> rector.java:
> 348)
> 01-12 16:58:31.638: WARN/System.err(1953):     at
> org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.j 
> ava:
> 555)
> 01-12 16:58:31.638: WARN/System.err(1953):     at
> org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.j 
> ava:
> 487)
> 01-12 16:58:31.638: WARN/System.err(1953):     at
> org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.j 
> ava:
> 465)
> 01-12 16:58:31.646: WARN/System.err(1953):     at
> android.net.http.AndroidHttpClient.execute(AndroidHttpClient.java:243)
>
> Proprietary portion of stack trace snipped.
>
> On Jan 12, 4:15 pm, Dan <king...@gmail.com> wrote:
>
>
>
>
>
>
>
> > Hello All,
>
> > I have had this error both on emulator and a Motorola Droid while
> > using a WIFI connection.  I have surrounded the http request with WIFI
> > state checks and before and after WIFI is reported state 3
> > (WIFI_STATE_ENABLED) and a connection speed of 54 . I have also
> > confirmed, using an adb shell with the emulator, that the emulator
> > cannot ping the website in question giving a domain resolution error.
> > To compare notes with Ankur, is the server on your LAN and the IP used
> > internal? mine is.
>
> > I have also tried AndroidHttpClient which does work on the same url.
>
> > -Dan
>
> > On Jan 12, 12:23 pm, Ankur Avlani <ankuravl...@gmail.com> wrote:
>
> > > True, I agree with what you say.  Its just that I feel, other apps should
> > > also break or give error.
>
> > > Anywayz, Thanks a lot for your inputs.
>
> > > regards,
> > > Ankur.
>
> > > On Wed, Jan 12, 2011 at 12:17 PM, Brill Pappin <br...@pappin.ca> wrote:
> > > > Well i suppose thats possible if your messing with the network stack,
> > > > but it's pretty low level for Java/Android.
> > > > I guess its also possible that the Android version you have has a
> > > > crappy stack or driver... or you have rooted it and have been messing
> > > > around under the covers so to speak.
>
> > > > There is nothing in Android really that would allow you to mess it up
> > > > that badly AFAIK, so I doubt it's your application causing the problem
> > > > if your not specifically getting under the covers.
>
> > > > However, the meaning of the exception is clear:
>
> > > >http://download.oracle.com/javase/1.4.2/docs/api/java/net/UnknownHost...
> > > > and your app doesn't really control the process of translating a
> > > > domain to an ip.
>
> > > > - Brill Pappin
>
> > > > On Jan 12, 2:54 pm, Ankur Avlani <ankuravl...@gmail.com> wrote:
> > > > > Somehow I have this feeling it is related to my app only.  Other apps 
> > > > > on
> > > > the
> > > > > phone, I don't see any such issue.  Even when browsing on my phone, I
> > > > don't
> > > > > see any error.
>
> > > > > On Wed, Jan 12, 2011 at 11:41 AM, Kumar Bibek <coomar....@gmail.com>
> > > > wrote:
> > > > > > By Wi-Fi, I meant, you phone's Wi-Fi could be turning on and off. 
> > > > > > There
> > > > is
> > > > > > no other reason I can think of. It happens for me as well, 
> > > > > > sometimes.
>
> > > > > > Kumar Bibek
> > > > > >http://techdroid.kbeanie.com
> > > > > >http://www.kbeanie.com
>
> > > > > > On Thu, Jan 13, 2011 at 1:10 AM, Ankur Avlani <ankuravl...@gmail.com
> > > > >wrote:
>
> > > > > >> I am sorry, that somehow doesn't convince me.  I am connected to 
> > > > > >> the
> > > > same
> > > > > >> wifi on my laptop and i never see any web page load error on my
> > > > laptop.
>
> > > > > >> On Wed, Jan 12, 2011 at 11:38 AM, Kumar Bibek <coomar....@gmail.com
> > > > >wrote:
>
> > > > > >>> Yup, then it's a problem with your Wi-Fi.
>
> > > > > >>> Kumar Bibek
> > > > > >>>http://techdroid.kbeanie.com
> > > > > >>>http://www.kbeanie.com
>
> > > > > >>> On Thu, Jan 13, 2011 at 1:07 AM, Ankur Avlani 
> > > > > >>> <ankuravl...@gmail.com
> > > > >wrote:
>
> > > > > >>>> I am connected to network, I am on Wifi.  If i try again it 
> > > > > >>>> works.
> > > >  Its
> > > > > >>>> just random.
>
> > > > > >>>> On Wed, Jan 12, 2011 at 11:34 AM, Kumar Bibek 
> > > > > >>>> <coomar....@gmail.com
> > > > >wrote:
>
> > > > > >>>>> This error/exception comes because of no network connectivity.
>
> > > > > >>>>> Kumar Bibek
> > > > > >>>>>http://techdroid.kbeanie.com
> > > > > >>>>>http://www.kbeanie.com
>
> > > > > >>>>> On Thu, Jan 13, 2011 at 1:02 AM, Ankur Avlani <
> > > > ankuravl...@gmail.com>wrote:
>
> > > > > >>>>>> Hi All,
>
> > > > > >>>>>> I am developing an application on Android.  I have seen that at
> > > > times
> > > > > >>>>>> when I try to connect using HttpURLConnection, for getting an
> > > > Image or
> > > > > >>>>>> anydata, I get the following error:
>
> > > > > >>>>>> 01-12 11:24:05.073: WARN/System.err(16780):
> > > > > >>>>>> java.net.UnknownHostException: Host is 
> > > > > >>>>>> unresolved:www.XXX.com:80.
>
> > > > > >>>>>> Note: I get this error on my Motorolla Droid and not in 
> > > > > >>>>>> emulator.
>
> > > > > >>>>>> Any ideas?
>
> > > > > >>>>>> Thanks,
> > > > > >>>>>> Ankur
>
> > > > > >>>>>>  --
> > > > > >>>>>> You received this message because you are subscribed to the 
> > > > > >>>>>> Google
> > > > > >>>>>> Groups "Android Developers" group.
> > > > > >>>>>> To post to this group, send email to
> > > > > >>>>>> android-developers@googlegroups.com
> > > > > >>>>>> To unsubscribe from this group, send email to
> > > > > >>>>>> android-developers+unsubscr...@googlegroups.com<android-developers%2Bunsubs
> > > > > >>>>>>  cr...@googlegroups.com><android-developers%2Bunsubs
> > > > cr...@googlegroups.com>
> > > > > >>>>>> For more options, visit this group at
> > > > > >>>>>>http://groups.google.com/group/android-developers?hl=en
>
> > > > > >>>>>  --
> > > > > >>>>> You received this message because you are subscribed to the 
> > > > > >>>>> Google
> > > > > >>>>> Groups "Android Developers" group.
> > > > > >>>>> To post to this group, send email to
> > > > > >>>>> android-developers@googlegroups.com
> > > > > >>>>> To unsubscribe from this group, send email to
> > > > > >>>>> android-developers+unsubscr...@googlegroups.com<android-developers%2Bunsubs
> > > > > >>>>>  cr...@googlegroups.com><android-developers%2Bunsubs
> > > > cr...@googlegroups.com>
> > > > > >>>>> For more options, visit this group at
> > > > > >>>>>http://groups.google.com/group/android-developers?hl=en
>
> > > > > >>>>  --
> > > > > >>>> You received this message because you are subscribed to the 
> > > > > >>>> Google
> > > > > >>>> Groups "Android Developers" group.
> > > > > >>>> To post to this group, send email to
> > > > > >>>> android-developers@googlegroups.com
> > > > > >>>> To unsubscribe from this group, send email to
> > > > > >>>> android-developers+unsubscr...@googlegroups.com<android-developers%2Bunsubs
> > > > > >>>>  cr...@googlegroups.com><android-developers%2Bunsubs
> > > > cr...@googlegroups.com>
> > > > > >>>> For more options, visit this group at
> > > > > >>>>http://groups.google.com/group/android-developers?hl=en
>
> > > > > >>>  --
> > > > > >>> You received this message because you are subscribed to the Google
> > > > > >>> Groups "Android Developers" group.
> > > > > >>> To post to this group, send email to
> > > > android-developers@googlegroups.com
> > > > > >>> To unsubscribe from this group, send email to
> > > > > >>> android-developers+unsubscr...@googlegroups.com<android-developers%2Bunsubs
> > > > > >>>  cr...@googlegroups.com><android-developers%2Bunsubs
> > > > cr...@googlegroups.com>
> > > > > >>> For more options, visit this group at
> > > > > >>>http://groups.google.com/group/android-developers?hl=en
>
> > > > > >>  --
> > > > > >> You received this message because you are subscribed to the Google
> > > > > >> Groups "Android Developers" group.
> > > > > >> To post to this group, send email to
> > > > android-developers@googlegroups.com
> > > > > >> To unsubscribe from this group, send email to
> > > > > >> android-developers+unsubscr...@googlegroups.com<android-developers%2Bunsubs
> > > > > >>  cr...@googlegroups.com><android-developers%2Bunsubs
> > > > cr...@googlegroups.com>
> > > > > >> For more options, visit this group at
> > > > > >>http://groups.google.com/group/android-developers?hl=en
>
> > > > > >  --
> > > > > > You received this message because you are subscribed to the Google
> > > > > > Groups "Android Developers" group.
> > > > > > To post to this group, send email to
> > > > android-developers@googlegroups.com
> > > > > > To unsubscribe from this group, send email to
> > > > > > android-developers+unsubscr...@googlegroups.com<android-developers%2Bunsubs
> > > > > >  cr...@googlegroups.com><android-developers%2Bunsubs
> > > > cr...@googlegroups.com>
> > > > > > For more options, visit this group at
> > > > > >http://groups.google.com/group/android-developers?hl=en
>
> > > > --
> > > > You received this message because you are subscribed to the Google
> > > > Groups "Android Developers" group.
> > > > To post to this group, send email to android-developers@googlegroups.com
> > > > To unsubscribe from this group, send email to
> > > > android-developers+unsubscr...@googlegroups.com<android-developers%2Bunsubs
> > > >  cr...@googlegroups.com>
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to