Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^2: No data received on client socket

by rbi (Monk)
on Sep 19, 2006 at 20:27 UTC ( #573807=note: print w/ replies, xml ) Need Help??


in reply to Re: No data received on client socket
in thread No data received on client socket

I did try to use your suggested code, but it never gets after:

# Block here until message arrives my ($read_ready) = IO::Select->select($sock_read_hdl, undef, undef, un +def);
This is in line with the behavior of the original code, where the message string is empty, but now I know that no message arrives. Even if I can see with tcpdump that the message arrives on the network card of the Linux client.
Thank you very much in any case.


Comment on Re^2: No data received on client socket
Download Code
Re^3: No data received on client socket
by caelifer (Scribe) on Sep 19, 2006 at 21:16 UTC
    This looks more and more like a network / os configuration problem. Check your host configs. Is there a pocket filter active on the host itself? Is it possible that you have some other client binded to the same port? I'm not sure if socket interface on Windows allows that though. As a last suggestion try write a simple echo server and run it on the localhost with the same port number and see if your application can receive a message. Or maybe simulate a network exchage with Telnet session.

    BR

    # Simple echo server using POE framework (from CPAN) #!/usr/bin/perl use warnings; use strict; use POE qw(Component::Server::TCP); POE::Component::Server::TCP->new( Port => 12345, ClientInput => \&client_input, ); POE::Kernel->run(); exit; sub client_input { my ($heap, $input) = @_[ HEAP, ARG0 ]; print "[$$]: $input\n"; $heap->{client}->put($input); }
      I tried to run the echo server but I don't get anything back.
      This is the tcpdump kind of output I get out of the original script (and with yours and ikegami's suggestions):
      client:/home/user # tcpdump -i eth0 -A port 6928 -xX -vv -s 0 listening on eth0, link-type EN10MB (Ethernet), capture size 65535 byt +es 16:59:48.813909 IP (tos 0x0, ttl 64, id 22143, offset 0, flags [DF], +proto: TCP (6), length: 60) client.12110 > server.6928: 16:59:48.814003 IP (tos 0x0, ttl 128, id 58743, offset 0, flags [DF], +proto: TCP (6), length: 64) server.6928 > client.12110: S, cksum 0x82 +75 (correct), 1326247112:1326247112(0) ack 4102086732 win 17520
      I've noticed that the port on the client changes every time i run the script. May it be this the problem ? How could I stick it to the 6928 port ?
      Unfortunetely I cannot run right now tcpdump on the older Linux boxes where it works fine, to see if there is any difference.
      Thanks a lot for any hint.

        I've noticed that the port on the client changes every time i run the script. May it be this the problem ?

        That's normal.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://573807]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (9)
As of 2014-08-28 04:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (256 votes), past polls