Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6625583
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T21:47:30+00:00 2026-05-25T21:47:30+00:00

I try to write some data to hbase with a client program HBase @

  • 0

I try to write some data to hbase with a client program

HBase @ Hadoop runs in a preconfigured VM from Cloudera @ ubuntu.

The Client runs on the system hosting the VM and running the client directly in the VM works.

So now I want to use the client outside the vm to access the servers on the vm

I’m using NAT.
To be able to access the servers like HBase Master, HUE..running on the vm I configured port forwarding in virtual box:enter image description here

Thus I can reach the overview sites of the HBase Master, HUE..

To run the client against the servers on the vm I created
hbase-site.xml with content:

<configuration>
    <property>
        <name>hbase.zookeeper.quorum</name>
        <value>localhost</value>
    </property>
    <property>
        <name>hbase.zookeeper.property.clientPort</name>
        <value>9997</value>
    </property>
    <property>
        <name>hbase.master</name>
        <value>localhost:9999</value>
    </property>
</configuration>

So I expected that forwarding works:

The error messages in the log when running the client looks like:

11/09/07 17:48:00 INFO zookeeper.ZooKeeper: Initiating client connection, connectString=localhost:2181 sessionTimeout=180000 watcher=hconnection
11/09/07 17:48:00 INFO zookeeper.ClientCnxn: Opening socket connection to server localhost/127.0.0.1:2181
11/09/07 17:48:01 WARN zookeeper.ClientCnxn: Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused: no further information
    at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
    at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:567)
    at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1119)
11/09/07 17:48:01 INFO zookeeper.ClientCnxn: Opening socket connection to server localhost/0:0:0:0:0:0:0:1:2181
11/09/07 17:48:01 WARN zookeeper.ClientCnxn: Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.SocketException: Address family not supported by protocol family: connect
    at sun.nio.ch.Net.connect(Native Method)
    at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:500)
    at org.apache.zookeeper.ClientCnxn$SendThread.startConnect(ClientCnxn.java:1050)
    at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1077)
11/09/07 17:48:03 INFO zookeeper.ClientCnxn: Opening socket connection to server localhost/127.0.0.1:2181
11/09/07 17:48:04 WARN zookeeper.ClientCnxn: Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused: no further information
    at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
    at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:567)
    at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1119)
11/09/07 17:48:04 INFO zookeeper.ClientCnxn: Opening socket connection to server localhost/0:0:0:0:0:0:0:1:2181
11/09/07 17:48:04 WARN zookeeper.ClientCnxn: Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.SocketException: Address family not supported by protocol family: connect
    at sun.nio.ch.Net.connect(Native Method)
    at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:500)
    at org.apache.zookeeper.ClientCnxn$SendThread.startConnect(ClientCnxn.java:1050)
    at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1077)
11/09/07 17:48:05 INFO zookeeper.ClientCnxn: Opening socket connection to server localhost/127.0.0.1:2181

A correct connection log (when running the client directly on the vm) looks like:

11/09/07 09:05:29 INFO zookeeper.ZooKeeper: Initiating client connection, connectString=localhost:2181 sessionTimeout=180000 watcher=hconnection
11/09/07 09:05:29 INFO zookeeper.ClientCnxn: Opening socket connection to server localhost/0:0:0:0:0:0:0:1:2181
11/09/07 09:05:29 INFO zookeeper.ClientCnxn: Socket connection established to localhost/0:0:0:0:0:0:0:1:2181, initiating session
11/09/07 09:05:29 INFO zookeeper.ClientCnxn: Session establishment complete on server localhost/0:0:0:0:0:0:0:1:2181, sessionid = 0x132449d36df0006, negotiated timeout = 40000

So I only see now in the log line before the first problem that connection url isn’t correct as the port is correctly forwarded but the IP is still localhost and not 10.0.2.15 as configured in the port forwarding settings:

Opening socket connection to server localhost/127.0.0.1:2181

Only hint I found is disabling IPV6 -> is disabled in host(win7) and vm(Ubuntu)
and checking the port -> they are correctly forwarded

Has anyone an idea?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T21:47:30+00:00Added an answer on May 25, 2026 at 9:47 pm

    Just to give an added value to users reading this, here is the solution:

    Could not resolve the DNS name of cloudera-vm
    

    To fix that I simply added to C:\Windows\System32\drivers\etc\hosts :

    192.168.56.101  cloudera-vm
    

    So whenever cloudera-vm is used it is resolved to the apropriate IP.
    The VM is now running at Host-Only-Network Mode, and is assigned to 192.168.56.101 now.
    So no port forwarding is necessary.

    Just for comparison:

    hbase-site.xml

    <configuration>
      <property>
        <name>hbase.zookeeper.quorum</name>
        <value>cloudera-vm</value>
      </property>
    </configuration>
    

    persistence.xml

    <persistence
        xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
        version="1.0">
    
        <persistence-unit name="hbase-addressbook"
            transaction-type="RESOURCE_LOCAL">
    
            <properties>
                <property name="datanucleus.ConnectionURL" value="hbase:cloudera-vm" />
                <property name="datanucleus.ConnectionUserName" value="" />
                <property name="datanucleus.ConnectionPassword" value="" />
                <property name="datanucleus.autoCreateSchema" value="true" />
                <property name="datanucleus.validateTables" value="false" />
                <property name="datanucleus.Optimistic" value="false" />
                <property name="datanucleus.validateConstraints" value="false" />
            </properties>
        </persistence-unit>
    </persistence>
    

    After that I got another error (connection refused although all connection strings were correct) thus I researched for days for the cause.

    The solution was to disable IPV6 of Ubuntu running on the VM by appending the following to the file: /etc/sysctl.conf

    net.ipv6.conf.all.disable_ipv6 = 1
    net.ipv6.conf.default.disable_ipv6 = 1
    net.ipv6.conf.lo.disable_ipv6 = 1
    

    After reboot everything connects and works correctly 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to pull some binary data from a database and write them to
I am try to write some validation script using javascript and prototype. What I
I need to write a delegate function that can 'wrap' some while/try/catch code around
I try to write a simple client/server application (all application is a bluetooth service
I have an application in C# which I write some data to file. I
I'm receiving some data from a ZODB (Zope Object Database). I receive a mybrains
In my application, I am using an AsyncTask to write some data to a
Been tasked to write some asset tracking software... Want to try to do this
I try to write KSH script for processing a file consisting of name-value pairs,
I try to write to a large file, but it seems like it does

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.