Skip to main content
Skip table of contents

Dealing with UnknownHostException

Problem

During exports or when managing export templates the operation fails and an UnknownHostException is printed to the log:

CODE
java.lang.RuntimeException: java.net.UnknownHostException: confserv1: confserv1
    at com.atlassian.security.auth.trustedapps.UIDGenerator.generateUID(UIDGenerator.java:71)
    at com.k15t.scroll.confluence.util.KeyGenerator.generateKey(KeyGenerator.java:18)
    at com.k15t.scroll.confluence.services.task.impl.DefaultAsynchronousTaskManager.startAsyncTask(DefaultAsynchronousTaskManager.java:48)
    at com.k15t.scroll.confluence.web.rest.ExportResource.startExport(ExportResource.java:219)
    ...

Environment

  • Unix servers
  • All Scroll Exporters
  • Scroll Versions
  • Scroll Viewport
  • All versions

Resolution

To solve the UnknownHostException:

  1. Open the file /etc/hosts and check if there is a line for your public IP address containing the hostname (short version and fully qualified).
    For example if your public IP address is 1.2.3.4, the Confluence server's hostname is confserv1 and the public domain of the server is confluence.mycompany.com then make sure a line like this exists:

    CODE
    1.2.3.4 conserv1 confluence.mycompany.com
  2. If there is a line like the one below please split it into two separate lines and replace the loopback IP (127.0.0.1, ::1) with the actual IP of your server:
    Instead of:

    File: /etc/hosts (NOT compatible)

    CODE
    127.0.0.1 localhost localhost.localdomain confserv1 confserv1.local confluence.mycompany.com

    use:

    CODE
    127.0.0.1 localhost localhost.localdomain
    1.2.3.4   confserv1 confserv1.local confluence.mycompany.com

Cause

This typically happens on Unix servers where the networking is set up in a certain way that Java cannot handle correctly.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.