I had the same problem. Port 9200 was blocked on my VPS. Also remember to enable basic authentication in elasticsearch. After I did that it connected fine.