python - Can't create a working elasticsearch-py instance -


i've got amazon elasticsearch service running , can connect fine using curl/postman, when try create elasticsearch-py instance ide hangs indefinitely.

endpoints = ['http://xxx.us-east-1.es.amazonaws.com',              'http://xxx.us-east-1.es.amazonaws.com:443',              'http://xxx.us-east-1.es.amazonaws.com:9200']  endpoint in endpoints:     try:         es = elasticsearch(endpoint)         print es.count('analytics_v4')     except exception, e:         print e         print endpoint + " didn't work" 

this current test set up, ide (pycharm) stops @ point , need end run able try again, i've tried each endpoint individually , none of them work.

my access policy :

{   "version": "2012-10-17",   "statement": [     {       "effect": "allow",       "principal": {         "aws": "*"       },       "action": "es:*",       "resource": "arn:aws:es:us-east-1:myiddomain/analytics/*",       "condition": {         "ipaddress": {           "aws:sourceip": [             "myip"           ]         }       }     }   ] } 

i'm getting error :433 of : connectionerror(httpconnectionpool(host='myid.us-east-1.es.amazonaws.com', port=443): max retries exceeded url: /analytics_v4/_count (caused <class 'httplib.badstatusline'>: '')) caused by: maxretryerror(httpconnectionpool(host='myid.us-east-1.es.amazonaws.com', port=443): max retries exceeded url: /analytics_v4/_count (caused <class 'httplib.badstatusline'>: ''))


Comments

Popular posts from this blog

python Tkinter Capturing keyboard events save as one single string -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

javascript - Z-index in d3.js -