View Issue Details

IDProjectCategoryView StatusLast Update
0001756Anope Stable (2.0.x series)Generalpublic2023-04-26 22:48
Reporterhenk Assigned To 
PrioritynormalSeverityminorReproducibilityhave not tried
Status newResolutionopen 
PlatformLinuxOSDebian 
Summary0001756: Connecting to uplink, anope does not honor dns round-robin
DescriptionOne of my two IRC servers went down and anope lost the connection to the network because it was connected to this one.
The uplink is configured with the hostname "irc.netwichtig.de".
This name resolves to two IP addresses.

Anope did not try the other IP, as can be seen in the logs:

@400000006447a347252a2138 2023-04-25 09:53:38.623518008 [Apr 25 09:53:38 2023] Unable to connect to uplink 0000001 (irc.netwichtig.de:7001): Connection refused
@400000006447a348221c78ad 2023-04-25 09:53:39.572291245 [Apr 25 09:53:39 2023] SERVER: services.netwichtig.de (Services for IRC Networks) has connected to the network (uplinked to no uplink)
@400000006447a34822213f6b 2023-04-25 09:53:39.572604267 [Apr 25 09:53:39 2023] Unable to initialize languages, gettext is not installed
@400000006447a348256b7d08 2023-04-25 09:53:39.627801352 [Apr 25 09:53:39 2023] Attempting to connect to uplink 0000001 irc.netwichtig.de (2a01:4f9:2a:f804::6667/7001) with protocol InspIRCd 3
@400000006447a34825739e0e 2023-04-25 09:53:39.628334094 [Apr 25 09:53:39 2023] Unable to connect to uplink 0000001 (irc.netwichtig.de:7001): Connection refused
@400000006447a34922537c23 2023-04-25 09:53:40.575896611 [Apr 25 09:53:40 2023] SERVER: services.netwichtig.de (Services for IRC Networks) has connected to the network (uplinked to no uplink)
@400000006447a34922580ca9 2023-04-25 09:53:40.576195753 [Apr 25 09:53:40 2023] Unable to initialize languages, gettext is not installed
@400000006447a3492584ea1a 2023-04-25 09:53:40.629467674 [Apr 25 09:53:40 2023] Attempting to connect to uplink 0000001 irc.netwichtig.de (2a01:4f9:2a:f804::6667/7001) with protocol InspIRCd 3
@400000006447a349258ce78b 2023-04-25 09:53:40.629991307 [Apr 25 09:53:40 2023] Unable to connect to uplink 0000001 (irc.netwichtig.de:7001): Connection refused
@400000006447a34a22740731 2023-04-25 09:53:41.578029361 [Apr 25 09:53:41 2023] SERVER: services.netwichtig.de (Services for IRC Networks) has connected to the network (uplinked to no uplink)
@400000006447a34a22818d78 2023-04-25 09:53:41.578915704 [Apr 25 09:53:41 2023] Unable to initialize languages, gettext is not installed
@400000006447a34a25c6337c 2023-04-25 09:53:41.633746300 [Apr 25 09:53:41 2023] Attempting to connect to uplink 0000001 irc.netwichtig.de (2a01:4f9:2a:f804::6667/7001) with protocol InspIRCd 3
@400000006447a34a25ce00dc 2023-04-25 09:53:41.634257628 [Apr 25 09:53:41 2023] Unable to connect to uplink 0000001 (irc.netwichtig.de:7001): Connection refused
@400000006447a34b2279d027 2023-04-25 09:53:42.578408487 [Apr 25 09:53:42 2023] SERVER: services.netwichtig.de (Services for IRC Networks) has connected to the network (uplinked to no uplink)
@400000006447a34b227dd429 2023-04-25 09:53:42.578671657 [Apr 25 09:53:42 2023] Unable to initialize languages, gettext is not installed
@400000006447a34b259429ba 2023-04-25 09:53:42.630467002 [Apr 25 09:53:42 2023] Attempting to connect to uplink 0000001 irc.netwichtig.de (2a01:4f9:2a:f804::6667/7001) with protocol InspIRCd 3
@400000006447a34b259b291a 2023-04-25 09:53:42.630925594 [Apr 25 09:53:42 2023] Unable to connect to uplink 0000001 (irc.netwichtig.de:7001): Connection refused

AFAICT connecting to the uplink happens in https://github.com/anope/anope/blob/2.0/src/uplink.cpp#L55 and uses Anope::Resolv from https://github.com/anope/anope/blob/2.0/src/misc.cpp#L728 but it doesn’t seem to loop through the results. at least I can’t find anything like the example code for looping over multiple addresses in https://www.man7.org/linux/man-pages/man3/getaddrinfo.3.html
Steps To Reproduce* have 2 IRCds running on different IPs
* have one domainname with 2 A(AAA) records, one for each of these IPs
* configure anope to point to that domainname
* connect anope
* shutdown the IRCd anope is connected to
* see whether anope tries to connect to both IPs in turn
TagsNo tags attached.

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2023-04-26 22:48 henk New Issue