Ping timeout

dsgn
2016-12-21
2017-01-04
  • dsgn

    dsgn - 2016-12-21

    Hi, I am using v3.1 and the ping utility doesn't work as it should.
    I can ping hosts which are alive and respond to ping, there is no problem with that. But if I ping a host which is not alive than the task just times out and at the end I get an Apache error

    Gateway Time-out

    The gateway did not receive a timely response from the upstream server or application.

    error.log

    [client x.x.x.x] Timeout waiting for output from CGI script /gestioip/ip_checkhost.cgi
    [client x.x.x.x] Script timed out before returning headers: ip_checkhost.cgi

    I already applied the patches to External.pm perl module files as described here
    /usr/local/share/perl/5.14.2/Net/Ping/External.pm
    /usr/share/perl5/Net/Ping/External.pm

    When I test with a script like below, I get the correct results for hosts which are alive and which are not alive.

    1
    2
    3
    4
    5
    6
    7
    8
    9
    #!/usr/bin/perl -w
    use Net::Ping::External qw(ping);
    my $ip_ad="192.168.1.1";
    my $p = ping(host => "$ip_ad");
    if ( $p ) {
    print "\n$ip_ad: responds to ping\n";
    } else {
    print "\n$ip_ad: no answer\n";
    }
    

    I am using Debian 7. I hope you can help me out on this issue.

     
    Last edit: dsgn 2016-12-21
  • Marc Uebel

    Marc Uebel - 2016-12-21

    Hi
    Thank you for reporting that issue.
    I'm not able to reproduce it.
    Can you modify your test script, adding a timeout and try again?

    my $p = ping(host => "$ip_ad", timeout => 2);

    Does this work?
    Thank's
    Marc

     
  • dsgn

    dsgn - 2016-12-22

    Yes, it works with timeout in my test script. I get this error in my browser

    Gateway Time-out
    The gateway did not receive a timely response from the upstream server or application.

    and these are my apache2 logs..

    [warn] [client x.x.x.x] Timeout waiting for output from CGI script ip_checkhost.cgi
    [warn] [client x.x.x.x] Timeout waiting for output from CGI script ip_checkhost.cgi
    [warn] [client x.x.x.x] Timeout waiting for output from CGI script ip_checkhost.cgi
    [error] [client x.x.x.x] Script timed out before returning headers: ip_checkhost.cgi

     
  • dsgn

    dsgn - 2017-01-04

    any ideas?

     
  • Marc Uebel

    Marc Uebel - 2017-01-04

    As I'm not able to reproduce the problem (and it was never reported before), in the moment I do not have a solution. I will keep it in mind and update this thread if I find something new.
    Thank you,
    Marc

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks