Comments (3)
$ strace ./test
[...]
recvfrom(3, "\230\263\201\200\0\1\0\1\0\0\0\0\6google\3com\0\0\34\0\1\300\f\0\34"..., 1764, 0, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("172.28.128.1")}, [16]) = 56
close(3) = 0
open("/etc/gai.conf", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=2584, ...}) = 0
fstat(3, {st_mode=S_IFREG|0644, st_size=2584, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f7a40568000
read(3, "# Configuration for getaddrinfo("..., 4096) = 2584
read(3, "", 4096) = 0
close(3) = 0
munmap(0x7f7a40568000, 4096) = 0
futex(0x7f7a3f38ff64, FUTEX_WAKE_PRIVATE, 2147483647) = 0
socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 3
connect(3, {sa_family=AF_INET, sin_port=htons(20480), sin_addr=inet_addr("64.15.113.39")}, 16) = 0
getsockname(3, {sa_family=AF_INET, sin_port=htons(45726), sin_addr=inet_addr("172.28.129.38")}, [16]) = 0
connect(3, {sa_family=AF_UNSPEC, sa_data="\0\0\0\0\0\0\0\0\0\0\0\0\0\0"}, 16) = 0
connect(3, {sa_family=AF_INET, sin_port=htons(20480), sin_addr=inet_addr("64.15.113.35")}, 16) = 0
getsockname(3, {sa_family=AF_INET, sin_port=htons(46867), sin_addr=inet_addr("172.28.129.38")}, [16]) = 0
connect(3, {sa_family=AF_UNSPEC, sa_data="\0\0\0\0\0\0\0\0\0\0\0\0\0\0"}, 16) = 0
connect(3, {sa_family=AF_INET, sin_port=htons(20480), sin_addr=inet_addr("64.15.113.50")}, 16) = 0
getsockname(3, {sa_family=AF_INET, sin_port=htons(46917), sin_addr=inet_addr("172.28.129.38")}, [16]) = 0
connect(3, {sa_family=AF_UNSPEC, sa_data="\0\0\0\0\0\0\0\0\0\0\0\0\0\0"}, 16) = 0
connect(3, {sa_family=AF_INET, sin_port=htons(20480), sin_addr=inet_addr("64.15.113.29")}, 16) = 0
getsockname(3, {sa_family=AF_INET, sin_port=htons(50577), sin_addr=inet_addr("172.28.129.38")}, [16]) = 0
connect(3, {sa_family=AF_UNSPEC, sa_data="\0\0\0\0\0\0\0\0\0\0\0\0\0\0"}, 16) = 0
connect(3, {sa_family=AF_INET, sin_port=htons(20480), sin_addr=inet_addr("64.15.113.54")}, 16) = 0
getsockname(3, {sa_family=AF_INET, sin_port=htons(46491), sin_addr=inet_addr("172.28.129.38")}, [16]) = 0
connect(3, {sa_family=AF_UNSPEC, sa_data="\0\0\0\0\0\0\0\0\0\0\0\0\0\0"}, 16) = 0
connect(3, {sa_family=AF_INET, sin_port=htons(20480), sin_addr=inet_addr("64.15.113.25")}, 16) = 0
getsockname(3, {sa_family=AF_INET, sin_port=htons(45980), sin_addr=inet_addr("172.28.129.38")}, [16]) = 0
connect(3, {sa_family=AF_UNSPEC, sa_data="\0\0\0\0\0\0\0\0\0\0\0\0\0\0"}, 16) = 0
connect(3, {sa_family=AF_INET, sin_port=htons(20480), sin_addr=inet_addr("64.15.113.45")}, 16) = 0
getsockname(3, {sa_family=AF_INET, sin_port=htons(50726), sin_addr=inet_addr("172.28.129.38")}, [16]) = 0
connect(3, {sa_family=AF_UNSPEC, sa_data="\0\0\0\0\0\0\0\0\0\0\0\0\0\0"}, 16) = 0
connect(3, {sa_family=AF_INET, sin_port=htons(20480), sin_addr=inet_addr("64.15.113.24")}, 16) = 0
getsockname(3, {sa_family=AF_INET, sin_port=htons(39382), sin_addr=inet_addr("172.28.129.38")}, [16]) = 0
connect(3, {sa_family=AF_UNSPEC, sa_data="\0\0\0\0\0\0\0\0\0\0\0\0\0\0"}, 16) = 0
connect(3, {sa_family=AF_INET, sin_port=htons(20480), sin_addr=inet_addr("64.15.113.49")}, 16) = 0
getsockname(3, {sa_family=AF_INET, sin_port=htons(44316), sin_addr=inet_addr("172.28.129.38")}, [16]) = 0
connect(3, {sa_family=AF_UNSPEC, sa_data="\0\0\0\0\0\0\0\0\0\0\0\0\0\0"}, 16) = 0
connect(3, {sa_family=AF_INET, sin_port=htons(20480), sin_addr=inet_addr("64.15.113.20")}, 16) = 0
getsockname(3, {sa_family=AF_INET, sin_port=htons(46322), sin_addr=inet_addr("172.28.129.38")}, [16]) = 0
connect(3, {sa_family=AF_UNSPEC, sa_data="\0\0\0\0\0\0\0\0\0\0\0\0\0\0"}, 16) = 0
connect(3, {sa_family=AF_INET, sin_port=htons(20480), sin_addr=inet_addr("64.15.113.30")}, 16) = 0
getsockname(3, {sa_family=AF_INET, sin_port=htons(32960), sin_addr=inet_addr("172.28.129.38")}, [16]) = 0
connect(3, {sa_family=AF_UNSPEC, sa_data="\0\0\0\0\0\0\0\0\0\0\0\0\0\0"}, 16) = 0
connect(3, {sa_family=AF_INET, sin_port=htons(20480), sin_addr=inet_addr("64.15.113.34")}, 16) = 0
getsockname(3, {sa_family=AF_INET, sin_port=htons(46053), sin_addr=inet_addr("172.28.129.38")}, [16]) = 0
connect(3, {sa_family=AF_UNSPEC, sa_data="\0\0\0\0\0\0\0\0\0\0\0\0\0\0"}, 16) = 0
connect(3, {sa_family=AF_INET, sin_port=htons(20480), sin_addr=inet_addr("64.15.113.44")}, 16) = 0
getsockname(3, {sa_family=AF_INET, sin_port=htons(43319), sin_addr=inet_addr("172.28.129.38")}, [16]) = 0
connect(3, {sa_family=AF_UNSPEC, sa_data="\0\0\0\0\0\0\0\0\0\0\0\0\0\0"}, 16) = 0
connect(3, {sa_family=AF_INET, sin_port=htons(20480), sin_addr=inet_addr("64.15.113.55")}, 16) = 0
getsockname(3, {sa_family=AF_INET, sin_port=htons(40255), sin_addr=inet_addr("172.28.129.38")}, [16]) = 0
connect(3, {sa_family=AF_UNSPEC, sa_data="\0\0\0\0\0\0\0\0\0\0\0\0\0\0"}, 16) = 0
connect(3, {sa_family=AF_INET, sin_port=htons(20480), sin_addr=inet_addr("64.15.113.40")}, 16) = 0
getsockname(3, {sa_family=AF_INET, sin_port=htons(56623), sin_addr=inet_addr("172.28.129.38")}, [16]) = 0
connect(3, {sa_family=AF_UNSPEC, sa_data="\0\0\0\0\0\0\0\0\0\0\0\0\0\0"}, 16) = 0
connect(3, {sa_family=AF_INET, sin_port=htons(20480), sin_addr=inet_addr("64.15.113.59")}, 16) = 0
getsockname(3, {sa_family=AF_INET, sin_port=htons(42982), sin_addr=inet_addr("172.28.129.38")}, [16]) = 0
close(3) = 0
socket(PF_INET6, SOCK_DGRAM, IPPROTO_IP) = 3
connect(3, {sa_family=AF_INET6, sin6_port=htons(20480), inet_pton(AF_INET6, "2a00:1450:4014:80b::1005", &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, 28) = -1 ENETUNREACH (Network is unreachable)
close(3) = 0
socket(PF_INET, SOCK_STREAM, IPPROTO_TCP) = 3
fcntl(3, F_GETFL) = 0x2 (flags O_RDWR)
fcntl(3, F_SETFL, O_RDWR|O_NONBLOCK) = 0
connect(3, {sa_family=AF_INET, sin_port=htons(20480), sin_addr=inet_addr("64.15.113.39")}, 16) = -1 EINPROGRESS (Operation now in progress)
select(4, [], [3], NULL, NULL) = ? ERESTARTNOHAND (To be restarted if no handler)
--- SIGVTALRM {si_signo=SIGVTALRM, si_code=SI_TIMER, si_timerid=0, si_overrun=0, si_value={int=0, ptr=0}} ---
rt_sigreturn() = -1 EINTR (Interrupted system call)
select(4, [], [3], NULL, NULL) = ? ERESTARTNOHAND (To be restarted if no handler)
--- SIGVTALRM {si_signo=SIGVTALRM, si_code=SI_TIMER, si_timerid=0, si_overrun=0, si_value={int=0, ptr=0}} ---
rt_sigreturn() = -1 EINTR (Interrupted system call)
select(4, [], [3], NULL, NULL) = ? ERESTARTNOHAND (To be restarted if no handler)
--- SIGVTALRM {si_signo=SIGVTALRM, si_code=SI_TIMER, si_timerid=0, si_overrun=0, si_value={int=0, ptr=0}} ---
rt_sigreturn() = -1 EINTR (Interrupted system call)
select(4, [], [3], NULL, NULL) = ? ERESTARTNOHAND (To be restarted if no handler)
--- SIGVTALRM {si_signo=SIGVTALRM, si_code=SI_TIMER, si_timerid=0, si_overrun=0, si_value={int=0, ptr=0}} ---
rt_sigreturn() = -1 EINTR (Interrupted system call)
select(4, [], [3], NULL, NULL) = ? ERESTARTNOHAND (To be restarted if no handler)
--- SIGVTALRM {si_signo=SIGVTALRM, si_code=SI_TIMER, si_timerid=0, si_overrun=0, si_value={int=0, ptr=0}} ---
rt_sigreturn() = -1 EINTR (Interrupted system call)
select(4, [], [3], NULL, NULL) = ? ERESTARTNOHAND (To be restarted if no handler)
--- SIGVTALRM {si_signo=SIGVTALRM, si_code=SI_TIMER, si_timerid=0, si_overrun=0, si_value={int=0, ptr=0}} ---
rt_sigreturn() = -1 EINTR (Interrupted system call)
select(4, [], [3], NULL, NULL) = ? ERESTARTNOHAND (To be restarted if no handler)
--- SIGVTALRM {si_signo=SIGVTALRM, si_code=SI_TIMER, si_timerid=0, si_overrun=0, si_value={int=0, ptr=0}} ---
rt_sigreturn() = -1 EINTR (Interrupted system call)
select(4, [], [3], NULL, NULL) = ? ERESTARTNOHAND (To be restarted if no handler)
--- SIGVTALRM {si_signo=SIGVTALRM, si_code=SI_TIMER, si_timerid=0, si_overrun=0, si_value={int=0, ptr=0}} ---
rt_sigreturn() = -1 EINTR (Interrupted system call)
select(4, [], [3], NULL, NULL) = ? ERESTARTNOHAND (To be restarted if no handler)
--- SIGVTALRM {si_signo=SIGVTALRM, si_code=SI_TIMER, si_timerid=0, si_overrun=0, si_value={int=0, ptr=0}} ---
rt_sigreturn() = -1 EINTR (Interrupted system call)
select(4, [], [3], NULL, NULL) = ? ERESTARTNOHAND (To be restarted if no handler)
--- SIGVTALRM {si_signo=SIGVTALRM, si_code=SI_TIMER, si_timerid=0, si_overrun=0, si_value={int=0, ptr=0}} ---
rt_sigreturn() = -1 EINTR (Interrupted system call)
select(4, [], [3], NULL, NULL) = ? ERESTARTNOHAND (To be restarted if no handler)
--- SIGVTALRM {si_signo=SIGVTALRM, si_code=SI_TIMER, si_timerid=0, si_overrun=0, si_value={int=0, ptr=0}} ---
rt_sigreturn() = -1 EINTR (Interrupted system call)
select(4, [], [3], NULL, NULL) = ? ERESTARTNOHAND (To be restarted if no handler)
--- SIGVTALRM {si_signo=SIGVTALRM, si_code=SI_TIMER, si_timerid=0, si_overrun=0, si_value={int=0, ptr=0}} ---
rt_sigreturn() = -1 EINTR (Interrupted system call)
select(4, [], [3], NULL, NULL) = ? ERESTARTNOHAND (To be restarted if no handler)
--- SIGVTALRM {si_signo=SIGVTALRM, si_code=SI_TIMER, si_timerid=0, si_overrun=0, si_value={int=0, ptr=0}} ---
rt_sigreturn() = -1 EINTR (Interrupted system call)
select(4, [], [3], NULL, NULL) = ? ERESTARTNOHAND (To be restarted if no handler)
--- SIGVTALRM {si_signo=SIGVTALRM, si_code=SI_TIMER, si_timerid=0, si_overrun=0, si_value={int=0, ptr=0}} ---
rt_sigreturn() = -1 EINTR (Interrupted system call)
select(4, [], [3], NULL, NULL) = ? ERESTARTNOHAND (To be restarted if no handler)
--- SIGVTALRM {si_signo=SIGVTALRM, si_code=SI_TIMER, si_timerid=0, si_overrun=0, si_value={int=0, ptr=0}} ---
rt_sigreturn() = -1 EINTR (Interrupted system call)
select(4, [], [3], NULL, NULL) = ? ERESTARTNOHAND (To be restarted if no handler)
--- SIGVTALRM {si_signo=SIGVTALRM, si_code=SI_TIMER, si_timerid=0, si_overrun=0, si_value={int=0, ptr=0}} ---
rt_sigreturn() = -1 EINTR (Interrupted system call)
select(4, [], [3], NULL, NULL) = ? ERESTARTNOHAND (To be restarted if no handler)
--- SIGVTALRM {si_signo=SIGVTALRM, si_code=SI_TIMER, si_timerid=0, si_overrun=0, si_value={int=0, ptr=0}} ---
rt_sigreturn() = -1 EINTR (Interrupted system call)
select(4, [], [3], NULL, NULL) = ? ERESTARTNOHAND (To be restarted if no handler)
--- SIGVTALRM {si_signo=SIGVTALRM, si_code=SI_TIMER, si_timerid=0, si_overrun=0, si_value={int=0, ptr=0}} ---
rt_sigreturn() = -1 EINTR (Interrupted system call)
select(4, [], [3], NULL, NULL) = ? ERESTARTNOHAND (To be restarted if no handler)
--- SIGVTALRM {si_signo=SIGVTALRM, si_code=SI_TIMER, si_timerid=0, si_overrun=0, si_value={int=0, ptr=0}} ---
rt_sigreturn() = -1 EINTR (Interrupted system call)
select(4, [], [3], NULL, NULL) = ? ERESTARTNOHAND (To be restarted if no handler)
--- SIGVTALRM {si_signo=SIGVTALRM, si_code=SI_TIMER, si_timerid=0, si_overrun=0, si_value={int=0, ptr=0}} ---
rt_sigreturn() = -1 EINTR (Interrupted system call)
select(4, [], [3], NULL, NULL) = ? ERESTARTNOHAND (To be restarted if no handler)
--- SIGVTALRM {si_signo=SIGVTALRM, si_code=SI_TIMER, si_timerid=0, si_overrun=0, si_value={int=0, ptr=0}} ---
rt_sigreturn() = -1 EINTR (Interrupted system call)
select(4, [], [3], NULL, NULL) = ? ERESTARTNOHAND (To be restarted if no handler)
--- SIGVTALRM {si_signo=SIGVTALRM, si_code=SI_TIMER, si_timerid=0, si_overrun=0, si_value={int=0, ptr=0}} ---
rt_sigreturn() = -1 EINTR (Interrupted system call)
select(4, [], [3], NULL, NULL) = ? ERESTARTNOHAND (To be restarted if no handler)
--- SIGVTALRM {si_signo=SIGVTALRM, si_code=SI_TIMER, si_timerid=0, si_overrun=0, si_value={int=0, ptr=0}} ---
rt_sigreturn() = -1 EINTR (Interrupted system call)
select(4, [], [3], NULL, NULL) = ? ERESTARTNOHAND (To be restarted if no handler)
--- SIGVTALRM {si_signo=SIGVTALRM, si_code=SI_TIMER, si_timerid=0, si_overrun=0, si_value={int=0, ptr=0}} ---
rt_sigreturn() = -1 EINTR (Interrupted system call)
select(4, [], [3], NULL, NULL) = ? ERESTARTNOHAND (To be restarted if no handler)
--- SIGVTALRM {si_signo=SIGVTALRM, si_code=SI_TIMER, si_timerid=0, si_overrun=0, si_value={int=0, ptr=0}} ---
rt_sigreturn() = -1 EINTR (Interrupted system call)
select(4, [], [3], NULL, NULL) = ? ERESTARTNOHAND (To be restarted if no handler)
--- SIGVTALRM {si_signo=SIGVTALRM, si_code=SI_TIMER, si_timerid=0, si_overrun=0, si_value={int=0, ptr=0}} ---
rt_sigreturn() = -1 EINTR (Interrupted system call)
select(4, [], [3], NULL, NULL) = ? ERESTARTNOHAND (To be restarted if no handler)
--- SIGVTALRM {si_signo=SIGVTALRM, si_code=SI_TIMER, si_timerid=0, si_overrun=0, si_value={int=0, ptr=0}} ---
rt_sigreturn() = -1 EINTR (Interrupted system call)
select(4, [], [3], NULL, NULL) = ? ERESTARTNOHAND (To be restarted if no handler)
--- SIGVTALRM {si_signo=SIGVTALRM, si_code=SI_TIMER, si_timerid=0, si_overrun=0, si_value={int=0, ptr=0}} ---
rt_sigreturn() = -1 EINTR (Interrupted system call)
select(4, [], [3], NULL, NULL) = ? ERESTARTNOHAND (To be restarted if no handler)
--- SIGVTALRM {si_signo=SIGVTALRM, si_code=SI_TIMER, si_timerid=0, si_overrun=0, si_value={int=0, ptr=0}} ---
rt_sigreturn() = -1 EINTR (Interrupted system call)
select(4, [], [3], NULL, NULL) = ? ERESTARTNOHAND (To be restarted if no handler)
--- SIGVTALRM {si_signo=SIGVTALRM, si_code=SI_TIMER, si_timerid=0, si_overrun=0, si_value={int=0, ptr=0}} ---
rt_sigreturn() = -1 EINTR (Interrupted system call)
select(4, [], [3], NULL, NULL) = ? ERESTARTNOHAND (To be restarted if no handler)
--- SIGVTALRM {si_signo=SIGVTALRM, si_code=SI_TIMER, si_timerid=0, si_overrun=0, si_value={int=0, ptr=0}} ---
rt_sigreturn() = -1 EINTR (Interrupted system call)
select(4, [], [3], NULL, NULL) = ? ERESTARTNOHAND (To be restarted if no handler)
--- SIGVTALRM {si_signo=SIGVTALRM, si_code=SI_TIMER, si_timerid=0, si_overrun=0, si_value={int=0, ptr=0}} ---
timer_settime(0, 0, {it_interval={0, 0}, it_value={0, 0}}, NULL) = 0
rt_sigreturn() = -1 EINTR (Interrupted system call)
select(4, [], [3], NULL, NULL
[at this point no further new lines]
from hs-connection.
very likely you're trying to connect to the wrong port 20480 instead of the port 80. Sadly the network package is terrible, and PortNumber's "content" is supposed to be in network endianness instead of host endianness.
Instead of using 'PortNumber' you should use 'fromIntegral' which will transform the port you want to network endianness.
I'm not sure why you don't get a connection refused or timeout eventually, but this has probably something to do with the network package itself, not connection.
from hs-connection.
Indeed, sorry for the noise
from hs-connection.
Related Issues (20)
- Usage with Handle -> IO ()? HOT 4
- Don't get an exception on a timeout HOT 1
- IPv6? HOT 8
- Wait for data with a timeout
- TLSSettingsSimple is too simple, TLSSettings is unwieldy HOT 1
- https://badssl.com/ test failure HOT 2
- Connection-0.2.6 breaks Amazonka (stackage lts-6.12 on up) HOT 17
- Support for HsOpenSSL HOT 1
- Potential open socket leak when TLS handshake fails HOT 2
- Socket/Handle leak in versions 0.2.6 and 0.2.7 HOT 9
- Ambiguous docs on re-using TLS sessions
- Error compiling connection-0.3.0 HOT 2
- sessionResumeOnlyOnce HOT 3
- Confusing docs on connectionGetLine
- Export `globalCertificateStore` field of `ConnectionContext`
- Need away to set socket options on a connection backed by a socket
- Specify whether IPv6 addresses are bracketed in HostName (and export HostName) HOT 1
- HostNotResolved can never happen?
- connection-0.2.5 fails to build with GHC 9.0.2 HOT 5
- Relax upper bound on dependency on `tls` HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hs-connection.