1

Problem

I am building an image containing the whole Oracle Commerce Guided Search platform, as it is possible to build the image in a successfully manner, the contained Java processes wont be able to run due to the following exception being raised:

Exception in thread "main" java.lang.RuntimeException: java.net.UnknownHostException:37863d1a232e: System error
    at com.endeca.itl.service.ServiceLocator.getService(ServiceLocator.java:226)
    at com.endeca.itl.component.manager.cmd.task.ComponentManagerTask.getManager(ComponentManagerTask.java:69)
    at com.endeca.itl.component.manager.cmd.task.DeleteComponentInstanceTask.process(DeleteComponentInstanceTask.java:71)
    at com.endeca.itl.cmd.BaseCmd.run(BaseCmd.java:464)
    at com.endeca.itl.component.manager.cmd.ComponentManagerCmd.main(ComponentManagerCmd.java:99)
Caused by: java.net.UnknownHostException: 37863d1a232e: System error
    at java.net.Inet4AddressImpl.lookupAllHostAddr(Native Method)
    at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:928)
    at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1323)
    at java.net.InetAddress.getAllByName0(InetAddress.java:1276)
    at java.net.InetAddress.getAllByName(InetAddress.java:1192)
    at java.net.InetAddress.getAllByName(InetAddress.java:1126)
    at org.apache.http.impl.conn.SystemDefaultDnsResolver.resolve(SystemDefaultDnsResolver.java:44)
    at org.apache.http.impl.conn.HttpClientConnectionOperator.connect(HttpClientConnectionOperator.java:102)
    at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:314)
    at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:363)
    at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:219)
    at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:195)
    at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:85)
    at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:108)
    at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:186)
    at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)
    at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:106)
    at com.endeca.itl.util.UrlUtils.ping(UrlUtils.java:180)
    at com.endeca.itl.util.UrlUtils.ping(UrlUtils.java:149)
    at com.endeca.itl.service.ServiceLocator.getService(ServiceLocator.java:217)
    ... 4 more

By looking at the exception, is it clear that the hostname is being set to: 37863d1a232e.

Exception in thread "main" java.lang.RuntimeException: java.net.UnknownHostException: 37863d1a232e: System error

If I check OS $HOSTNAME, I get the following output:

[root@37de552fbd05 bin]# echo $HOSTNAME
37de552fbd05

Which is the same output shown at /etc/hosts/:

[root@37de552fbd05 bin]# cat /etc/hosts/
127.0.0.1       localhost
::1     localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
172.17.0.2      37de552fbd05

But, it is not the one shown at the exception.

What I have tried to workaround the issue?

  1. I have used the --hostname flag as --hostname=localhost
  2. I have tried to solution on this post: 32537977

Facts

  1. I am using Mac OS (High Sierra, 10.13.5) as the hosting machine.
  2. Docker community edition (Engine: 18.03.1-ce) is used to build the Docker Image.
  3. The virtual OS is oraclelinux:7.2
  4. Unfortunately, I have had no success performing the work-arounds mentioned above.

Unfortunately, I have had no success.

Questions

What could be the reason for this to be happening?

Sources

  1. Dockerfile
Eder
  • 1,874
  • 17
  • 34

0 Answers0