Skip Menu |
 

This queue is for tickets about the Net-Ping CPAN distribution.

Report information
The Basics
Id: 45273
Status: rejected
Priority: 0/
Queue: Net-Ping

People
Owner: Nobody in particular
Requestors: XSAWYERX [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 2.35
Fixed in: (no value)



Subject: setting port_number makes ping report as fail
Download (untitled) / with headers
text/plain 322b
While working on Test::Ping (a testing module for Net::Ping), I came across weird behavior in Net::Ping. If I change the port number, subsequent tests will return as fail. This is due to a flag called "econnrefused". I have included a test file to shows the bug, including diagnostics on econnrefused. Thank you. Sawyer.
Subject: pos_bug_net_ping.t
Download pos_bug_net_ping.t
text/x-perl 713b
#!perl # checking for a possible bug in Net::Ping use Test::More tests => 4; use Net::Ping; my $p = Net::Ping->new(); my $host = '127.0.0.1'; my $alive = $p->ping($host); my $key = 'econnrefused'; my $new_port = 7; # simple test, showing econnrefused as undefined diag( "$key: ", $p->{$key} ? $p->{$key} : '(undefined)' ); ok( $alive, "Pinging $host" ); # changing the port to 7, showing econnrefused is now 1 is( $p->port_number, 7, 'Current port number is 7' ); diag("Changing port to $new_port"); $p->port_number(7); diag( "$key: " . $p->{$key} ); is( $p->port_number, 7, 'New port number is still 7' ); # simple test now fails $alive = $p->ping($host); ok( $alive, "Pinging $host" );
Subject: Re: [rt.cpan.org #45273] setting port_number makes ping report as fail
Date: Fri, 24 Apr 2009 08:22:17 -0500
To: bug-Net-Ping [...] rt.cpan.org
From: Steve Peters <steve.peters [...] gmail.com>
Download (untitled) / with headers
text/plain 1.2k
What happens when you try to telnet to port 7? I see something like this. data:perl-smoke steve$ telnet localhost 7 Trying ::1... telnet: connect to address ::1: Connection refused Trying fe80::1... telnet: connect to address fe80::1: Connection refused Trying 127.0.0.1... telnet: connect to address 127.0.0.1: Connection refused telnet: Unable to connect to remote host That means there is a firewall blocking port 7. Steve On Fri, Apr 24, 2009 at 4:44 AM, Sawyer X via RT <bug-Net-Ping@rt.cpan.org>wrote: Show quoted text
> Fri Apr 24 05:44:44 2009: Request 45273 was acted upon. > Transaction: Ticket created by xsawyerx > Queue: Net-Ping > Subject: setting port_number makes ping report as fail > Broken in: 2.35 > Severity: Important > Owner: Nobody > Requestors: XSAWYERX@cpan.org > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=45273 > > > > While working on Test::Ping (a testing module for Net::Ping), I came > across weird behavior in Net::Ping. If I change the port number, > subsequent tests will return as fail. This is due to a flag called > "econnrefused". > > I have included a test file to shows the bug, including diagnostics on > econnrefused. > > Thank you. > Sawyer. >


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.