Try removing or commenting out the IPv6 addresses from your hosts file and restart hadoop/hbase. As i understand hadoop/hbase doesn't like when hosts file contains multiple IPs assigned to one hostname (in your case localhost).
On Sun, Oct 2, 2011 at 8:17 PM, Mark <static.void....@gmail.com> wrote: > Just the good ol default hosts file > > ## > # Host Database > # > # localhost is used to configure the loopback interface > # when the system is booting. Do not change this entry. > ## > > 127.0.0.1 localhost > 255.255.255.255 broadcasthost > ::1 localhost > fe80::1%lo0 localhost > > > > On 10/2/11 11:04 AM, Zijad Purkovic wrote: >> >> Can you show your hosts file, particularly info on localhost. Of >> course omit any sensitive info like public IP's or hostnames? >> >> On Sun, Oct 2, 2011 at 7:19 PM, Mark<static.void....@gmail.com> wrote: >>> >>> I am trying to run the HBase URL application: >>> https://github.com/larsgeorge/hbase-book on my local machine in >>> psuedo-distributed mode using the Cloudera CDH3 but I keep receiving the >>> following error: >>> >>> ... >>> INFO [main] (ZooKeeper.java:373) - Initiating client connection, >>> connectString=localhost:2181 sessionTimeout=180000 watcher=hconnection >>> INFO [main-SendThread()] (ClientCnxn.java:1041) - Opening socket >>> connection >>> to server localhost/0:0:0:0:0:0:0:1:2181 >>> INFO [main-SendThread(localhost:2181)] (ClientCnxn.java:949) - Socket >>> connection established to localhost/0:0:0:0:0:0:0:1:2181, initiating >>> session >>> INFO [main-SendThread(localhost:2181)] (ClientCnxn.java:738) - Session >>> establishment complete on server localhost/0:0:0:0:0:0:0:1:2181, >>> sessionid = >>> 0x132c59cf1100004, negotiated timeout = 40000 >>> Exception in thread "main" java.lang.StringIndexOutOfBoundsException: >>> String >>> index out of range: -1 >>> at java.lang.String.substring(String.java:1937) >>> at >>> org.apache.hadoop.hbase.ServerName.parseHostname(ServerName.java:81) >>> at org.apache.hadoop.hbase.ServerName.<init>(ServerName.java:63) >>> at >>> >>> org.apache.hadoop.hbase.MasterAddressTracker.getMasterAddress(MasterAddressTracker.java:62) >>> at >>> >>> org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.getMaster(HConnectionManager.java:568) >>> at >>> org.apache.hadoop.hbase.client.HBaseAdmin.<init>(HBaseAdmin.java:94) >>> at >>> com.hbasebook.hush.schema.SchemaManager.process(SchemaManager.java:126) >>> at com.hbasebook.hush.HushMain.main(HushMain.java:57) >>> >>> >>> >>> When I type JPS I see /HMaster/ however I do not see any mention of >>> /Zookeeper/. Is this to be expected? Is the above error I am receiving >>> due >>> to a misconfiguration of zookeeper or is it something completely >>> unrelated? >>> Is there something wrong with my hostname? Any ideas why I am receiving >>> this >>> error >>> >>> Any help would be greatly appreciated. Thanks >>> >>> >>> >> >> > -- Zijad Purković Dobrovoljnih davalaca krvi 3/19, Zavidovići 061/ 690 - 241