Subject: | Net::Async::HTTP version 0.41 : proxy_server / proxy_host not working |
Date: | Mon, 22 Jan 2018 17:03:02 +0100 |
To: | bug-Net-Async-HTTP [...] rt.cpan.org |
From: | gora mbow <mbow.gora [...] gmail.com> |
Hello,
I am not able to use the proxy_server / proxy_host options, getting error
"Name or service not known failed [-2]".
I am using Net::Async::HTTP version 0.41 with perl 10.0.1 on a Linux box
Here is a small script that reproduces the issue on my machine.
[cdpstats@FRMSMONADM01 safir]$ perl -we '
use Net::Async::HTTP;
use IO::Async::Loop;
print "Net::Async::HTTP version is ", $Net::Async::HTTP::VERSION, "\n";
my $h = Net::Async::HTTP->new;
IO::Async::Loop->new->add($h);
$h->GET("http://safir.rm.corp.local", proxy_host => "http://146.249.250.136",
proxy_port => "8090")->get;
'
Net::Async::HTTP version is 0.41
http://146.249.250.136:8090 - Name or service not known failed [-2] at -e
line 7.
[cdpstats@FRMSMONADM01 safir]$
And here is the equivalent CURL command, launched from the very same
server, which is working fine.
[cdpstats@FRMSMONADM01 safir]$ curl --verbose --proxy 146.249.250.136:8090
http://safir.rm.corp.local
* About to connect() to proxy 146.249.250.136 port 8090 (#0)
* Trying 146.249.250.136... connected
* Connected to 146.249.250.136 (146.249.250.136) port 8090 (#0)
Show quoted text
> GET http://safir.rm.corp.local/ HTTP/1.1
> User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.18
Basic ECC zlib/1.2.3 libidn/1.18 libssh2/1.4.2
Show quoted text> Host: safir.rm.corp.local
> Accept: */*
> Proxy-Connection: Keep-Alive
>
< HTTP/1.1 200 OK
< Date: Mon, 22 Jan 2018 13:19:07 GMT
< Server: Apache/2.2.15 (Red Hat)
< Last-Modified: Fri, 20 Jan 2017 21:31:25 GMT
< ETag: "8a098-195-5468d5f396402"
< Accept-Ranges: bytes
< Content-Length: 405
< Content-Type: text/html; charset=UTF-8
< Proxy-Connection: Keep-Alive
< Connection: Keep-Alive
< Age: 6924
<
<html>
<head>
<meta http-equiv='refresh' content='1;url=/prd/page/home'>
<script type='text/javascript'>
window.location.href = '/prd/page/home'
</script>
<title>Page Redirection</title>
</head>
<body>
If you are not redirected automatically, please follow this <a
href='http://safir.rm.corp.local/prd/page/home'>link</a>.
</body>
</html>
* Connection #0 to host 146.249.250.136 left intact
* Closing connection #0
[cdpstats@FRMSMONADM01 safir]$
## OS VERSION ##
[cdpstats@FRMSMONADM01 safir]$ uname -a
Linux FRMSMONADM01 2.6.32-573.12.1.el6.x86_64 #1 SMP Mon Nov 23 12:55:32
EST 2015 x86_64 x86_64 x86_64 GNU/Linux
[cdpstats@FRMSMONADM01 safir]$
## PERL VERSION ##
[cdpstats@FRMSMONADM01 safir]$ perl -V
Summary of my perl5 (revision 5 version 10 subversion 1) configuration:
Platform:
osname=linux, osvers=2.6.18-402.el5, archname=x86_64-linux-thread-multi
uname='linux x86-027.build.eng.bos.redhat.com 2.6.18-402.el5 #1 smp thu
jan 8 06:22:34 est 2015 x86_64 x86_64 x86_64 gnulinux '
config_args='-des -Doptimize=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2
-fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64
-mtune=generic -DDEBUGGING=-g -Dversion=5.10.1 -Dmyhostname=localhost
-Dperladmin=root@localhost -Dcc=gcc -Dcf_by=Red Hat, Inc. -Dprefix=/usr
-Dvendorprefix=/usr -Dsiteprefix=/usr/local
-Dsitelib=/usr/local/share/perl5 -Dsitearch=/usr/local/lib64/perl5
-Dprivlib=/usr/share/perl5 -Darchlib=/usr/lib64/perl5
-Dvendorlib=/usr/share/perl5/vendor_perl
-Dvendorarch=/usr/lib64/perl5/vendor_perl -Dinc_version_list=5.10.0
-Darchname=x86_64-linux-thread-multi -Dlibpth=/usr/local/lib64 /lib64
/usr/lib64 -Duseshrplib -Dusethreads -Duseithreads -Duselargefiles
-Dd_dosuid -Dd_semctl_semun -Di_db -Ui_ndbm -Di_gdbm -Di_shadow -Di_syslog
-Dman3ext=3pm -Duseperlio -Dinstallusrbinperl=n -Ubincompat5005
-Uversiononly -Dpager=/usr/bin/less -isr -Dd_gethostent_r_proto
-Ud_endhostent_r_proto -Ud_sethostent_r_proto -Ud_endprotoent_r_proto
-Ud_setprotoent_r_proto -Ud_endservent_r_proto -Ud_setservent_r_proto
-Dscriptdir=/usr/bin -Dusesitecustomize'
hint=recommended, useposix=true, d_sigaction=define
useithreads=define, usemultiplicity=define
useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
use64bitint=define, use64bitall=define, uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='gcc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing
-pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64',
optimize='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic',
cppflags='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe
-fstack-protector -I/usr/local/include'
ccversion='', gccversion='4.4.7 20120313 (Red Hat 4.4.7-14)',
gccosandvers=''
intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=8
alignbytes=8, prototype=define
Linker and Libraries:
ld='gcc', ldflags =' -fstack-protector'
libpth=/usr/local/lib64 /lib64 /usr/lib64
libs=-lresolv -lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lpthread -lc
perllibs=-lresolv -lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
libc=, so=so, useshrplib=true, libperl=libperl.so
gnulibc_version='2.12'
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E
-Wl,-rpath,/usr/lib64/perl5/CORE'
cccdlflags='-fPIC', lddlflags='-shared -O2 -g -pipe -Wall
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
--param=ssp-buffer-size=4 -m64 -mtune=generic'
Characteristics of this binary (from libperl):
Compile-time options: MULTIPLICITY PERL_DONT_CREATE_GVSV
PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP
USE_64_BIT_ALL
USE_64_BIT_INT USE_ITHREADS USE_LARGE_FILES
USE_PERLIO USE_REENTRANT_API USE_SITECUSTOMIZE
Built under linux
Compiled at Mar 13 2015 07:49:15
%ENV:
PERLBREW_BASHRC_VERSION="0.80"
PERLBREW_HOME="/home/cdpstats/.perlbrew"
PERLBREW_ROOT="/appli/stats/P/safir/perl5/perlbrew"
@INC:
/usr/local/lib64/perl5
/usr/local/share/perl5
/usr/lib64/perl5/vendor_perl
/usr/share/perl5/vendor_perl
/usr/lib64/perl5
/usr/share/perl5
.
[cdpstats@FRMSMONADM01 safir]$