babashka

m3tti 2025-05-03T05:27:28.826729Z

Hey babashkeans (is that the right term?) i just encountered that i can't get weather with http-client or the httpkit client to localhost so :port that somehow doesn't and http://java.net tells me that the connection was refused. So i tried it with ipv6 http://[::1]:port and it worked. Anyone encountered it and know what happens here?

✅ 1
lispyclouds 2025-05-03T05:52:00.629719Z

How is the server setup? Are you sure it’s not only listening on an ipv6 interface? Does it work with curl?

m3tti 2025-05-03T05:52:46.711299Z

it works with curl and even postman

lispyclouds 2025-05-03T05:54:00.445199Z

Maybe the server is listening on just ipv6 and curl resolves it like that?

m3tti 2025-05-03T05:54:47.493829Z

hrm that could be possible

m3tti 2025-05-03T05:55:14.975769Z

[Sat May  3 07:27:37 2025] [::1]:38030 Accepted
thats what i get even when connecting with curl

lispyclouds 2025-05-03T05:55:26.462319Z

Can you list all the listening ports like with “netstat -tulpn” on unix systems and see if the sever is there?

lispyclouds 2025-05-03T05:55:45.004379Z

It should show the interface it’s on too

lispyclouds 2025-05-03T05:56:36.632929Z

Yeah looks like curl did a ipv6

m3tti 2025-05-03T05:56:56.847229Z

yeah i guess you are right

tcp6       0      0 ::1:8080                :::*                    LISTEN      47572/php8.2     

lispyclouds 2025-05-03T05:57:00.086469Z

Can verify by passing -vvv to see the DNS

2025-05-03T08:15:11.070919Z

I had this problem before, and I solved it by specifying :version option to :http1.1