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.