question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to connect to ES 5.6.2

See original GitHub issue

I am trying to integrate stagemonitor into an existing Java 1.7.0_80 project, and when trying to connect to elasticsearch 5.6.2 on my local, it fails to think that elasticsearch is available. Digging into the code a little bit looks like HEAD call that happens to elasticsearch for status fails with a “java.net.ProtocolException: HTTP method HEAD doesn’t support output” exception when it attempts to get the pass the output stream from the HttpUrlConnection to the request.

if (request.getOutputStreamHandler() != null) {
    request.getOutputStreamHandler().withHttpURLConnection(connection.getOutputStream());
}

Looking at the calling code, the response isn’t even used, so we could potentially pass null as the output stream handler for this call in order to not fail in this instance. Has anyone else run into this issue? I’m happy to fix and create a PR for this, but want to make sure it isn’t a configuration issue before I do that.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
trampicommented, Oct 4, 2017

Mixed that up while writing the response, sorry 😉

A NoopOutputStreamHandler does not make sense indeed. I was not aware, that connection.getOutputStream could throw e.g. for HEAD requests. Given that it could cause errors (and that we have a replacement), we should remove it.

0reactions
rsinha9commented, Oct 5, 2017
Read more comments on GitHub >

github_iconTop Results From Across the Web

Connecting to Elasticsearch 5.6 externally - Elastic Discuss
I'm having trouble setting up Elasticsearch 5.6.10 using the Installation example with tar from elastic.co. This is running on an Amazon EC2 instance ......
Read more >
Kibana unable to connect to Elasticsearch - Stack Overflow
I am having trouble getting Kibana to connect to elasticsearch. ... as a service called monitoring-es with a cluster IP of 100.63.124.194.
Read more >
Issues with kibana5.5.1 image #51 - GitHub
I build above image & ran kibana5.5.1 using below command. docker run --name kibana-dev -p 5601:5601 -d kibanacustom ( Here i didn't pass...
Read more >
Troubleshooting Amazon OpenSearch Service
If you try to connect to your OpenSearch Service domain from Alpine Linux, DNS resolution can fail if the domain is in a...
Read more >
App Store Review Guidelines - Apple Developer
Failure to include accurate and up-to-date contact information not only frustrates customers, but may violate the law in some countries or ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found