• how debug sockets

    From xeon Mailinglist@1:0/0 to All on Sun Apr 13 13:00:31 2014
    I have a program that is trying to copy data between hosts. The connection happens, but the program can write remotely. I don't understand why it can`t write remotely giving me the error of


    java.net.SocketTimeoutException: 60000 millis timeout while waiting for channel to be ready for read. ch : java.nio.channels.SocketChannel[connected local=/172.16.100.8:50010 remote=/172.16.100.14:44724]
    at org.apache.hadoop.net.SocketIOWithTimeout.doIO(SocketIOWithTimeout.java:164).



    how can I debug a socket to have more info about the reason why this is happening?

    Is there bash commands or socket logs where I can look?

    --- MBSE BBS v1.0.1 (GNU/Linux-i386)
    * Origin: The Kofo System II BBS telnet://fido2.kofobb
  • From Adam Wysocki@110:110/2002 to All on Mon Apr 14 13:15:33 2014
    xeon Mailinglist <xeonmailinglist@gmail.com> wrote:

    how can I debug a socket to have more info about the reason why this is
    happening?

    Is there bash commands or socket logs where I can look?

    Try strace(1) or tcpdump(8).

    AW

    --- MBSE BBS v1.0.1 (GNU/Linux-i386)
    * Origin: ATMAN - ATM S.A. (110:110/2002@linuxnet)
  • From Jorgen Grahn@1:0/0 to All on Mon Apr 14 14:08:04 2014
    On Mon, 2014-04-14, Adam Wysocki wrote:
    xeon Mailinglist <xeonmailinglist@gmail.com> wrote:

    how can I debug a socket to have more info about the reason
    why this is happening?

    Is there bash commands or socket logs where I can look?

    Try strace(1) or tcpdump(8).

    Yes! Especially the combination strace /and/ tcpdump to you see both
    the process view and the link layer view.

    And in his case perhaps something Java-specific too. I got the feeling
    from the (snipped) error messages that Java added something special to
    the mix (IIRC it used the term "channel").

    /Jorgen

    --
    // Jorgen Grahn <grahn@ Oo o. . .
    \X/ snipabacken.se> O o .

    --- MBSE BBS v1.0.1 (GNU/Linux-i386)
    * Origin: The Kofo System II BBS telnet://fido2.kofobb