14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
# File 'lib/gdk/diagnostic/hostname.rb', line 14
def detail
return if success?
if hostname_ips.empty?
return <<~MESSAGE
Could not resolve IP address for the GDK hostname `#{hostname}`
Is it set up in `/etc/hosts`?
MESSAGE
end
<<~MESSAGE
The GDK hostname `#{hostname}` resolves to the IP addresses #{hostname_ips.join(', ')}.
The listen_address defined in your GDK config is `#{listen_address}`.
You should make sure that the two match.
Either fix the IP address in `/etc/hosts` to match #{listen_address}, or run:
#{hostname_ips.map { |ip| "gdk config set listen_address #{ip}" }.join("\n")}
MESSAGE
end
|