Skip to content

java.net.UnknownHostException when opening a URL connection on Debian Linux #255

Closed

Description

@processing-bugs

Original author: b...@processing.org (June 07, 2010 01:18:06)

This bug automatically added from:
http://dev.processing.org/bugs/show_bug.cgi?id=1410

Comment from stopfocus, 2009-12-14 18:55

Hello,
Using 64-bit debian sarge version 2.22.3when ever I attempt to
call anything from the internet I recieve the error bellow. This does not
happen to me when on other platforms and also if I turn the sketch into an
application it will successfully connect to an internet web site.

This was the piece of code that gives me a problem and the program itself
is from Ben Fry's book
Visualizing Information
void updateTable( ) {
dataTable = new Table("http://benfry.com/writing/map/random.cgi");
}

java.net.UnknownHostException: benfry.com
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:177)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:525)
at java.net.Socket.connect(Socket.java:475)
at sun.net.NetworkClient.doConnect(NetworkClient.java:163)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:394)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:529)
at sun.net.www.http.HttpClient.(HttpClient.java:233)
at sun.net.www.http.HttpClient.New(HttpClient.java:306)
at sun.net.www.http.HttpClient.New(HttpClient.java:323)
at
sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:860)
at
sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:801)
at
sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:726)
at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1049)
at java.net.URL.openStream(URL.java:1010)
at processing.core.PApplet.createInputRaw(PApplet.java:4062)
at processing.core.PApplet.createInput(PApplet.java:4031)
at processing.core.PApplet.loadStrings(PApplet.java:4262)
at book$Table.(book.java:143)
at book.updateTable(book.java:120)
at book.keyPressed(book.java:115)
at processing.core.PApplet.handleKeyEvent(PApplet.java:1752)
at processing.core.PApplet.dequeueKeyEvents(PApplet.java:1735)
at processing.core.PApplet.handleDraw(PApplet.java:1437)
at processing.core.PApplet.run(PApplet.java:1327)
at java.lang.Thread.run(Thread.java:619)
The file "http://benfry.com/writing/map/random.cgi" is missing or
inaccessible, make sure the URL is valid or that the file has been added to
your sketch and is readable.
Exception in thread "Animation Thread" java.lang.NullPointerException
at book$Table.(book.java:144)
at book.updateTable(book.java:120)
at book.keyPressed(book.java:115)
at processing.core.PApplet.handleKeyEvent(PApplet.java:1752)
at processing.core.PApplet.dequeueKeyEvents(PApplet.java:1735)
at processing.core.PApplet.handleDraw(PApplet.java:1437)
at processing.core.PApplet.run(PApplet.java:1327)
at java.lang.Thread.run(Thread.java:619)

Original issue: http://code.google.com/p/processing/issues/detail?id=216

Activity

  1. processing-bugs commented on Feb 10, 2013

    @processing-bugs
    Author

    From b...@processing.org on June 07, 2010 01:18:07
    Comment from fry, 2009-12-14 19:13

    hm, that's odd.. the error is actually that DNS is failing for benfry.com
    maybe try connecting to benfry.com or the actual link
    (http://benfry.com/writing/map/random.cgi) from a web browser to see how it
    does?

    if i were to guess, i'd imagine that you're dealing with 1) a dns error at
    your isp or 2) overly restrictive firewall restrictions (that the java app
    is being blocked from using network connections or something like that).

    let me know what you find.

  2. processing-bugs commented on Feb 10, 2013

    @processing-bugs
    Author

    From b...@processing.org on June 07, 2010 01:18:07
    Comment from stopfocus, 2009-12-19 00:14

    Well I know that it has some thing to do with the seconed possibility that
    you mentioned. I have tested it out on a bunch of different Operating
    Systems and it only happens on the Debian 64-bit OS. It has nothing to
    actually do with the Internet connection, all the systems that I have tried
    it on have actually been on Virtual Box threw Debian 64-bit, I unplugged my
    router and everything =). It performs correctly on Windows, Ubuntu 32-bit
    and on Mac OSX.

    I hade originally thought that it was being restricted access from the
    Internet because of a security setting having to do with how my machine and
    Java was set up. This isn't the case because when I export the applet as an
    application it connects to the Internet with out any problems, on the
    trouble operating system.

    I also tried to see if I would recieve an error from a clean install of
    Debian and I do.

    I have finished my school finals and have all winter break to help. Iwould
    not mind trying to help solve this problem and contribute something. I am
    sure I will learn something on the way. Would you have any suggestions as
    to where to start to look for what causes this?

    (In reply to comment #1)

          Additional Comment #1 From
    
              fry
          2009-12-14 19:13 
    
          <!-- 
            addReplyLink(1); //-->[reply]
    
    
    
    
      hm, that's odd.. the error is actually that DNS is failing for
    

    benfry.com
    maybe try connecting to benfry.com or the actual link
    (http://benfry.com/writing/map/random.cgi) from a web browser to see how it
    does?

    if i were to guess, i'd imagine that you're dealing with 1) a dns error at
    your isp or 2) overly restrictive firewall restrictions (that the java app
    is being blocked from using network connections or something like that).

    let me know what you find.

    (In reply to comment #1)

          Additional Comment #1 From
    
              fry
          2009-12-14 19:13 
    
          <!-- 
            addReplyLink(1); //-->[reply]
    
    
    
    
      hm, that's odd.. the error is actually that DNS is failing for
    

    benfry.com
    maybe try connecting to benfry.com or the actual link
    (http://benfry.com/writing/map/random.cgi) from a web browser to see how it
    does?

    if i were to guess, i'd imagine that you're dealing with 1) a dns error at
    your isp or 2) overly restrictive firewall restrictions (that the java app
    is being blocked from using network connections or something like that).

    let me know what you find.

  3. processing-bugs commented on Feb 10, 2013

    @processing-bugs
    Author

    From b...@processing.org on June 07, 2010 01:18:08
    Comment from fry, 2009-12-24 08:50

    I wouldn't worry about it too much, I suspect there are other Linux issues
    for which we could use more testing (e.g. check any of the bugs in the db
    that are marked Linux). I suspect that there's just a strange configuration
    thing somewhere, or a Java version issue, or something with your ISP, or
    one of the other hundred things that cause glitches like this. The fact
    that it works in many other cases leaves it suspect. At any rate, feel free
    to dig into the other Linux issues, however.

  4. processing-bugs commented on Feb 10, 2013

    @processing-bugs
    Author

    From b...@processing.org on June 07, 2010 01:18:08
    Comment from fry, 2010-06-05 03:34

    did you find anything in the meantime?

    also realizing that you may just be having trouble if you were using
    anything besides sun-java with your installation.

  5. github-actions commented on Jun 15, 2021

    @github-actions

    This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

  6. locked as resolved and limited conversation to collaborators on Jun 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions