xiaoyao1991 / presto-ethereum

Presto Ethereum Connector -- SQL on Ethereum
Apache License 2.0
470 stars 56 forks source link

Failed connecting to Hive metastore: [192.0.2.3:9083] #47

Open luolixuan opened 5 years ago

luolixuan commented 5 years ago

Hi, I have encountered this problem for a long time.

I followed the instructions to install presto, presto-cli. For presto, I used discovery.uri=http://127.0.0.1:8080, and in hive.properties I use hive.metastore.uri=thrift://127.0.0.1:9083.

Following the instructions,

  1. run Geth: geth --syncmode "full" --gcmode "archive"
  2. run presto: sudo bin/launcher start Already running as 821
  3. run presto-cli: ./presto --server localhost:8080 --catalog hive --schema default

But when I want to do the query, it raises the problem:

image

And when I try to run the example query, it shows:

image

I am not sure what is going on wrong. Seeking for help. Thanks in advance

xiaoyao1991 commented 5 years ago

why are you trying to connect to hive?

luolixuan commented 5 years ago

@xiaoyao1991 First, I used jmx as" create etc/catalog/jmx.properties with the following contents to mount the jmx connector as the jmx catalog". However it shows up:

image

So I just installed hive and tried. What's wrong with my settings? How I do the example query as shown in the instructions?

xiaoyao1991 commented 5 years ago

Did you try setting up according to the README without the jmx? The setup instructions are pretty clear in the README, and if you setup correctly, all you need to do is presto-cli --server localhost:8080 --catalog ethereum --schema default

luolixuan commented 5 years ago

@xiaoyao1991 Yes. I followed all the instructions. But when I run it, it shows:

image

There is no presto-cli, so I use "./presto --server localhost:8080 --catalog hive --schema default" instead. But it still does not work.

Is there a presto-cli package or command? I install Presto CLI by following this link: https://prestosql.io/docs/current/installation/cli.html

xiaoyao1991 commented 5 years ago

Right, you just need to install the cli. The name of the cli is just presto, not presto-cli, so try presto --server localhost:8080 --catalog ethereum --schema default

xiaoyao1991 commented 5 years ago

make sure you have the cli in your PATH

luolixuan commented 5 years ago

@xiaoyao1991 Hi, I reinstall all the things following the instructions(on MacOS). I am using Geth. These are my configurations:

image image

I first start geth by: geth --rpc --rpcaddr "127.0.0.1" --rpcport "8545" Then I start the server by: sudo bin/launcher start when I refresh http://localhost:8080, it shows following, then "cannot connect to server":

image

I restart the server several times:

image

But it seems that I can connect to the server in several seconds, then the server just automatically stops. I am really confused by that since I have reinstalled it serval times with the instructions. Thanks in advance.

luolixuan commented 5 years ago

I printed out the log of starting the server and found this error:

`2019-05-22T22:21:47.985-0400 ERROR main io.prestosql.server.PrestoServer No service providers of type io.prestosql.spi.Plugin java.lang.IllegalStateException: No service providers of type io.prestosql.spi.Plugin at com.google.common.base.Preconditions.checkState(Preconditions.java:588) at io.prestosql.server.PluginManager.loadPlugin(PluginManager.java:166) at io.prestosql.server.PluginManager.loadPlugin(PluginManager.java:157) at io.prestosql.server.PluginManager.loadPlugins(PluginManager.java:138) at io.prestosql.server.PrestoServer.run(PrestoServer.java:125) at io.prestosql.server.PrestoServer.main(PrestoServer.java:70)

2019-05-22T22:21:47.986-0400 INFO Thread-88 io.airlift.bootstrap.LifeCycleManager Life cycle stopping...`

Looking for help.

martint commented 5 years ago

@xiaoyao1991, the plugin needs to be updated to the latest version of the Presto SPI. Here's a document on how to get started https://github.com/prestosql/presto/wiki/Migration. We're happy to help if you need it, too. If you have any questions, please join the Presto slack channel at https://prestosql.io/community.html.