I have seen this happen with an improperly configured /etc/hosts file.

If nsswitch is configured to use 'files' for the 'hosts:' key, the native code Java calls will query the /etc/hosts file.

I think it was due to some bug with a configuration system for OpenStack instances. It was populating /etc/hosts such that localhost was mapped to a public IP address instead of something like 127.0.0.1.

--
Derek

On 10/7/14 3:17, Spico Florin wrote:
Hello!
   My question is what triggers that IP to be encoded with "-" char
instead of "."? On the client side I'm getting the mentioned  in the
StormSubmitter class:
  java.net.UnknownHostException: xx-xxx-xxx-xxx at
backtype.storm.StormSubmitter.<clinit>(StormSubmitter.java:48)
at java.net.Inet4AddressImpl.lookupAllHostAddr(Native Method)
         at      at
java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:901)
         at      at
java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1293)
         at      at java.net.InetAddress.getLocalHost(InetAddress.java:1469)

and in the worker in the DisruptorQueue.java:128
Caused by: java.net.UnknownHostException: xxx-xxx-xxx-xxx:
xxx-xxx-xxx-xxx Name or service not known
         at java.net.InetAddress.getLocalHost(InetAddress.java:1473)
~[na:1.7.0_65]
         at
backtype.storm.daemon.executor$metrics_tick.invoke(executor.clj:280)
~[storm-core-0.9.2-incubating.jar:0.9.2-incubating]
         at
backtype.storm.daemon.executor$fn__5641$tuple_action_fn__5643.invoke(executor.

I look forward for your suggestions.
  Regards,
  Florin

On Tue, Oct 7, 2014 at 10:55 AM, Spico Florin <[email protected]
<mailto:[email protected]>> wrote:

    Hello!
        I'm encountering the following strange cases: While submitting
    the topology on the storm cluster I'm getting the error
    *Failed to get local hostname java.net.UnknownHostException:
    xx-xxx-xxx-xxx: xxx-xxx-xx-xx*
    *where the ** xxx-xxx-xx-xx is the IP of the nimbus (encoded here
    for security reasons. The IP is a valid one and is properly
    configured with "." as separator in the storm.yaml file )*
    The error is omehow overpass on the client submitter and the
    topology is submitted to the storm cluster and deployed. But I'm
    getting the same error on the worker machines where the spout and
    bolts are running. The topology runs for a while and then is
    restarted after is encountering the same error with the
    corresponding IP of the workers.

    Can  please help me to understand what triggers this peculiar
    behavior and how to proprely solve it?
    I look forward for your answers.
    Thanks.
       Regards,
      Florin


Reply via email to