Support Questions

Find answers, ask questions, and share your expertise

Phoenix Query Server - Won't Start - java.net.BindException: Address already in use

avatar
Super Collaborator

Hi,

I've installed Phoenix Query Server (PQS) on one of the nodes on my cluster based on this answer.

At first, it's running, but when I restart the HBase, PQS wont start again. Here's the error log below:

4988-selection-088.png

On the node where PQS is installed, I also installed "clients".

Also, when installing PQS, do I need to enable Phoenix? or This will be automatic after PQS install?

4989-selection-087.png

Thank you in advance!

- MD

1 ACCEPTED SOLUTION

avatar
Super Collaborator

It seems that PQS is already running with the pid 6896. You may try to use it just running thin client.

View solution in original post

8 REPLIES 8

avatar
Master Collaborator

You should enable Phoenix - Josh please correct me if I am wrong.

Can you use jps command to see if the previous PQS server was stopped ?

How did you restart the cluster ?

avatar
Super Collaborator

Hi @Ted Yu, thanks for the respose.

1. Noted on enabling phoenix

2. JPS

6896 Main
7731 NiFi
32283 Kafka
22044 ConsoleConsumer
1740 jenkins.war
7709 RunNiFi
28271 Jps

3. I didn't restart the whole cluster. Just restarted hbase component. Restarted it via Ambari

avatar

@Michael Dennis "MD" Uanang

Below steps might help you:

If you are running external applications, it is recommended that you test the connection to HBase using the following connection strings for the Phoenix JDBC driver:

  1. Add hbase-site.xml and core-site.xml to your application or client's class path:
    set CLASSPATH=<path_to_hbase-site.xml>;<path_to_core-site.xml>
    i.e. export HBASE_CONF_PATH=/etc/hbase/conf:/etc/hadoop/conf
  2. Depending on whether you have an unsecured cluster or a cluster secured with Kerberos, use one of the following connection strings to connect to HBase.
    • For unsecured clusters:
      jdbc:phoenix:<Zookeeper_host_name>:<port_number>:<root_node>

      Where <Zookeeper_host_name> can specify one host or several hosts. If you specify several Zookeeper hosts, insert commas between host names. For example, <ZK_host1, ZK_host2, ZK_host3>.

      Example:

      jdbc:phoenix:zk_quorum:2181:zk_parent
      (or)
      if you are logged in as your own user
      kinit
      /usr/hdp/current/phoenix-client/bin/sqlline.py hostname.domain.com:2181:/hbase-secure 
      
    • For clusters secured with Kerberos:
    • jdbc:phoenix:<Zookeeper_host_name>:<port_number>:<secured_Zookeeper_node>:<principal_name>:<HBase_headless_keytab_file>

      Where <secured_Zookeeper_node> is the path to the secured Zookeeper node, and <HBase_headless_keytab_file> is the location of this keytab file.

      Example:

      jdbc:phoenix:zk_quorum:2181:/hbase-secure:hbase@EXAMPLE.COM:/hbase-secure/keytab/keytab_file
      (or)
      if using logged in as hbase user
      kinit -k -t /etc/security/keytabs/hbase.headless.keytab hbase
      /usr/hdp/current/phoenix-client/bin/sqlline.py hostname.domain.com:2181:/hbase-secure:hbase@domain.com:/etc/security/keytabs/hbase.headless.keytab

avatar
Super Collaborator

Thanks @Sri Bandaru. Will take note on this.

avatar
Super Collaborator

It seems that PQS is already running with the pid 6896. You may try to use it just running thin client.

avatar
Super Collaborator

Just did run phoenix-sqlline and it's working.

mmmm.. I'll try to kill it and restart the PQS.

thanks @ssoldatov

avatar
Super Guru

The phoenix-sqlline command is not using PQS. You want to use /usr/hdp/current/phoenix-client/bin/sqlline-thin.py to interactive with PQS.

avatar
Master Collaborator

You can restart PQS using Ambari.