Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

urlopen error [WinError 10054] : Pydruid connection error wile fetching data through client on Imply druid #259

Open
soumonos opened this issue Apr 14, 2021 · 1 comment

Comments

@soumonos
Copy link

I am trying to connect to my enterprise druid console through pydruid. A sample code follows as:

import numpy as np
import pandas as pd
import json
from pydruid import *
from pydruid.client import *
from pylab import plt
from pydruid.query import QueryBuilder
from pydruid.utils.postaggregator import *
from pydruid.utils.aggregators import *
from pydruid.utils.filters import *
client= PyDruid(url= 'https://imply****************** :**88', 
                endpoint='druid/v2')
client.set_basic_auth_credentials(username= "admin", password= "**Password" )
pulled_data= client.timeseries(
            datasource= '**datasource1',
            granularity='day',
            intervals= "2020-02-27T09:00:00.000Z/2020-05-27T09:00:00.000Z",
            filter = Dimension('Event_type')=='**event1')
.......

I have tried both with and without setting basic_auth_credentials
The url , endpoint, and credentials are from my Imply druid cluster API documentation.

The error I get:

URLError: <urlopen error [WinError 10054] An existing connection was forcibly closed by the remote host>

Suggestions would be helpful.

@afghani-iitkgp
Copy link

afghani-iitkgp commented Oct 12, 2022

Have you used any Query Context param?
Try send empty dictionary in context param
https://druid.apache.org/docs/latest/querying/query-context.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants