java.net.UnknownHostException exceptions in Confluence log file due to DNS lookups failing
プラットフォームについて: サーバーと Data Center のみ。この記事は、サーバーおよび Data Center プラットフォームのアトラシアン製品にのみ適用されます。
There are errors in the Confluence log showing that a hostname is unable to be resolved via a DNS server.
This may show up in various formats, but you will see something an error in the file
2013-08-13 14:02:47,223 ERROR [http-8090-17] [core.rest.ui.CreateApplicationLinkUIResource] tryToFetchManifest ManifestNotFoundException thrown while retrieving manifest -- url: /rest/applinks/1.0/applicationlinkForm/manifest.json | userName: USERNAME | referer: BASE_URL/admin/listapplicationlinks.action com.atlassian.applinks.spi.manifest.ManifestNotFoundException: java.net.UnknownHostException: HOSTNAME
The example shows the error showing up on an application link, however, this exception can be caused by any part of Confluence or its Add-Ons which needs to connect to a remote network address.
Log on to the server that is hosting Confluence and try to resolve the hostname which is showing up in the exception, and try to resolve the hostname via DNS manually. For example using the "nslookup" utility which comes by default with most distributions of Linux, and is available on Windows:
Here are some sample diagnoses based on this command's output:
;; connection timed out; no servers could be reached
This means that the DNS resolution servers are not contactable by the server.
** server can't find HOSTNAME: NXDOMAIN
This means that the DNS server is contactable, but can't find an IP address for the host given.
Non-authoritative answer: Name: HOSTNAME Address: IP_ADDRESS
This means that the DNS server has cached the IP address for that host, however that server is definitely capable of resolving the IP address for that host name.
There are several causes for this happening in Confluence, including:
- The DNS server is incorrectly specified in the Operating System's configuration.
- The DNS server is correctly specified in the Operating System's configuration, but the DNS server itself is misconfigured
- The hostname that Confluence is attempting to resolve is incorrect
- There is some other network error causing the Confluence server to be unable to reach the DNS server
It may be possible to work around the issue, if network connectivity is working fine, by specifying the hostname manually in the system's hosts file. This will bypass needing a DNS server to resolve the IP address. This file usually exists in one of the following locations:
- /etc/hosts (Linux)
- %SystemRoot%\system32\drivers\etc\hosts (Windows)
You would simply add a line similar to the following to that file:
10.10.10.10 HOSTNAME.DOMAIN HOSTNAME
Remembering to replace "HOSTNAME.DOMAIN" with the fully-qualified domain name, and "HOSTNAME" with the unqualified domain name.
- If the cause is (1) from above, then configure the Operating System so that the correct DNS server ip address is used.
- If the cause is (2) from above, then diagnose the cause of the DNS server issues, and have them fixed
- If the cause is (3) from above, then find where the hostname is specified in either Confluence's configuration, or an Add-On's configuration, and change to the correct host name
If the cause is (4) from above, then diagnose the cause of the network issues, and have them fixed