0

I am able to connect to hive from Python using PyHive library. While fetching data from hive using PyHive I am facing issue Connection reset by peer.

After connection established I am fetching data from hive using PyHive from Python. Connection is getting successful but while fetching data from hive it runs for fore than 5 mins and then throws connection reset by peer.

from pyhive import 
hive conn = hive.Connection(host="host1", port="",auth="", database="",kerberos_service_name="") #successfully connection established 
cur = conn.cursor() cur.execute(query1) #(sometimes it works and some times it throws "Connection reset by peer" if query runs more than 5min)
Georgy
  • 12,464
  • 7
  • 65
  • 73
Bond
  • 1
  • 3
  • Can you show us the [relevant code](https://stackoverflow.com/help/how-to-ask) please? – u-ways Aug 29 '18 at 16:15
  • from pyhive import hive conn = hive.Connection(host="host1", port="",auth="", database="",kerberos_service_name="") -> successfully connection established cur = conn.cursor() cur.execute(query1) -> (sometimes it works and some times it throws "Connection reset by peer" if query runs more than 5min) – Bond Aug 29 '18 at 16:36

1 Answers1

0

Not recognizing connection from server site can result into this error. Can you please try killing your python process using pkill -9 pid? Because if you trying to connect to hive using two python scripts at same time, it might result into not recognizing connection.