Skip Menu |

This queue is for tickets about the HTTP-Server-Simple CPAN distribution.

Report information
The Basics
Id: 67249
Status: resolved
Priority: 0/
Queue: HTTP-Server-Simple

People
Owner: Nobody in particular
Requestors: bo.johansson [...] lsn.se
Cc:
AdminCc:

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



Subject: Tests are blocking in Windows 7 and problem to create connections
Problems: 1) Tests hang The tests 01live.t and 04cgi.t hang at the end. The cause of this is probably that kill(9,$pid) in Windows on a forked process is unsafe (and should not be used). Running “perl -IHTTP-Server-Simple-0.44/lib HTTP-Server-Simple-0.44/t/01live.t” in a command window get it in a state that it is not killable using “Task Manager”. Is there any way to shut down the forked process without using kill? See also https://rt.cpan.org/Public/Bug/Display.html?id=66016#txn-910239 2) Connection can not be created There are error messages like: “ [ERROR] connect: No connection could be made because the target machine actively refused it”. Where to search for the problem? See also the attached files! I am using: * Strawberry-perl-5.12.2.0 * Perl 5, version 12, subversion 2 (v5.12.2) built for MSWin32-x86-multi-thread * Windows 7 Home Premium with Service Pack 1
Subject: 04cgi.t
perl -IHTTP-Server-Simple-0.44/lib HTTP-Server- Simple-0.44/t/04cgi.t 1..23 ok 1 - Constructor set port correctly ok 2 - pid is numeric not ok 3 - no file # Failed test 'no file' # at HTTP-Server-Simple-0.44/t/04cgi.t line 51. # '[ERROR] connect: No connection could be made because the ta rget machine actively refused it. at HTTP-Server-Simple-0.44/t/04cgi.t line 110, <DATA> line 16. # ' # doesn't match '/NOFILE/' not ok 4 - method - server_software # Failed test 'method - server_software' # at HTTP-Server-Simple-0.44/t/04cgi.t line 55. # '[ERROR] connect: No connection could be made because the ta rget machine actively refused it. at HTTP-Server-Simple-0.44/t/04cgi.t line 110, <DATA> line 16. # ' # doesn't match '/server_software: HTTP::Server::Simple/\d+.\d+/' not ok 5 - method - request_method # Failed test 'method - request_method' # at HTTP-Server-Simple-0.44/t/04cgi.t line 55. # '[ERROR] connect: No connection could be made because the ta rget machine actively refused it. at HTTP-Server-Simple-0.44/t/04cgi.t line 110, <DATA> line 16. # ' # doesn't match '/request_method: GET/' not ok 6 - method - url # Failed test 'method - url' # at HTTP-Server-Simple-0.44/t/04cgi.t line 55. # '[ERROR] connect: No connection could be made because the ta rget machine actively refused it. at HTTP-Server-Simple-0.44/t/04cgi.t line 110, <DATA> line 16. # ' # doesn't match '/url: http://bo-staPav:46091/' not ok 7 - method - server_port # Failed test 'method - server_port' # at HTTP-Server-Simple-0.44/t/04cgi.t line 55. # '[ERROR] connect: No connection could be made because the ta rget machine actively refused it. at HTTP-Server-Simple-0.44/t/04cgi.t line 110, <DATA> line 16. # ' # doesn't match '/server_port: 46091/' not ok 8 - method - path_info # Failed test 'method - path_info' # at HTTP-Server-Simple-0.44/t/04cgi.t line 55. # '[ERROR] connect: No connection could be made because the ta rget machine actively refused it. at HTTP-Server-Simple-0.44/t/04cgi.t line 110, <DATA> line 16. # ' # doesn't match '/path_info: /cgitest/path_info/' not ok 9 - method - server_name # Failed test 'method - server_name' # at HTTP-Server-Simple-0.44/t/04cgi.t line 55. # '[ERROR] connect: No connection could be made because the ta rget machine actively refused it. at HTTP-Server-Simple-0.44/t/04cgi.t line 110, <DATA> line 16. # ' # doesn't match '/server_name: bo-staPav/' not ok 10 - Environment - SERVER_NAME # Failed test 'Environment - SERVER_NAME' # at HTTP-Server-Simple-0.44/t/04cgi.t line 64. # '[ERROR] connect: No connection could be made because the ta rget machine actively refused it. at HTTP-Server-Simple-0.44/t/04cgi.t line 110, <DATA> line 16. # ' # doesn't match '/SERVER_NAME: bo-staPav/' not ok 11 - Environment - REMOTE_ADDR # Failed test 'Environment - REMOTE_ADDR' # at HTTP-Server-Simple-0.44/t/04cgi.t line 64. # '[ERROR] connect: No connection could be made because the ta rget machine actively refused it. at HTTP-Server-Simple-0.44/t/04cgi.t line 110, <DATA> line 16. # ' # doesn't match '/REMOTE_ADDR: 127.0.0.1/' not ok 12 - Environment - PATH_INFO # Failed test 'Environment - PATH_INFO' # at HTTP-Server-Simple-0.44/t/04cgi.t line 64. # '[ERROR] connect: No connection could be made because the ta rget machine actively refused it. at HTTP-Server-Simple-0.44/t/04cgi.t line 110, <DATA> line 16. # ' # doesn't match '/PATH_INFO: /cgitest/PATH_INFO/' not ok 13 - Environment - SERVER_PROTOCOL # Failed test 'Environment - SERVER_PROTOCOL' # at HTTP-Server-Simple-0.44/t/04cgi.t line 64. # '[ERROR] connect: No connection could be made because the ta rget machine actively refused it. at HTTP-Server-Simple-0.44/t/04cgi.t line 110, <DATA> line 16. # ' # doesn't match '/SERVER_PROTOCOL: HTTP/1.1/' not ok 14 - Environment - REQUEST_METHOD # Failed test 'Environment - REQUEST_METHOD' # at HTTP-Server-Simple-0.44/t/04cgi.t line 64. # '[ERROR] connect: No connection could be made because the ta rget machine actively refused it. at HTTP-Server-Simple-0.44/t/04cgi.t line 110, <DATA> line 16. # ' # doesn't match '/REQUEST_METHOD: GET/' not ok 15 - Environment - REQUEST_URI # Failed test 'Environment - REQUEST_URI' # at HTTP-Server-Simple-0.44/t/04cgi.t line 64. # '[ERROR] connect: No connection could be made because the ta rget machine actively refused it. at HTTP-Server-Simple-0.44/t/04cgi.t line 110, <DATA> line 16. # ' # doesn't match '/REQUEST_URI: /cgitest/REQUEST_URI/' not ok 16 - Environment - SERVER_SOFTWARE # Failed test 'Environment - SERVER_SOFTWARE' # at HTTP-Server-Simple-0.44/t/04cgi.t line 64. # '[ERROR] connect: No connection could be made because the ta rget machine actively refused it. at HTTP-Server-Simple-0.44/t/04cgi.t line 110, <DATA> line 16. # ' # doesn't match '/SERVER_SOFTWARE: HTTP::Server::Simple/\d+.\d+/' not ok 17 - Environment - QUERY_STRING # Failed test 'Environment - QUERY_STRING' # at HTTP-Server-Simple-0.44/t/04cgi.t line 64. # '[ERROR] connect: No connection could be made because the ta rget machine actively refused it. at HTTP-Server-Simple-0.44/t/04cgi.t line 110, <DATA> line 16. # ' # doesn't match '/QUERY_STRING: /' not ok 18 - Environment - SERVER_URL # Failed test 'Environment - SERVER_URL' # at HTTP-Server-Simple-0.44/t/04cgi.t line 64. # '[ERROR] connect: No connection could be made because the ta rget machine actively refused it. at HTTP-Server-Simple-0.44/t/04cgi.t line 110, <DATA> line 16. # ' # doesn't match '/SERVER_URL: http://bo-staPav:46091//' not ok 19 - Environment - SERVER_PORT # Failed test 'Environment - SERVER_PORT' # at HTTP-Server-Simple-0.44/t/04cgi.t line 64. # '[ERROR] connect: No connection could be made because the ta rget machine actively refused it. at HTTP-Server-Simple-0.44/t/04cgi.t line 110, <DATA> line 16. # ' # doesn't match '/SERVER_PORT: 46091/' not ok 20 - Didn't decode already # Failed test 'Didn't decode already' # at HTTP-Server-Simple-0.44/t/04cgi.t line 73. # '[ERROR] connect: No connection could be made because the ta rget machine actively refused it. at HTTP-Server-Simple-0.44/t/04cgi.t line 110, <DATA> line 16. # ' # doesn't match '(?-xism:foo%3Fbar)' not ok 21 - Did decode already # Failed test 'Did decode already' # at HTTP-Server-Simple-0.44/t/04cgi.t line 78. # '[ERROR] connect: No connection could be made because the ta rget machine actively refused it. at HTTP-Server-Simple-0.44/t/04cgi.t line 110, <DATA> line 16. # ' # doesn't match '(?-xism:foo/bar)' not ok 22 - uses HTTP_COOKIE # Failed test 'uses HTTP_COOKIE' # at HTTP-Server-Simple-0.44/t/04cgi.t line 84. # '[ERROR] connect: No connection could be made because the ta rget machine actively refused it. at HTTP-Server-Simple-0.44/t/04cgi.t line 110, <DATA> line 16. # ' # doesn't match '(?-xism:foo=bar)' ok 23 - Signaled 1 process successfully # Looks like you failed 20 tests of 23.
Subject: 01live.t
perl -IHTTP-Server-Simple-0.44/lib HTTP-Server-Simple-0.44/t/01live.t 1..14 ok 1 - Constructor set port correctly ok 2 - pid is numeric not ok 3 - Returns a page # Failed test 'Returns a page' # at HTTP-Server-Simple-0.44/t/01live.t line 124. # '[ERROR] connect: No connection could be made because the ta rget machine actively refused it. at HTTP-Server-Simple-0.44/t/01live.t line 85, <DATA> line 16. # ' # doesn't match '/Congratulations/' ok 4 - Constructor set port correctly ok 5 - pid is numeric not ok 6 - Returns a page # Failed test 'Returns a page' # at HTTP-Server-Simple-0.44/t/01live.t line 124. # '[ERROR] connect: No connection could be made because the ta rget machine actively refused it. at HTTP-Server-Simple-0.44/t/01live.t line 85, <DATA> line 16. # ' # doesn't match '/Congratulations/' ok 7 - pid is numeric HTTP::Server::Simple::CGI: You can connect to your server at http://localhost:48 134/ ok 8 - Returns a page ok 9 - knows what a request isn't ok 10 - HTTP/1.1 request ok 11 - HTTP/0.9 request ok 12 - Signaled 1 process successfully ok 13 - Killed PID: -4216 ok 14 - Killed PID: -6128 # Looks like you failed 2 tests of 14.
From: bo.johansson [...] lsn.se
More info. Connections are not created because: 1)$self->host is undefined when sub setup_listener is called. 2)The call to listen (listen( HTTPDaemon, SOMAXCONN ) or croak "listen: $!") does not work. It also does not return. The same occurs when $self->host is '0.0.0.0'. See also: http://www.perlmonks.org/index.pl?node_id=897977 and https://groups.google.com/group/perl.perl5.porters/browse_thread/thread/27f1b5350f90921a.
On Fri Apr 08 11:39:19 2011, boilund wrote: Show quoted text
> More info. > > Connections are not created because: > > 1)$self->host is undefined when sub setup_listener is called. > 2)The call to listen (listen( HTTPDaemon, SOMAXCONN ) or croak > "listen: > $!") does not work. It also does not return. > > The same occurs when $self->host is '0.0.0.0'. > > See also: http://www.perlmonks.org/index.pl?node_id=897977 and > https://groups.google.com/group/perl.perl5.porters/browse_thread/thread/27f1b5350f90921a.
0.50 prereleases have been passing tests on strawberry smokers, let us know if you're still having issues. -kevin
Subject: Re: [rt.cpan.org #67249] Tests are blocking in Windows 7 and problem to create connections
Date: Tue, 3 Feb 2015 11:57:44 +0100
To: <bug-HTTP-Server-Simple [...] rt.cpan.org>
From: "Bo Johansson" <bo.johansson [...] lsn.se>

Message body is not shown because it is too large.