Quantcast
Channel: Hortonworks » All Replies
Viewing all articles
Browse latest Browse all 3435

Reply To: Unable to Connect to Remote Server using Hbase

$
0
0

I have same issue with phoenix and Hbase to access them remotely.  I am trying to do the following steps to access to Apache Phoenix

Step 1:To Access Phoenix in HDP virtual machine , I used

> ./sqlline.py localhost:2181:/hbase-unsecure

It worked fine.

Step 2: I tried to run the following code in the virtual machine:
file: test.java

import java.sql.*;
import java.util.*;

public class test {
public static void main(String args[]) throws Exception {
Connection conn;
Properties prop = new Properties();
Class.forName(“org.apache.phoenix.jdbc.PhoenixDriver”);
conn =  DriverManager.getConnection(“jdbc:phoenix:127.0.0.1:2181:/hbase-unsecure”);
System.out.println(“got connection”);
}
}
I used the following steps:

1. cd /usr/hdp/2.3.0.0-2557/phoenix
2. javac test.java
3. java -cp “phoenix-4.4.0.2.3.0.0-2557-client.jar:.” test

It worked fine.

Step3: I tried to connect remotely through Squirrel version 3.7. I used URL:  jdbc:phoenix:127.0.0.1:2181:/hbase-unsecure
When I created the connection, It’s hanging

Step4: I tried to use same code to access from my machine to Virtual HDP and It’s hanging also.

I tried to turn off any firewall in the virtual machine and my machine to avoid any blocking. I checked the port 2181 in the Ambari and this port is fine. Also I checked the port 2181 in the virtual machine by using nestat and it’s fine. Also I tried to use CurrPorts  application to check about port 2181 and I did not find it. I am using HDP 2.3. I think the problem in the virtual machine.

I don’t know why the remote connection did not work for HDP. If you have any concern let me know about my steps to make the remote access worked fine.

 


Viewing all articles
Browse latest Browse all 3435

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>