Coder Social home page Coder Social logo

Comments (15)

wbolster avatar wbolster commented on August 13, 2024

This happens when you try to use a closed connection. Did you disable autoconnect perhaps? If so, try connection.open() before use.

from happybase.

saintthor avatar saintthor commented on August 13, 2024

thank you. the real mistake is one table is not created in the second hbase. when writing data via batch.send() of the missing table, the error occurs.

i think it would be better to raise a TableNotExistError than a TTransportException here.

from happybase.

wbolster avatar wbolster commented on August 13, 2024

Unfortunately the Thrift API exposed by HBase is not very robust when it comes to error handling and error reporting, so I'm afraid there isn't much HappyBase can do to make this any better on the Python side. :-(

from happybase.

saintthor avatar saintthor commented on August 13, 2024

a new problem, code as:

try:
batch.send()
except Exception, e:
print e
conn.close()
conn.open() # or conn = happybase.Connection( ... )

after running some days, the exception 'Transport not open' keep occurs. when i terminate it and run it again, it turns well.

what may cause this?

i think if hbase get some wrong that cause error and then become fine, conn.close and conn.open should make it work. if they didn't, to restart the process wouldn't either.

from happybase.

wbolster avatar wbolster commented on August 13, 2024

The connection.open() calls into the Thrift library to open a new connection, so I'm not sure whether HappyBase is to blame here. A network glitch may cause failures. Is the stack trace from within the batch.send() or from conn.open()?

from happybase.

saintthor avatar saintthor commented on August 13, 2024

the stack trace is from within the batch.send().

while the trace keep occurs, i connect the same hbase via python shell with no error. then restarted it, all ok.

from happybase.

saintthor avatar saintthor commented on August 13, 2024

the exception also may be IOError(_message='Connection refused').

from happybase.

wbolster avatar wbolster commented on August 13, 2024

I'm quite sure the errors you see are caused by network failures. Does it happen when you run the HappyBase process on the same host as the Thrift server (localhost connection)?

— Wouter

(Sent from my phone. Please ignore the typos.)

saintthor [email protected] schreef:

the exception also may be IOError(_message='Connection refused').


Reply to this email directly or view it on GitHub:
#45 (comment)

from happybase.

saintthor avatar saintthor commented on August 13, 2024

we run hbase on about 10 servers. and run 1 thrift on each node.

from happybase.

wbolster avatar wbolster commented on August 13, 2024

Is the Python client running on the same nodes? I suspect this is a network issue between the host that runs the Python process and the host that runs the Thrift daemon.

from happybase.

saintthor avatar saintthor commented on August 13, 2024

no. the python client is on another server.

even it is a network issue, i think it should be fixed by close and open when a new process runs ok.

from happybase.

wbolster avatar wbolster commented on August 13, 2024

Is this reproducible if you also call .close() first? If so, it might be something within the Python Thrift library (outside HappyBase).

from happybase.

saintthor avatar saintthor commented on August 13, 2024

i think i catched the bug. i didn't recreate the batch after reconnecting.
i will test it when the hbase become well. now, it is down.

2013/12/5 Wouter Bolsterlee [email protected]

Is this reproducible if you also call .close() first? If so, it might be
something within the Python Thrift library (outside HappyBase).


Reply to this email directly or view it on GitHubhttps://github.com//issues/45#issuecomment-29833444
.

from happybase.

rrjia avatar rrjia commented on August 13, 2024

make sure you have thrift server started before you try to connect.

hbase thrift start -threadpool
Also, hbase/bin/hbase-daemon.sh start thrift

from happybase.

 avatar commented on August 13, 2024

make sure you have thrift server started before you try to connect.

hbase thrift start -threadpool
Also, hbase/bin/hbase-daemon.sh start thrift

Hi, @William-jia When i start thrift server using this command hbase thrift start -c -nonblocking, and i checked jps the thrift server is initiated, why we still need to use hbase-daemon.sh start thrift again?

from happybase.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.