how debug sockets

Discussion in 'Linux Networking' started by xeon Mailinglist, Apr 13, 2014.

  1. 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 60000 millis timeout while waiting for channel to be ready for read. ch : java.nio.channels.SocketChannel[connected local=/ remote=/]

    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?
    xeon Mailinglist, Apr 13, 2014
    1. Advertisements

  2. xeon Mailinglist

    Adam Wysocki Guest

    Try strace(1) or tcpdump(8).

    Adam Wysocki, Apr 14, 2014
    1. Advertisements

  3. xeon Mailinglist

    Jorgen Grahn Guest

    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 Grahn, Apr 14, 2014
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.