phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Josh Elser <josh.el...@gmail.com>
Subject Re: Phoenix database adapter for Python not working
Date Sat, 17 Dec 2016 21:36:21 GMT
Just to clarify, like near all other services on Linux, you do not want 
to run the Phoenix Query Server as root. Running it as the "hbase" user 
(or the user you are running hbase as) is the common way to do this.

Will Xu wrote:
> OK, this means you probably don't have Phoenix query server started.
>
> I'm not a cloudera distro expert, but I assume you can locate this file
> "queryserver.py"
>
>
> Run
>
> $>sudo ./queryserver.py start
>
>
> And try curl again
>
>
> For more details:
>
> https://phoenix.apache.org/server.html​
>
>
> Don't hesitate to reach out if you run into more roadblocks.
>
>
> Regards,
>
> Will
>
> ------------------------------------------------------------------------
> *From:* Cui Lin <icecreamlc426@gmail.com>
> *Sent:* Friday, December 16, 2016 10:42 AM
> *To:* user@phoenix.apache.org
> *Subject:* Re: Phoenix database adapter for Python not working
> Hi Will,
>
> curl http://localhost:8765
> curl: (7) Failed to connect to localhost port 8765: Connection refused
>
> How I open this connection?
>
>
>
> On Fri, Dec 16, 2016 at 10:38 AM, Will Xu <wxu@hortonworks.com
> <mailto:wxu@hortonworks.com>> wrote:
>
>     A few things.
>
>     1. Are you on 0.5 version of the connector?
>
>     $>pip freeze | grep phoenixdb
>
>     Should be==> phoenixdb==0.5
>
>
>     2. Can you try curl http://localhost:8765 to see if the server is
>     actually running? If you open the page in browser you should see a
>     Jetty 404 page.
>
>
>     PQS is a think wrapper around Phoenix client. It's actually a
>     service. If you have sqlline-thin client you can test it out.
>
>     $>bin/sqlline-thin.py http://localhost:8765
>
>
>     Regards,
>     Will
>     ------------------------------------------------------------------------
>     *From:* Cui Lin <icecreamlc426@gmail.com
>     <mailto:icecreamlc426@gmail.com>>
>     *Sent:* Friday, December 16, 2016 10:29 AM
>     *To:* user@phoenix.apache.org <mailto:user@phoenix.apache.org>
>     *Subject:* Phoenix database adapter for Python not working
>     I followed the instruction from
>     http://python-phoenixdb.readthedocs.io/en/latest/
>     <http://python-phoenixdb.readthedocs.io/en/latest/>
>
>     to connect Hbase in cloudera cluster, but I got the following error
>     below.
>
>
>      >>> import phoenixdb
>      >>> database_url = 'http://localhost:8765/'
>      >>> conn = phoenixdb.connect(database_url, autocommit=True)
>     Traceback (most recent call last):
>     File "<stdin>", line 1, in <module>
>     File
>     "/root/anaconda2/lib/python2.7/site-packages/phoenixdb/__init__.py",
>     line 63, in connect
>     client.connect()
>     File
>     "/root/anaconda2/lib/python2.7/site-packages/phoenixdb/avatica.py",
>     line 152, in connect
>     raise errors.InterfaceError('Unable to connect to the specified
>     service', e)
>     phoenixdb.errors.InterfaceError: ('Unable to connect to the
>     specified service', error(111, 'Connection refused'), None, None)
>
>
>     I can create table using phoenix-sqlline.py localhost:2181:/hbase or
>     even use ./psql.py to import CSV, why the python adaopter does not
>     work? Could someone give me a simple example that allows the adapter
>     to connect Hbase in Cloudera?
>
>     I've been trying to find the solution for days... please help!
>
>
>     --
>     Best regards!
>
>     Lin,Cui
>
>
>
>
> --
> Best regards!
>
> Lin,Cui

Mime
View raw message