Closed iharsuvorau closed 5 years ago
Is localhost correctly resolving? There is no ipv4-ipv6 discrepancies?
@stassats
Is localhost correctly resolving?
I request the localhost with curl
successfully, seems like it resolves correctly, doesn't it?
dig localhost
→ 127.0.0.1
There is no ipv4-ipv6 discrepancies?
How do I check this? Still, it works fine for web browsers, curl
and Go-programs at least.
Does (drakma:http-request "http://127.0.0.1:7070") work?
@stassats
Does (drakma:http-request "http://127.0.0.1:7070") work?
Nope. The same USOCKET:CONNECTION-REFUSED-ERROR
error.
And curl http://127.0.0.1:7070 ?
@stassats
And curl http://127.0.0.1:7070 ?
Well, curl
also fails with Connection refused
using 127.0.0.1:7070
, but works with localhost:7070
. Why is that?
netstat -n | grep 7070
@stassats
netstat -n | grep 7070
Got nothing.
Rather do lsof -n -i:7070
@stassats
lsof -n -i:7070
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
php 96090 ihar 7u IPv6 0x7ad446e2d88a5083 0t0 TCP [::1]:arcp (LISTEN)
So, it's listening on an ipv6 address indeed. I guess start it with php -S 127.0.0.1:7070
@stassats
So, it's listening on an ipv6 address indeed. I guess start it with php -S 127.0.0.1:7070
You're correct. That works. Thanks a lot for your time explaining that to me.
I'm not sure it's the issue with
drakma
, becausedexador
, for example, fails in the same way. So, please, maybe you can point to where should I look to solve the issue. The long version is on the stackoverflow still open question.Seems like the problem is related to the particular PHP built-it webserver for development, because the issue is reproducible only with:
sbcl/1.4.16
)2.0.4
)But the PHP webserver serves fine for
curl
, a Go client, a web browser.PHP version:
-- installed with
brew install php
.Steps to reproduce
The server:
Then try with clients:
-- works fine (status code 404 is expected and received).
Lisp:
-- fails (status code 404 is expected but
connection refused
is returned).