Details
-
Bug
-
Resolution: Fixed
-
Major
-
6.6.4
-
Untriaged
-
1
-
Unknown
Description
In a recent case this error was reported in the ns_server.debug.log
[ns_server:error,2022-06-23T18:00:23.442Z,ns_1@cb-0000.cb.63344c9d-4a8d-464f-b38f-5c4edb2374fc.svc:<0.10890.2388>:menelaus_web_alerts_srv:can_listen:526]Cannot listen due to nxdomain from inet:getaddr[user:info,2022-06-23T18:00:23.442Z,ns_1@cb-0000.cb.63344c9d-4a8d-464f-b38f-5c4edb2374fc.svc:<0.10890.2388>:menelaus_web_alerts_srv:global_alert:120]IP address seems to have changed. Unable to listen on 'ns_1@cb-0000.cb.63344c9d-4a8d-464f-b38f-5c4edb2374fc.svc'. (POSIX error code: 'nxdomain')
|
This error is emitted by this code
check(ip, Opaque, _History, _Stats) -> |
{_Name, Host} = misc:node_name_host(node()), |
case can_listen(Host) of |
{false, Error} -> |
global_alert(ip, fmt_to_bin(errors(ip), [node(), Error])); |
true ->
|
ok
|
end, |
Opaque; |
|
can_listen(Host) -> |
case inet:getaddr(Host, misc:get_net_family()) of |
{error, Err} -> |
?log_error("Cannot listen due to ~p from inet:getaddr~n", [Err]), |
{false, Err}; |
From the doc https://www.erlang.org/doc/man/inet.html#getaddr-2
getaddr(Host, Family) -> {ok, Address} | {error, posix()}
|
Types
|
Host = ip_address() | hostname()
|
Family = address_family()
|
Address = ip_address()
|
|
Returns the IP address for Host as a tuple of integers. Host can be an IP address, a single hostname, or a fully qualified hostname.
|
It seems confusing to report the IP address has changed when a nxdomain error occurs.
Attachments
Issue Links
- backports to
-
MB-55153 [BP 7.1.4] Alerts reports "IP address seems to have changed" for nxdomain errors.
- Closed