You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by Jiaming Lin <ha...@gmail.com> on 2015/05/23 19:40:23 UTC

Metastore client initial failed, connection refused

Hi,

I am using HCatalog in HUE to import table from a file, and the table had
been created successfully.

However, when I browser data, there is no any records in that table.
I find there are several logs about HiveMetaStoreClient initiation failed
and thrift connection refused.

Here is the entire log message.

Exception in thread "main" java.lang.RuntimeException:
java.lang.RuntimeException: Unable to instantiate
org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient
	at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:444)
	at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:672)
	at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:616)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.apache.hadoop.util.RunJar.run(RunJar.java:221)
	at org.apache.hadoop.util.RunJar.main(RunJar.java:136)
Caused by: java.lang.RuntimeException: Unable to instantiate
org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient
	at org.apache.hadoop.hive.metastore.MetaStoreUtils.newInstance(MetaStoreUtils.java:1449)
	at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.<init>(RetryingMetaStoreClient.java:63)
	at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:73)
	at org.apache.hadoop.hive.ql.metadata.Hive.createMetaStoreClient(Hive.java:2689)
	at org.apache.hadoop.hive.ql.metadata.Hive.getMSC(Hive.java:2708)
	at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:425)
	... 8 more
Caused by: java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
	at org.apache.hadoop.hive.metastore.MetaStoreUtils.newInstance(MetaStoreUtils.java:1447)
	... 13 more
Caused by: MetaException(message:Could not connect to meta store using
any of the URIs provided. Most recent failure:
org.apache.thrift.transport.TTransportException:
java.net.ConnectException: Connection refused
	at org.apache.thrift.transport.TSocket.open(TSocket.java:185)
	at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.open(HiveMetaStoreClient.java:358)
	at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.<init>(HiveMetaStoreClient.java:215)
	at org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient.<init>(SessionHiveMetaStoreClient.java:73)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
	at org.apache.hadoop.hive.metastore.MetaStoreUtils.newInstance(MetaStoreUtils.java:1447)
	at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.<init>(RetryingMetaStoreClient.java:63)
	at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:73)
	at org.apache.hadoop.hive.ql.metadata.Hive.createMetaStoreClient(Hive.java:2689)
	at org.apache.hadoop.hive.ql.metadata.Hive.getMSC(Hive.java:2708)
	at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:425)
	at org.apache.hadoop.hive.cli.CliDriver.run(C

Re: Metastore client initial failed, connection refused

Posted by Jiaming Lin <ha...@gmail.com>.
Yes! the Metastore service is running on the same instance with database at
9083 port.
And the hive.metastore.uris is thrift://METASTORE_HOST:9083

2015-05-24 1:58 GMT+08:00 Mich Talebzadeh <mi...@peridale.co.uk>:

> Where is your hive metastore? If it is on a database instance, is the
> instance hosting metastore running?
>
>
>
>
>
>
>
> Mich Talebzadeh
>
>
>
> http://talebzadehmich.wordpress.com
>
>
>
> Author of the books* "A Practitioner’s Guide to Upgrading to Sybase** ASE
> 15", **ISBN 978-0-9563693-0-7*.
>
> co-author *"Sybase Transact SQL Guidelines Best Practices", ISBN
> 978-0-9759693-0-4*
>
> *Publications due shortly:*
>
> *Creating in-memory Data Grid for Trading Systems with Oracle TimesTen and
> Coherence Cache*
>
> *Oracle and Sybase, Concepts and Contrasts*, ISBN: 978-0-9563693-1-4, volume
> one out shortly
>
>
>
> NOTE: The information in this email is proprietary and confidential. This
> message is for the designated recipient only, if you are not the intended
> recipient, you should destroy it immediately. Any information in this
> message shall not be understood as given or endorsed by Peridale Ltd, its
> subsidiaries or their employees, unless expressly so stated. It is the
> responsibility of the recipient to ensure that this email is virus free,
> therefore neither Peridale Ltd, its subsidiaries nor their employees accept
> any responsibility.
>
>
>
> *From:* Jiaming Lin [mailto:hadoopmaillist2015@gmail.com]
> *Sent:* 23 May 2015 18:40
> *To:* user@hive.apache.org
> *Subject:* Metastore client initial failed, connection refused
>
>
>
> Hi,
>
>
>
> I am using HCatalog in HUE to import table from a file, and the table had
> been created successfully.
>
>
>
> However, when I browser data, there is no any records in that table.
>
> I find there are several logs about HiveMetaStoreClient initiation failed
> and thrift connection refused.
>
>
>
> Here is the entire log message.
>
> Exception in thread "main" java.lang.RuntimeException: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient
>
>                     at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:444)
>
>                     at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:672)
>
>                     at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:616)
>
>                     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>
>                     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>
>                     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>
>                     at java.lang.reflect.Method.invoke(Method.java:606)
>
>                     at org.apache.hadoop.util.RunJar.run(RunJar.java:221)
>
>                     at org.apache.hadoop.util.RunJar.main(RunJar.java:136)
>
> Caused by: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient
>
>                     at org.apache.hadoop.hive.metastore.MetaStoreUtils.newInstance(MetaStoreUtils.java:1449)
>
>                     at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.<init>(RetryingMetaStoreClient.java:63)
>
>                     at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:73)
>
>                     at org.apache.hadoop.hive.ql.metadata.Hive.createMetaStoreClient(Hive.java:2689)
>
>                     at org.apache.hadoop.hive.ql.metadata.Hive.getMSC(Hive.java:2708)
>
>                     at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:425)
>
>                     ... 8 more
>
> Caused by: java.lang.reflect.InvocationTargetException
>
>                     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>
>                     at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
>
>                     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
>
>                     at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
>
>                     at org.apache.hadoop.hive.metastore.MetaStoreUtils.newInstance(MetaStoreUtils.java:1447)
>
>                     ... 13 more
>
> Caused by: MetaException(message:Could not connect to meta store using any of the URIs provided. Most recent failure: org.apache.thrift.transport.TTransportException: java.net.ConnectException: Connection refused
>
>                     at org.apache.thrift.transport.TSocket.open(TSocket.java:185)
>
>                     at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.open(HiveMetaStoreClient.java:358)
>
>                     at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.<init>(HiveMetaStoreClient.java:215)
>
>                     at org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient.<init>(SessionHiveMetaStoreClient.java:73)
>
>                     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>
>                     at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
>
>                     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
>
>                     at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
>
>                     at org.apache.hadoop.hive.metastore.MetaStoreUtils.newInstance(MetaStoreUtils.java:1447)
>
>                     at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.<init>(RetryingMetaStoreClient.java:63)
>
>                     at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:73)
>
>                     at org.apache.hadoop.hive.ql.metadata.Hive.createMetaStoreClient(Hive.java:2689)
>
>                     at org.apache.hadoop.hive.ql.metadata.Hive.getMSC(Hive.java:2708)
>
>                     at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:425)
>
>                     at org.apache.hadoop.hive.cli.CliDriver.run(C
>
>

RE: Metastore client initial failed, connection refused

Posted by Mich Talebzadeh <mi...@peridale.co.uk>.
Where is your hive metastore? If it is on a database instance, is the instance hosting metastore running?

 

 

 

Mich Talebzadeh

 

http://talebzadehmich.wordpress.com

 

Author of the books "A Practitioner’s Guide to Upgrading to Sybase ASE 15", ISBN 978-0-9563693-0-7. 

co-author "Sybase Transact SQL Guidelines Best Practices", ISBN 978-0-9759693-0-4

Publications due shortly:

Creating in-memory Data Grid for Trading Systems with Oracle TimesTen and Coherence Cache

Oracle and Sybase, Concepts and Contrasts, ISBN: 978-0-9563693-1-4, volume one out shortly

 

NOTE: The information in this email is proprietary and confidential. This message is for the designated recipient only, if you are not the intended recipient, you should destroy it immediately. Any information in this message shall not be understood as given or endorsed by Peridale Ltd, its subsidiaries or their employees, unless expressly so stated. It is the responsibility of the recipient to ensure that this email is virus free, therefore neither Peridale Ltd, its subsidiaries nor their employees accept any responsibility.

 

From: Jiaming Lin [mailto:hadoopmaillist2015@gmail.com] 
Sent: 23 May 2015 18:40
To: user@hive.apache.org
Subject: Metastore client initial failed, connection refused

 

Hi, 

 

I am using HCatalog in HUE to import table from a file, and the table had been created successfully.

 

However, when I browser data, there is no any records in that table.

I find there are several logs about HiveMetaStoreClient initiation failed and thrift connection refused.

 

Here is the entire log message.

Exception in thread "main" java.lang.RuntimeException: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient
                    at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:444)
                    at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:672)
                    at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:616)
                    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                    at java.lang.reflect.Method.invoke(Method.java:606)
                    at org.apache.hadoop.util.RunJar.run(RunJar.java:221)
                    at org.apache.hadoop.util.RunJar.main(RunJar.java:136)
Caused by: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient
                    at org.apache.hadoop.hive.metastore.MetaStoreUtils.newInstance(MetaStoreUtils.java:1449)
                    at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.<init>(RetryingMetaStoreClient.java:63)
                    at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:73)
                    at org.apache.hadoop.hive.ql.metadata.Hive.createMetaStoreClient(Hive.java:2689)
                    at org.apache.hadoop.hive.ql.metadata.Hive.getMSC(Hive.java:2708)
                    at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:425)
                    ... 8 more
Caused by: java.lang.reflect.InvocationTargetException
                    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
                    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
                    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
                    at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
                    at org.apache.hadoop.hive.metastore.MetaStoreUtils.newInstance(MetaStoreUtils.java:1447)
                    ... 13 more
Caused by: MetaException(message:Could not connect to meta store using any of the URIs provided. Most recent failure: org.apache.thrift.transport.TTransportException: java.net.ConnectException: Connection refused
                    at org.apache.thrift.transport.TSocket.open(TSocket.java:185)
                    at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.open(HiveMetaStoreClient.java:358)
                    at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.<init>(HiveMetaStoreClient.java:215)
                    at org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient.<init>(SessionHiveMetaStoreClient.java:73)
                    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
                    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
                    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
                    at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
                    at org.apache.hadoop.hive.metastore.MetaStoreUtils.newInstance(MetaStoreUtils.java:1447)
                    at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.<init>(RetryingMetaStoreClient.java:63)
                    at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:73)
                    at org.apache.hadoop.hive.ql.metadata.Hive.createMetaStoreClient(Hive.java:2689)
                    at org.apache.hadoop.hive.ql.metadata.Hive.getMSC(Hive.java:2708)
                    at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:425)
                    at org.apache.hadoop.hive.cli.CliDriver.run(C