Kibana: Plugin installation was unsuccessful due to error "Client request error: socket hang up"

Created on 5 Apr 2016  路  15Comments  路  Source: elastic/kibana

I'm trying out Kibana 5.0 Alpha 1, and when I try to install X-Pack using the instructions in the docs, I get an error and plugin installation fails:

> bin/kibana-plugin install x-pack
Attempting to transfer from x-pack
Error: Client request error: socket hang up
Plugin installation was unsuccessful due to error "Client request error: socket hang up"
bug v5.0.0 v5.0.0-alpha2

Most helpful comment

I got another error today,

馃檯 sudo bin/kibana-plugin install x-pack

Error as below

Attempting to transfer from x-pack
Error: Client request error: Parse Error
Plugin installation was unsuccessful due to error "Client request error: Parse Error"

馃檰 sudo bin/kibana-plugin install https://download.elastic.co/kibana/x-pack/x-pack-5.0.0-alpha1.zip

Looks good in this way

Attempting to transfer from https://download.elastic.co/kibana/x-pack/x-pack-5.0.0-alpha1.zip
Transferring 70886062 bytes....................
Transfer complete
Retrieving metadata from plugin archive
Extracting plugin archive
Extraction complete
Optimizing and caching browser bundles...
Plugin installation complete

All 15 comments

I'm not sure why, but it seems to be failing before it even gets to the url download.

And to clarify, the workaround for this is to download from the url directly:

bin/kibana-plugin install https://download.elastic.co/kibana/x-pack/x-pack-5.0.0-alpha1.zip

Correct output

$ bin/kibana-plugin install x-pack
Attempting to transfer from x-pack
Attempting to transfer from https://download.elastic.co/kibana/x-pack/x-pack-5.0.0-alpha1.zip
Transferring 70886062 bytes....................

So, the socket hangs up before the download starts. According to this Stackoverflow answer, it's due to no response from the server within the expected time window. This might just be caused by a bad connection.

Am running into similar issue with slightly different error message while installing X-Pack into Kibana 5.0 Alpha 1. ( followed instructions from the doc https://www.elastic.co/downloads/x-pack)

bin/kibana-plugin install x-pack
Attempting to transfer from x-pack
Error: Client request error: read ECONNRESET
Plugin installation was unsuccessful due to error "Client request error: read ECONNRESET"

OSX Yosemite Version: 10.10.5

I am getting

bin/kibana-plugin install x-pack
Attempting to transfer from x-pack
Error: Client request error: socket hang up
Plugin installation was unsuccessful due to error "Client request error: socket hang up"

on OS X El Capitan - 10.11.4.

I'm also getting the same issue.

I tried to download locally the file then install it from the hard disk. But did not work either:

$ ./kibana-marvel-5.0.0-alpha1/bin/kibana-plugin install ~/Downloads/x-pack-5.0.0-alpha1.zip 
Attempting to transfer from /Users/dpilato/Downloads/x-pack-5.0.0-alpha1.zip
Attempting to transfer from https://download.elastic.co/kibana//Users/dpilato/Downloads/x-pack-5.0.0-alpha1.zip//Users/dpilato/Downloads/x-pack-5.0.0-alpha1.zip-5.0.0-alpha1.zip
Plugin installation was unsuccessful due to error "No valid url specified."

But the file exists:

$ ll /Users/dpilato/Downloads/x-pack-5.0.0-alpha1.zip
-rw-r--r--@ 1 dpilato  staff  70886062 11 avr 12:03 /Users/dpilato/Downloads/x-pack-5.0.0-alpha1.zip

Running bin/kibana-plugin install file:///Users/dpilato/Downloads/x-pack-5.0.0-alpha1.zip actually worked. So don't forget the file://. I initially tried file:/path/to/plugin instead of file:///path/to/plugin and it did not work although it was looking a correct URL to me (actually IIRC Elasticsearch plugin manager supports it)

I got another error today,

馃檯 sudo bin/kibana-plugin install x-pack

Error as below

Attempting to transfer from x-pack
Error: Client request error: Parse Error
Plugin installation was unsuccessful due to error "Client request error: Parse Error"

馃檰 sudo bin/kibana-plugin install https://download.elastic.co/kibana/x-pack/x-pack-5.0.0-alpha1.zip

Looks good in this way

Attempting to transfer from https://download.elastic.co/kibana/x-pack/x-pack-5.0.0-alpha1.zip
Transferring 70886062 bytes....................
Transfer complete
Retrieving metadata from plugin archive
Extracting plugin archive
Extraction complete
Optimizing and caching browser bundles...
Plugin installation complete

I debugged this with @skearns64 (as he's able to consistently reproduce this issue but I'm not). I was looking for differences between his environment and mine since the code is identical in both cases. In his case, the bare string x-pack actually resolves to an IP address, which is why the code even attempts (and later fails) to make a HTTP request to x-pack.

I still want to confirm this behavior with others who have reported this issue (or understand what else might be causing it for them) but I think the code fix is pretty obvious at this point: to check the protocol in the supplied URL and only make a HTTP request if the protocol is either http or https.

Fixed by #6998.

I did some more digging around to figure out why this issue seemed to be happening only for certain users (@skearns64, @pickypg 鈥斅爐hanks for your help debugging this) but not everyone. It turns out that the HTTP client library we use to fetch plugins, wreck, works this way when presented with a URL without a protocol (for example, "x-pack"):

  • Assumes http as the protocol
  • Assumes localhost as the host
  • Assumes 80 as the port

In the case of @skearns64 and @pickypg, they actually had something listening at localhost on port 80, so the TCP connection would succeed, and immediately fail with an ECONNRESET error. In my case (where I could not reproduce this issue), I had nothing listening at localhost on port 80, so the connection would not even succeed and the error was ECONNREFUSED.

The fix in #6998 (where we don't even attempt a download over HTTP if the URL protocol does not start with http or https) is good. Still, it was useful (for me anyway) to understand why this was failing for some users in this issue but not others.

Nice find! I wonder why wreck falls back to that... I could understand a fallback of some kind, but I would have assumed at the very least that it would have fallen back to http://x-pack.

To add some more info, I kept looking into what was consuming port 80 on my Mac, and I came across this post on SuperUser that definitely does appear to be the case. Basically OS X is consuming port 80 on demand, but not in any useful way.

I am installing x-pack in kibana 6.2.4, but i can't install x-pack.
console is following

D:\elastic\kibana-6.2.4-windows-x86_64\bin>kibana-plugin install x-pack
Attempting to transfer from x-pack
Attempting to transfer from https://artifacts.elastic.co/downloads/kibana-plugins/x-pack/x-pack-6.2.4.zip
Error: Client request error: unable to verify the first certificate
Plugin installation was unsuccessful due to error "Client request error: unable to verify the first certificate"

How can i solve this problem?

Download the plugin(.zip) ,then paste it into plugin directory of kibana.
then bin / kibana-plugin install file:\\path_to_pluginfolder\plugins\plugin.zip

e.g: bin/ kibana-plugin install file:\\C:\ELK\kibana-6.2.4-windows-x86_64\kibana-6.2.4-windows-x86_64\plugins\plugin.zip

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cafuego picture cafuego  路  3Comments

stacey-gammon picture stacey-gammon  路  3Comments

timmolter picture timmolter  路  3Comments

mark54g picture mark54g  路  3Comments

tbragin picture tbragin  路  3Comments