Skip to content

doesn't work with localhost, but ok with 127.0.0.1 (guessing related to IPv6) #194

@halturin

Description

@halturin

I got a weird issue. Tried to connect using
websocat ws://localhost:9090/ws
and got this error:

websocat: WebSocketError: I/O failure
websocat: error running

if I change the hostname to the IP address it works well.

my /etc/hosts has localhost records

127.0.0.1 localhost
::1 localhost

telnet command works well with the localhost hostname

$ telnet localhost 9090
Trying ::1...
Connection failed: Connection refused
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.

I guess it tried the IPv6 address, got connection refused, and exited.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions