Note that there are some explanatory texts on larger screens.

plurals
  1. POmulti node cassandra installation ended with "UnknownHostException"
    text
    copied!<p>I am newbie to Cassandra. I wanted to install cassandra-0.8.4 on 3 nodes and to run Map/Reduce job that uploads data from HDFS to Cassandra.</p> <p>I have installed Cassnadra on 3 nodes lab02(199.168.0.2),lab03(199.168.0.3) &amp; lab04(199.168.0.4) respectively and can create a keyspace &amp; column family and they got distributed across the cluster.</p> <p>When I run my map/reduce program it ended up with "UnknownHostException". the same map/reduce program works well on single node cluster.</p> <p>Here are the steps which I have followed.</p> <ol> <li>cassandra.yaml details</li> </ol> <blockquote> <p>lab02(199.168.0.2): (seed node)</p> <p>auto_bootstrap: false seeds: "199.168.0.2" listen_address: 199.168.0.2 rpc_address: 199.168.0.2</p> <p>lab03(199.168.0.3): auto_bootstrap: true seeds: "199.168.0.2" listen_address: 199.168.0.3 rpc_address: 199.168.0.3</p> <p>lab04(199.168.0.4): auto_bootstrap: true seeds: "199.168.0.2" listen_address: 199.168.0.4 rpc_address: 199.168.0.4</p> </blockquote> <p>2. When I run my map/reduce program it ended up with "UnknownHostException"</p> <p>Error: java.net.UnknownHostException: /199.168.0.2 at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method) at java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:849) at java.net.InetAddress.getAddressFromNameService(InetAddress.java:1200) at java.net.InetAddress.getAllByName0(InetAddress.java:1153) at java.net.InetAddress.getAllByName(InetAddress.java:1083) at java.net.InetAddress.getAllByName(InetAddress.java:1019) at java.net.InetAddress.getByName(InetAddress.java:969) at org.apache.cassandra.client.RingCache.refreshEndpointMap(RingCache.java:93) at org.apache.cassandra.client.RingCache.(RingCache.java:67) at org.apache.cassandra.hadoop.ColumnFamilyRecordWriter.(ColumnFamilyRecordWriter.java:98) at org.apache.cassandra.hadoop.ColumnFamilyRecordWriter.(ColumnFamilyRecordWriter.java:92) at org.apache.cassandra.hadoop.ColumnFamilyOutputFormat.getRecordWriter(ColumnFamilyOutputFormat.java:132) at org.apache.cassandra.hadoop.ColumnFamilyOutputFormat.getRecordWriter(ColumnFamilyOutputFormat.java:62) at org.apache.hadoop.mapred.ReduceTask.runNewReducer(ReduceTask.java:553) at org.apache.hadoop.mapred.ReduceTask.run(ReduceTask.java:408) at org.apache.hadoop.mapred.Child.main(Child.java:170)</p> <p>Here are the config line for map/reduce.</p> <pre><code> job4.setReducerClass(TblUploadReducer.class ); job4.setOutputKeyClass(ByteBuffer.class); job4.setOutputValueClass(List.class); job4.setOutputFormatClass(ColumnFamilyOutputFormat.class); ConfigHelper.setOutputColumnFamily(job4.getConfiguration(), args[1],args[3] ); ConfigHelper.setRpcPort(job4.getConfiguration(), args[7]); // 9160 ConfigHelper.setInitialAddress(job4.getConfiguration(), args[9]); // 199.168.0.2 ConfigHelper.setPartitioner(job4.getConfiguration(), "org.apache.cassandra.dht.RandomPartitioner"); </code></pre> <p>Steps which I have verified are</p> <ul> <li>There is a passwordless ssh has been configured b/w lab02,lab03 &amp;lab04. All the nodes can ping each other with out any issues.</li> <li>When I ran "InetAddress.getLocalHost()" from java program on lab02 it prints "lab02/199.168.0.2".</li> <li>When I over looked "o/p" of bin/cassandra it prints couple of messages and under InetAddress field "/199.168.0.3" etc. Here it does not print "hostname/IP". Is that problem?</li> </ul> <p>Kindly help me to resolve above issue.</p> <p>Regards, Thamizhannal </p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload