[
https://issues.jboss.org/browse/TEIID-3124?page=com.atlassian.jira.plugin...
]
Kylin Soong commented on TEIID-3124:
------------------------------------
Root Cause
==========
No hostname IP mapping cause InetAddress.getLocalHost() throw
java.net.UnknownHostException, this trigger teiid-runtime SocketConfiguration.java as [1]
line 79 throw UnknownHostException, but the exception be swallowed, instead with the
TeiidRuntimeException
How reproducible:
================
The following steps for reproduce the issue in Rad Hat Linux 6
1. edit the /etc/sysconfig/network, set a hostname, below is the setting in my machine:
~~~
NETWORKING=yes
HOSTNAME=kylin.redhat.com
~~~
Note: the logout is necessary for let hostname take effect
2. start the JDV
~~~
/standalone.sh
~~~
Note the TeiidRuntimeException throw, this due to SocketConfiguration as [1] line 79
InetAddress.getLocalHost() return UnknownHostException, the swallowed exception like
below:
~~~
Caused by: java.net.UnknownHostException:
kylin.redhat.com: Name or service not known
at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
at java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:901)
at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1293)
at java.net.InetAddress.getLocalHost(InetAddress.java:1469)
... 1 more
~~~
3. edit /etc/hosts, add hostname IP mapping as below:
~~~
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
kylin.redhat.com
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
kylin.redhat.com
~~~
Note: the
kylin.redhat.com are new appended
Expected results
================
Change the SocketConfiguration resolveHostName() method, InetAddress.getLocalHost()have
risk while look up local address via hostname, if no address are mapped the code throw
exception, cause service start up failed
[1]
https://github.com/teiid/teiid/blob/master/runtime/src/main/java/org/teii...
InetAddress getLocalHost return UnknownHostException cause Teiid
service start failed in JBoss Server
-----------------------------------------------------------------------------------------------------
Key: TEIID-3124
URL:
https://issues.jboss.org/browse/TEIID-3124
Project: Teiid
Issue Type: Enhancement
Components: Server
Affects Versions: 8.9
Environment: JDV 6.x
Reporter: Kylin Soong
Assignee: Kylin Soong
After install JDV 6.0.0.GA via
java -jar jboss-dv-installer-6.0.0.GA-redhat-4.jar
start JDV throw the following exception cause some of servers start failed:
~~~
17:17:35,824 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-8) MSC000001:
Failed to start service jboss.teiid.transport.jdbc: org.jboss.msc.service.StartException
in service jboss.teiid.transport.jdbc: Failed to start service
at
org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1767)
[jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
[rt.jar:1.7.0_55]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
[rt.jar:1.7.0_55]
at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_55]
Caused by: org.teiid.core.TeiidRuntimeException: TEIID40065 Failed to resolve the bind
address
at
org.teiid.transport.SocketConfiguration.resolveHostName(SocketConfiguration.java:82)
at
org.teiid.transport.SocketConfiguration.getHostAddress(SocketConfiguration.java:103)
at org.teiid.transport.SocketListener.<init>(SocketListener.java:55)
at org.teiid.jboss.TransportService.start(TransportService.java:157)
at
org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
[jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]
at
org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
[jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]
... 3 more
17:17:35,844 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC000001:
Failed to start service jboss.teiid.transport.odbc: org.jboss.msc.service.StartException
in service jboss.teiid.transport.odbc: Failed to start service
at
org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1767)
[jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
[rt.jar:1.7.0_55]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
[rt.jar:1.7.0_55]
at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_55]
Caused by: org.teiid.core.TeiidRuntimeException: TEIID40065 Failed to resolve the bind
address
at
org.teiid.transport.SocketConfiguration.resolveHostName(SocketConfiguration.java:82)
at
org.teiid.transport.SocketConfiguration.getHostAddress(SocketConfiguration.java:103)
at org.teiid.transport.SocketListener.<init>(SocketListener.java:55)
at org.teiid.transport.ODBCSocketListener.<init>(ODBCSocketListener.java:43)
at org.teiid.jboss.TransportService.start(TransportService.java:181)
at
org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
[jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]
at
org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
[jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]
... 3 more
~~~
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)