我正在构建包含整个Oracle Commerce Guided Search平台的映像,因为可以成功地构建映像,由于引发了以下异常,因此所包含的Java进程将无法运行:>
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
通过查看异常,可以清楚地看到主机名被设置为: 37863d1a232e 。
Exception in thread "main" java.lang.RuntimeException: java.net.UnknownHostException: 37863d1a232e: System error
如果我检查操作系统$ HOSTNAME,则会得到以下输出:
[root@37de552fbd05 bin]# echo $HOSTNAME
37de552fbd05
与/ 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
但是,这并不是例外。
不幸的是,我没有成功。
发生这种情况的原因可能是什么?