title: Apache Phoenix client not able to connect with remote hbase server via Zookeper
body: <p>I have a problem connecting an Apache Phoenix JDBC client (I'm using sqlline.py for test purposes) to my Hbase, from any remote computer.</p>
  
  <p>The way I'm testing is the following:</p>
  
  <p>I ssh to another machine running linux and then try to connect to my zookeeper quorum (which is just one machine at the moment: christianwith-KP):</p>
  
  <pre><code>    hadoopuser@mike-iMac ~/phoenix-4.4.0-HBase-1.0-bin/bin $./sqlline.py christianwirth-KP
      Setting property: [isolation, TRANSACTION_READ_COMMITTED]
      issuing: !connect jdbc:phoenix:christianwirth-KP none none org.apache.phoenix.jdbc.PhoenixDriver
      Connecting to jdbc:phoenix:christianwirth-KP
      SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
      SLF4J: Defaulting to no-operation (NOP) logger implementation
      SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
      15/08/06 14:11:36 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
  </code></pre>
  
  <p>After trying to connect the commandline does nothing and I get a lot off java-error message after a couple of minutes.</p>
  
  <p>That's from the logfile zookeeper.out, and it seems Zookeeper is accepting the connection from the remote client running sqlline.py, as the IP-adress matches the remote computer I'm trying to connect from.</p>
  
  <pre><code>    2015-08-06 14:10:37,720 [myid:] - INFO  [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxnFactory@197] - Accepted socket connection from /192.168.59.148:39731
      2015-08-06 14:10:37,721 [myid:] - INFO  [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:ZooKeeperServer@868] - Client attempting to establish new session at /192.168.59.148:39731
      2015-08-06 14:10:37,726 [myid:] - INFO  [SyncThread:0:ZooKeeperServer@617] - Established session 0x14f02da342b001b with negotiated timeout 40000 for client /192.168.59.148:39731
      2015-08-06 14:10:37,785 [myid:] - INFO  [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxnFactory@197] - Accepted socket connection from /192.168.59.148:39732
      2015-08-06 14:10:37,786 [myid:] - INFO  [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:ZooKeeperServer@868] - Client attempting to establish new session at /192.168.59.148:39732
      2015-08-06 14:10:37,794 [myid:] - INFO  [SyncThread:0:ZooKeeperServer@617] - Established session 0x14f02da342b001c with negotiated timeout 40000 for client /192.168.59.148:39732
      2015-08-06 14:11:37,045 [myid:] - INFO  [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxnFactory@197] - Accepted socket connection from /192.168.59.148:39736
      2015-08-06 14:11:37,047 [myid:] - INFO  [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:ZooKeeperServer@868] - Client attempting to establish new session at /192.168.59.148:39736
      2015-08-06 14:11:37,052 [myid:] - INFO  [SyncThread:0:ZooKeeperServer@617] - Established session 0x14f02da342b001d with negotiated timeout 40000 for client /192.168.59.148:39736
      2015-08-06 14:11:37,702 [myid:] - INFO  [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxnFactory@197] - Accepted socket connection from /192.168.59.148:39737
      2015-08-06 14:11:37,702 [myid:] - INFO  [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:ZooKeeperServer@868] - Client attempting to establish new session at /192.168.59.148:39737
      2015-08-06 14:11:37,707 [myid:] - INFO  [SyncThread:0:ZooKeeperServer@617] - Established session 0x14f02da342b001e with negotiated timeout 40000 for client /192.168.59.148:39737
  </code></pre>
  
  <p>If I try to connect on my local machine everything works fine.
  I made sure the 2 version of phoenix are identical...</p>
  
  <p>Now let's get to my setup, I use the following versions:</p>
  
  <ul>
  <li>Hadoop: 2.5.2 </li>
  <li>Zookeeper: 3.4.6 </li>
  <li>HBase: 1.0.1.1 </li>
  <li>Phoenix: 4.4.0</li>
  </ul>
  
  <p>I run my zookeeper separately, and not through HBase.</p>
  
  <p>This is my hbase-site.xml:</p>
  
  <pre><code>&lt;configuration&gt;
    &lt;property&gt;
      &lt;name&gt;hbase.cluster.distributed&lt;/name&gt;
      &lt;value&gt;true&lt;/value&gt;
    &lt;/property&gt;
    &lt;property&gt;
      &lt;name&gt;hbase.rootdir&lt;/name&gt;
      &lt;value&gt;hdfs://localhost:9000/hbase&lt;/value&gt;
    &lt;/property&gt;
    &lt;property&gt;
      &lt;name&gt;zookeeper.znode.parent&lt;/name&gt;
      &lt;value&gt;/hbase&lt;/value&gt;
    &lt;/property&gt;
    &lt;property&gt;
      &lt;name&gt;hbase.zookeeper.quorum&lt;/name&gt;
      &lt;value&gt;christianwirth-kp&lt;/value&gt;
    &lt;/property&gt;
    &lt;property&gt;
      &lt;name&gt;hbase.zookeeper.property.clientPort&lt;/name&gt;
      &lt;value&gt;2181&lt;/value&gt;
      &lt;description&gt;Property from ZooKeeper's config zoo.cfg.
        The port at which the clients will connect.
      &lt;/description&gt;
    &lt;/property&gt;
    &lt;property&gt;
      &lt;name&gt;hbase.regionserver.wal.codec&lt;/name&gt;
      &lt;value&gt;org.apache.hadoop.hbase.regionserver.wal.IndexedWALEditCodec&lt;/value&gt;
    &lt;/property&gt;
    &lt;property&gt;
      &lt;name&gt;phoenix.query.timeoutMs&lt;/name&gt;
      &lt;value&gt;1800000&lt;/value&gt;
    &lt;/property&gt;
    &lt;property&gt;
      &lt;name&gt;phoenix.query.threadPoolSize&lt;/name&gt;
      &lt;value&gt;8&lt;/value&gt;
    &lt;/property&gt;
    &lt;property&gt;
      &lt;name&gt;hbase.rpc.timeout&lt;/name&gt;
      &lt;value&gt;1800000&lt;/value&gt;
    &lt;/property&gt;
    &lt;property&gt;
      &lt;name&gt;hbase.client.scanner.timeout.period&lt;/name&gt;
      &lt;value&gt;600000&lt;/value&gt;
      &lt;source&gt;hbase-default.xml&lt;/source&gt;
    &lt;/property&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>This is my etc/hosts:</p>
  
  <pre><code>192.168.60.43     hbase christianwirth-KP localhost
  # The following lines are desirable for IPv6 capable hosts
  ::1     ip6-localhost ip6-loopback
  fe00::0 ip6-localnet
  ff00::0 ip6-mcastprefix
  ff02::1 ip6-allnodes
  ff02::2 ip6-allrouters
  </code></pre>
  
  <p>This is my output, when running jps:</p>
  
  <pre><code>6555 HMaster
  6435 QuorumPeerMain
  13614 Jps
  6300 SecondaryNameNode
  6658 HRegionServer
  5746 NameNode
  6002 DataNode
  </code></pre>
  
  <p>---start edit: 10.08.15</p>
  
  <p>Another thing I just realized is, that my regionserver won't start if I just put</p>
  
  <pre><code>  christianwirth-KP
  </code></pre>
  
  <p>to the file HBase/conf/regionservers but it starts if I put </p>
  
  <pre><code>  localhost 
  </code></pre>
  
  <p>in there...</p>
  
  <p>---end edit: 10.08.15</p>
  
  <p>I already checked a lot other topics related to my problem, but no solution seems to help.
  If someone has an Idea what's going wrong here, I'd greatly appreciate the help.</p>
  
  <p>Best,</p>
  
  <p>Chris</p>