You are not logged in.
pf@vulcan:~ » telnet irc.freenode.net 6667
Server lookup failure: irc.freenode.net:6667, Name or service not known
pf@vulcan:~ » host irc.freenode.net | head -n 2
irc.freenode.net is an alias for chat.freenode.net.
chat.freenode.net has address 192.186.157.43
pf@vulcan:~ » nc irc.freenode.net 6667
:hitchcock.freenode.net NOTICE * :*** Looking up your hostname...
:hitchcock.freenode.net NOTICE * :*** Checking Ident
:hitchcock.freenode.net NOTICE * :*** Couldn't look up your hostname
^C%
pf@vulcan:~ » ping irc.freenode.net
PING chat.freenode.net (31.13.222.109) 56(84) bytes of data.
64 bytes from hitchcock.freenode.net (31.13.222.109): icmp_seq=1 ttl=54 time=32.6 ms
64 bytes from hitchcock.freenode.net (31.13.222.109): icmp_seq=2 ttl=54 time=32.9 ms
64 bytes from hitchcock.freenode.net (31.13.222.109): icmp_seq=3 ttl=54 time=32.7 ms
^C
--- chat.freenode.net ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2002ms
rtt min/avg/max/mdev = 32.693/32.809/32.940/0.101 ms
pf@vulcan:~ » telnet irc.freenode.net 6667
Server lookup failure: irc.freenode.net:6667, Name or service not knownThat happens only with irc.freenode.net and chat.freenode.net and only on one machine, and only with telnet/irssi (ncurses-linked).
Here is telnet strace.
What the hell is going on?
uname == latest pf-kernel
Offline
ewaller@turing ~ 1001 %telnet irc.freenode.net 6667
Trying 94.125.182.252...
Connected to irc.freenode.net.
Escape character is '^]'.
:adams.freenode.net NOTICE * :*** Looking up your hostname...
:adams.freenode.net NOTICE * :*** Checking Ident
:adams.freenode.net NOTICE * :*** Couldn't look up your hostname
:adams.freenode.net NOTICE * :*** No Ident response
ERROR :Closing Link: 127.0.0.1 (Connection timed out)
Connection closed by foreign host.
ewaller@turing ~ 1002 %As a sanity check, what are the output of which telnet and of alias ?
Also, of pacman --Qo telnet
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way
Offline
pf@vulcan:~ » pacman -Qo telnet 1 ↵
/usr/bin/telnet is owned by inetutils 1.9.4-2
pf@vulcan:~ » which telnet
/usr/bin/telnet
pf@vulcan:~ » alias | grep telnet
pf@vulcan:~ »I've narrowed the issue to getaddrinfo() call in telnet and reproduced it with custom app:
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
#include <stdio.h>
int main()
{
struct addrinfo hints;
struct addrinfo* res;
hints.ai_flags = 64;
hints.ai_family = 0;
hints.ai_socktype = 1;
hints.ai_protocol = 0;
hints.ai_addrlen = 0;
hints.ai_addr = 0x0;
hints.ai_canonname = 0x0;
hints.ai_next = 0x0;
int err = getaddrinfo("irc.freenode.net", "6667", &hints, &res);
if (err)
printf("%s\n", gai_strerror(err));
return 0;
}And the output is:
pf@vulcan:~ » ./a.out
Name or service not knownuname == latest pf-kernel
Offline
If I stop systemd-resolved, everything works OK. Hmmmm. Here is my resolved.conf:
[Resolve]
DNS=127.0.0.2
FallbackDNS=8.8.8.8 8.8.4.4 2001:4860:4860::8888 2001:4860:4860::8844
LLMNR=yes127.0.0.2 is local caching DNS server. But it works:
pf@vulcan:~ » host irc.freenode.net 127.0.0.2 | head
Using domain server:
Name: 127.0.0.2
Address: 127.0.0.2#53
Aliases:
irc.freenode.net is an alias for chat.freenode.net.
chat.freenode.net has address 193.10.255.100
chat.freenode.net has address 162.213.39.42
chat.freenode.net has address 94.125.182.252
chat.freenode.net has address 82.96.64.4Why systemd-resolved may fail?
uname == latest pf-kernel
Offline