Hi, I dont have firewall running. I have already turned it off (My server is Ubuntu. So I stopped ufw service). I removed localhost.localdomain completely from /etc/hosts file. But still it fails.
On Thu, May 31, 2012 at 4:26 AM, Christian Schäfer <[email protected]>wrote: > > Hi, > > just double check that you use the correct IP / hostname by comparing to > what "ifconfig" output > and that hostname is resolved to correct ip by arp honeywel-4a7632 or ping > honeywel-4a7632. > > I recommend to uncomment the IPV6 line in your hosts files because I > experienced trouble with such entries and hadoop. > For example my hosts file (anonymized) used on all machines of a stable > HBase cluster looks as easy as that: > > 127.0.0.1 localhost.localdomain localhost > 195.55.55.555 hostname.domain.com hostname > > > As you were able to create tables and so on the hbase master seems to work > otherwise there would be > evidence in the hbase logs at startup.. > I expect it's a network accessibility issue caused by a firewall setting. > > So maybe try (for test only) turning of iptables: > > service iptables save > service iptables stop > chkconfig iptables off > > > Good Luck > Chris > Von: AnandaVelMurugan Chandra Mohan <[email protected]> > An: [email protected] > Gesendet: 15:46 Dienstag, 29.Mai 2012 > Betreff: Re: Issues with Java sample for connecting to remote Hbase > > Thanks for the response. It still > errors out. > > On Tue, May 29, 2012 at 7:05 PM, Mohammad Tariq <[email protected]> > wrote: > > > change the name from "localhost" to something else in the line > > "10.78.32.131 honeywel-4a7632 localhost" and see if it works > > > > Regards, > > Mohammad Tariq > > > > > > On Tue, May 29, 2012 at 6:59 PM, AnandaVelMurugan Chandra Mohan > > <[email protected]> wrote: > > > I have HBase version 0.92.1 running in standalone mode. I created a > table > > > and added few rows using hbase shell. Now I am developing a standalone > > java > > > application to connect to Hbase and retrieve the data from the table. > > > * > > > This is the code I am using > > > > * > > > Configuration config = HBaseConfiguration.create(); > > > config.clear(); > > > config.set("hbase.zookeeper.quorum", "10.78.32.131"); > > > config.set("hbase.zookeeper.property.clientPort","2181"); > > > config.set("hbase.master", "10.78.32.131:60010"); > > > > > > HBaseAdmin.checkHBaseAvailable(config); > > > > > > > > > // This instantiates an HTable object that connects you > to > > > the "myTable" > > > // table. > > > > HTable table = new HTable(config, "asset"); > > > > > > Get g = new Get(Bytes.toBytes("APU 331-350")); > > > Result r = table.get(g); > > > > > > *This is the content of my /etc/hosts file* > > > > > > #127.0.0.1 localhost.localdomain localhost > > > #10.78.32.131 honeywel-4a7632 > > > #127.0.1.1 honeywel-4a7632 > > > ::1 honeywel-4a7632 localhost6.localdomain6 localhost6 > > > 10.78.32.131 honeywel-4a7632 localhost > > > * > > > This is part of my error stack trace* > > > > > > 12/05/29 18:53:33 INFO > > client.HConnectionManager$HConnectionImplementation: > > > getMaster attempt 0 of 1 failed; no more retrying. > > > > java.net.ConnectException: Connection refused: no further information > > > at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) > > > at sun.nio.ch.SocketChannelImpl.finishConnect(Unknown Source) > > > at > > > > > > org.apache.hadoop.net.SocketIOWithTimeout.connect(SocketIOWithTimeout.java:206) > > > at org.apache.hadoop.net.NetUtils.connect(NetUtils.java:489) > > > at > > > > > > org.apache.hadoop.hbase.ipc.HBaseClient$Connection.setupConnection(HBaseClient.java:328) > > > at > > > > > > org.apache.hadoop.hbase.ipc.HBaseClient$Connection.setupIOstreams(HBaseClient.java:362) > > > at > > > > > > org.apache.hadoop.hbase.ipc.HBaseClient.getConnection(HBaseClient.java:1045) > > > at > org.apache.hadoop.hbase.ipc.HBaseClient.call(HBaseClient.java:897) > > > at > > > > > > org.apache.hadoop.hbase.ipc.WritableRpcEngine$Invoker.invoke(WritableRpcEngine.java:150) > > > at $Proxy5.getProtocolVersion(Unknown Source) > > > at > > > > > > org.apache.hadoop.hbase.ipc.WritableRpcEngine.getProxy(WritableRpcEngine.java:183) > > > at org.apache.hadoop.hbase.ipc.HBaseRPC.getProxy(HBaseRPC.java:303) > > > at org.apache.hadoop.hbase.ipc.HBaseRPC.getProxy(HBaseRPC.java:280) > > > at org.apache.hadoop.hbase.ipc.HBaseRPC.getProxy(HBaseRPC.java:332) > > > at > > > > > > org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.getMaster(HConnectionManager.java:642) > > > at > > > org.apache.hadoop.hbase.client.HBaseAdmin.<init>(HBaseAdmin.java:106) > > > at > > > > > > org.apache.hadoop.hbase.client.HBaseAdmin.checkHBaseAvailable(HBaseAdmin.java:1553) > > > at hbaseMain.main(hbaseMain.java:27) > > > 12/05/29 18:53:33 INFO > > client.HConnectionManager$HConnectionImplementation: > > > Closed zookeeper sessionid=0x13798c3ce190003 > > > 12/05/29 18:53:33 INFO zookeeper.ZooKeeper: Session: 0x13798c3ce190003 > > > closed > > > 12/05/29 18:53:33 INFO zookeeper.ClientCnxn: EventThread shut down > > > > > > Can some one help me fix this? Thanks a lot. > > > -- > > > Regards, > > > Anand > > > > > > -- > Regards, > Anand > -- Regards, Anand
