# Error during (re-)installation of x-pack

**URL:** <https://discuss.elastic.co/t/error-during-re-installation-of-x-pack/88710>\
**Category:** Kibana\
**Created:** [June 8, 2017, 12:01pm UTC](https://discuss.elastic.co/t/error-during-re-installation-of-x-pack/88710 "2017-06-08T12:01:04Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![srd](https://avatars.discourse-cdn.com/v4/letter/s/ba9def/32.png) [@srd](https://discuss.elastic.co/u/srd)\
**Post date:** [June 8, 2017, 12:01pm UTC](https://discuss.elastic.co/t/error-during-re-installation-of-x-pack/88710/1 "2017-06-08T12:01:04Z")

</div>

I'm trying to update kibanas x-pack plugin from 5.3 to 5.4.1 running on archlinux. Kibana itself was installed via archlinux' kibana aur package.

While removing the old x-pack plugin works, installing the new plugin version fails with:

$ bin/kibana-plugin remove x-pack  
Removing x-pack...  
DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.  
$ ls plugins/  
$ bin/kibana-plugin install x-pack  
DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.  
Attempting to transfer from x-pack  
Attempting to transfer from [https://artifacts.elastic.co/downloads/kibana-plugins/x-pack/x-pack-5.4.1.zip](https://artifacts.elastic.co/downloads/kibana-plugins/x-pack/x-pack-5.4.1.zip)  
Transferring 119988917 bytes....................  
Transfer complete  
Retrieving metadata from plugin archive  
Extracting plugin archive  
Extraction complete  
Optimizing and caching browser bundles...  
Plugin installation was unsuccessful due to error "Wrong length!"

I have no idea what "Wrong length!" mean, what actually is the wrong length nor how to figure out what this message is trying to tell me so that I can put things right.

Google doesn't show anything useful, so I'm hoping someone here has a pointer for me.

---

<div class="post-metadata">

**Author:** ![Marius\_Dragomir](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marius_dragomir/32/42087_2.png) [@Marius\_Dragomir](https://discuss.elastic.co/u/Marius_Dragomir)\
**Post date:** [June 8, 2017, 4:42pm UTC](https://discuss.elastic.co/t/error-during-re-installation-of-x-pack/88710/2 "2017-06-08T16:42:42Z")

</div>

That aur package is not distributed by us, we only do zip, tar.gz, rpm and deb. You can use one of those, i think both rpm and deb can be used on Archlinux. And the tar will work pretty much everywhere with no problems.

---

<div class="post-metadata">

**Author:** ![srd](https://avatars.discourse-cdn.com/v4/letter/s/ba9def/32.png) [@srd](https://discuss.elastic.co/u/srd)\
**Post date:** [June 8, 2017, 5:22pm UTC](https://discuss.elastic.co/t/error-during-re-installation-of-x-pack/88710/3 "2017-06-08T17:22:18Z")

</div>

Hi Marius,  
I think you misunderstood. Kibana itself installed just fine, that isn't the issue.

It's the x-pack plugin thats causing the trouble while being installed with kibana-plugin. If you look at the console output I pasted in my original message, the error occurs during the installation of the plugin, after downloading the plugin .zip file from ES' server, after extraction and during(?) or after(?) the browser bundle optimization.

(And the aur doens't do much more than fetch the tarball from elastic's server and install a systemd service file. See: [https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=kibana](https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=kibana) )

---

<div class="post-metadata">

**Author:** ![srd](https://avatars.discourse-cdn.com/v4/letter/s/ba9def/32.png) [@srd](https://discuss.elastic.co/u/srd)\
**Post date:** [June 9, 2017, 6:42am UTC](https://discuss.elastic.co/t/error-during-re-installation-of-x-pack/88710/4 "2017-06-09T06:42:38Z")

</div>

So I did a bit more digging. Turns out that an ArrayBuffer is being allocated with a length of "undefined".

Here's the output including the stack trace:  
DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.  
Attempting to transfer from x-pack  
Attempting to transfer from [https://artifacts.elastic.co/downloads/kibana-plugins/x-pack/x-pack-5.4.1.zip](https://artifacts.elastic.co/downloads/kibana-plugins/x-pack/x-pack-5.4.1.zip)  
Transferring 119988917 bytes....................  
Transfer complete  
Retrieving metadata from plugin archive  
Extracting plugin archive  
Extraction complete  
Optimizing and caching browser bundles...  
RangeError: Wrong length!  
at validateArrayBufferArguments (/usr/share/kibana/node\_modules/core-js/modules/\_typed-buffer.js:163:8)  
at new ArrayBuffer (/usr/share/kibana/node\_modules/core-js/modules/\_typed-buffer.js:254:29)  
at v8.js:122:17  
at NativeModule.compile (bootstrap\_node.js:563:7)  
at Function.NativeModule.require (bootstrap\_node.js:506:18)  
at Function.Module.\_load (module.js:446:25)  
at Module.require (module.js:513:17)  
at require (internal/module.js:11:18)  
at Object. (/usr/share/kibana/plugins/x-pack/plugins/monitoring/server/kibana\_monitoring/lib/map\_event.js:5:1)  
at Module.\_compile (module.js:569:30)  
at loader (/usr/share/kibana/node\_modules/babel-register/lib/node.js:144:5)  
at Object.require.extensions.(anonymous function) [as .js] (/usr/share/kibana/node\_modules/babel-register/lib/node.js:154:7)  
at Module.load (module.js:503:32)  
at tryModuleLoad (module.js:466:12)  
at Function.Module.\_load (module.js:458:3)  
at Module.require (module.js:513:17)  
at require (internal/module.js:11:18)  
at Object. (/usr/share/kibana/plugins/x-pack/plugins/monitoring/server/kibana\_monitoring/lib/ops\_buffer.js:5:1)  
at Module.\_compile (module.js:569:30)  
at loader (/usr/share/kibana/node\_modules/babel-register/lib/node.js:144:5)  
at Object.require.extensions.(anonymous function) [as .js] (/usr/share/kibana/node\_modules/babel-register/lib/node.js:154:7)  
at Module.load (module.js:503:32)  
at tryModuleLoad (module.js:466:12)  
at Function.Module.\_load (module.js:458:3)  
at Module.require (module.js:513:17)  
at require (internal/module.js:11:18)  
at Object. (/usr/share/kibana/plugins/x-pack/plugins/monitoring/server/kibana\_monitoring/index.js:1:1)  
at Module.\_compile (module.js:569:30)  
at loader (/usr/share/kibana/node\_modules/babel-register/lib/node.js:144:5)  
at Object.require.extensions.(anonymous function) [as .js] (/usr/share/kibana/node\_modules/babel-register/lib/node.js:154:7)  
at Module.load (module.js:503:32)  
at tryModuleLoad (module.js:466:12)  
at Function.Module.\_load (module.js:458:3)  
at Module.require (module.js:513:17)  
at require (internal/module.js:11:18)  
at Object. (/usr/share/kibana/plugins/x-pack/plugins/monitoring/index.js:8:1)  
at Module.\_compile (module.js:569:30)  
at loader (/usr/share/kibana/node\_modules/babel-register/lib/node.js:144:5)  
at Object.require.extensions.(anonymous function) [as .js] (/usr/share/kibana/node\_modules/babel-register/lib/node.js:154:7)  
at Module.load (module.js:503:32)  
at tryModuleLoad (module.js:466:12)  
at Function.Module.\_load (module.js:458:3)  
at Module.require (module.js:513:17)  
at require (internal/module.js:11:18)  
at Object. (/usr/share/kibana/plugins/x-pack/index.js:3:1)  
at Module.\_compile (module.js:569:30)  
at loader (/usr/share/kibana/node\_modules/babel-register/lib/node.js:144:5)  
at Object.require.extensions.(anonymous function) [as .js] (/usr/share/kibana/node\_modules/babel-register/lib/node.js:154:7)  
at Module.load (module.js:503:32)  
at tryModuleLoad (module.js:466:12)  
at Function.Module.\_load (module.js:458:3)  
at Module.require (module.js:513:17)  
at require (internal/module.js:11:18)  
at /usr/share/kibana/src/server/plugins/plugin\_collection.js:79:32  
at Generator.next ()  
at step (/usr/share/kibana/src/server/plugins/plugin\_collection.js:49:191)  
at /usr/share/kibana/src/server/plugins/plugin\_collection.js:49:437  
at Promise ()  
at /usr/share/kibana/src/server/plugins/plugin\_collection.js:49:99  
at Plugins.new (/usr/share/kibana/src/server/plugins/plugin\_collection.js:115:7)  
at KbnServer. (/usr/share/kibana/src/server/plugins/scan.js:94:26)  
at Generator.next ()  
at step (/usr/share/kibana/src/server/plugins/scan.js:19:191)  
at /usr/share/kibana/src/server/plugins/scan.js:19:361  
at   
Plugin installation was unsuccessful due to error "Wrong length!"

I tried to fudge it by just allocating a megabytes worth of buffer in the case the length given is undefined, however that results in a segfault of the node binary, so no luck in a hacky quick fix there.

As I'm not a proficient node developer, this twisty maze of module loaders doesn't really tell me much of what is going on (or rather: what is going wrong). I'll try and work through the stack trace and see if I can find out more, however input from people who know their way around this is welcome.

---

<div class="post-metadata">

**Author:** ![jbudz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jbudz/32/45922_2.png) [@jbudz](https://discuss.elastic.co/u/jbudz)\
**Post date:** [June 9, 2017, 4:37pm UTC](https://discuss.elastic.co/t/error-during-re-installation-of-x-pack/88710/5 "2017-06-09T16:37:55Z")

</div>

I responded at [https://github.com/elastic/kibana/issues/12253](https://github.com/elastic/kibana/issues/12253)

---

<div class="post-metadata">

**Author:** ![srd](https://avatars.discourse-cdn.com/v4/letter/s/ba9def/32.png) [@srd](https://discuss.elastic.co/u/srd)\
**Post date:** [June 9, 2017, 5:37pm UTC](https://discuss.elastic.co/t/error-during-re-installation-of-x-pack/88710/6 "2017-06-09T17:37:36Z")

</div>

Thanks Jon.  
For other people encountering such an issue: it was a version mismatch of nodejs. Running node 6.10.2 resolved this issue for me and with this version of kibana. Other versions may obviously require other versions.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 7, 2017, 5:37pm UTC](https://discuss.elastic.co/t/error-during-re-installation-of-x-pack/88710/7 "2017-07-07T17:37:52Z")

</div>

Closed on July 7, 2017, 5:37pm UTC

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
