# Kibana 6.1.0. and newer starts with error

**URL:** <https://discuss.elastic.co/t/kibana-6-1-0-and-newer-starts-with-error/111754>\
**Category:** Kibana\
**Created:** [December 14, 2017, 11:21am UTC](https://discuss.elastic.co/t/kibana-6-1-0-and-newer-starts-with-error/111754 "2017-12-14T11:21:41Z")\
**Posts on this page:** 20\
**Page:** 2

<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:** [December 22, 2017, 9:12am UTC](https://discuss.elastic.co/t/kibana-6-1-0-and-newer-starts-with-error/111754/21 "2017-12-22T09:12:32Z")

</div>

We can give it a try, sure.

---

<div class="post-metadata">

**Author:** ![Mojster](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mojster/32/21209_2.png) [@Mojster](https://discuss.elastic.co/u/Mojster)\
**Post date:** [December 22, 2017, 12:35pm UTC](https://discuss.elastic.co/t/kibana-6-1-0-and-newer-starts-with-error/111754/22 "2017-12-22T12:35:24Z")

</div>

[optimize.jar](https://www.dropbox.com/s/dvnss5crtncyk1z/optimize.rar?dl=0)

Hope this helps further.

---

<div class="post-metadata">

**Author:** ![fragatina](https://avatars.discourse-cdn.com/v4/letter/f/ccd318/32.png) [@fragatina](https://discuss.elastic.co/u/fragatina)\
**Post date:** [December 22, 2017, 2:26pm UTC](https://discuss.elastic.co/t/kibana-6-1-0-and-newer-starts-with-error/111754/23 "2017-12-22T14:26:22Z")

</div>

Hi, it seems we still have this similar issue with 6.1.1 version. And removing the .cache in optimize doesn't seem to work either. See [Kibana 6.1.1 Fatal Error at start](https://discuss.elastic.co/t/kibana-6-1-1-fatal-error-at-start/112986)

I don't have x-pack either.

---

<div class="post-metadata">

**Author:** ![Kim-Kruse-Hansen](https://avatars.discourse-cdn.com/v4/letter/k/f1d935/32.png) [@Kim-Kruse-Hansen](https://discuss.elastic.co/u/Kim-Kruse-Hansen)\
**Post date:** [December 25, 2017, 4:08pm UTC](https://discuss.elastic.co/t/kibana-6-1-0-and-newer-starts-with-error/111754/24 "2017-12-25T16:08:30Z")

</div>

Hi Mojster

I have been looking more into this issue over the last few days and I have a way to reproduce the error consistently now.

Do you have a scripted install of Kibana or are doing you it by hand every time ?

Regards  
Kim

---

<div class="post-metadata">

**Author:** ![Mojster](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mojster/32/21209_2.png) [@Mojster](https://discuss.elastic.co/u/Mojster)\
**Post date:** [December 26, 2017, 7:08am UTC](https://discuss.elastic.co/t/kibana-6-1-0-and-newer-starts-with-error/111754/25 "2017-12-26T07:08:26Z")

</div>

By hand.

I extract the archive, copy previous data folder and change the archive name, to match previous one.

---

<div class="post-metadata">

**Author:** ![Kim-Kruse-Hansen](https://avatars.discourse-cdn.com/v4/letter/k/f1d935/32.png) [@Kim-Kruse-Hansen](https://discuss.elastic.co/u/Kim-Kruse-Hansen)\
**Post date:** [December 26, 2017, 8:30am UTC](https://discuss.elastic.co/t/kibana-6-1-0-and-newer-starts-with-error/111754/26 "2017-12-26T08:30:53Z")

</div>

In order to recreate this error , I deployed a new VM on Azure and installed the components manually. That worked first time and I was also able to install x-pack without any problems.

I also compared the contents of the Windows install package with the Linux Install package and they were pretty much similar.

Normally I have an install script, that deploys the components in the correct order. I also normally run the Kibana as a Windows Service.

I then tried going back to my original machine and installing it manually from a fresh command prompt, which also worked.

But to fast forward .....

**The crucial thing , is the directory from where you launch Kibana for the first time. Or if you use x-pack , the directory from where you install x-pack. it has to be run from your Kibana root directory.**

I use this directory structure

c:\elastic  
c:\elastic\elasticsearch  
c:\elastic\logstash  
c:\elastic\kibana  
c:\elastic\install \<\<\<\<\<\<\<\<\<\<\<\<\< all my install stuff is placed under here , scripts , packages etc  
c:\elastic\java

so I do the following

start a new command prompt in admin mode  
create c:\elastic\kibana  
robocopy from c:\elastic\install\kibana-6.1.1 to c:\elastic\kibana  
\*\*\*\*\*\*\*\*change directory to c:\elastic\kibana \*\*\*\*\*\*\*\*\*\*  
run bin\kibana  
wait for it to launch on 5601  
connect wit browser to verify that it works  
shut it down  
and then launch Kibana Service  
and again  
connect with browser to verify that it works

Same thing for x-pack

start a new command prompt in admin mode  
create c:\elastic\kibana  
robocopy from c:\elastic\install\kibana-6.1.1 to c:\elastic\kibana  
\*\*\*\*\*\*\*\*change directory to c:\elastic\kibana \*\*\*\*\*\*\*\*\*\*  
run bin\kibana-plugin install x-pack  
wait for it to launch on 5601  
connect wit browser to verify that it works  
shut it down  
and then launch Kibana Service  
and again  
connect with browser to verify that it works

I have incorporated this into my install scripts and they work fine now.

I dont know, what Elastic changed from 6..0.1 to 6.1.x , but maybe this can give them what they need.

Regards  
Kim

---

<div class="post-metadata">

**Author:** ![Mojster](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mojster/32/21209_2.png) [@Mojster](https://discuss.elastic.co/u/Mojster)\
**Post date:** [December 26, 2017, 10:49am UTC](https://discuss.elastic.co/t/kibana-6-1-0-and-newer-starts-with-error/111754/27 "2017-12-26T10:49:08Z")

</div>

Thanks. You've done quite a study on the case.

I'm starting it with Windows Service Wrapper. So this should be it.  
I'll try it after our holidays on 3.1. and let you all know.

---

<div class="post-metadata">

**Author:** ![Mojster](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mojster/32/21209_2.png) [@Mojster](https://discuss.elastic.co/u/Mojster)\
**Post date:** [December 26, 2017, 7:25pm UTC](https://discuss.elastic.co/t/kibana-6-1-0-and-newer-starts-with-error/111754/28 "2017-12-26T19:25:17Z")

</div>

Tried to reproduce this at home, but it's always working.

So there is no other option, for me, than to wait till next year.

---

<div class="post-metadata">

**Author:** ![Mojster](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mojster/32/21209_2.png) [@Mojster](https://discuss.elastic.co/u/Mojster)\
**Post date:** [December 27, 2017, 11:56am UTC](https://discuss.elastic.co/t/kibana-6-1-0-and-newer-starts-with-error/111754/29 "2017-12-27T11:56:54Z")

</div>

I've managed to get access to my working environment.

You're right. I've changed path from absolute to relative in my service configuration & it started to work.  
Thanks again.

---

<div class="post-metadata">

**Author:** ![Kim-Kruse-Hansen](https://avatars.discourse-cdn.com/v4/letter/k/f1d935/32.png) [@Kim-Kruse-Hansen](https://discuss.elastic.co/u/Kim-Kruse-Hansen)\
**Post date:** [December 27, 2017, 1:32pm UTC](https://discuss.elastic.co/t/kibana-6-1-0-and-newer-starts-with-error/111754/30 "2017-12-27T13:32:19Z")

</div>

Hi

Thats good news. I have been upgrading some clusters myself today to 6.1.1 and my workaround seems to work so far.

@CJ , are you still monitoring this discussion?

Regards  
Kim

---

<div class="post-metadata">

**Author:** ![Samar\_Rizvi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/samar_rizvi/32/26150_2.png) [@Samar\_Rizvi](https://discuss.elastic.co/u/Samar_Rizvi)\
**Post date:** [January 2, 2018, 1:33pm UTC](https://discuss.elastic.co/t/kibana-6-1-0-and-newer-starts-with-error/111754/31 "2018-01-02T13:33:58Z")

</div>

@Kim-Kruse-Hansen @fragatina @Mojster  
I tried all of the above workarounds, but none worked. The drive where Windows is installed usually has permission issues with many apps. So, I copied Kibana to another drive (it was earlier in C: drive), and viola! Kibana works.

---

<div class="post-metadata">

**Author:** ![Kim-Kruse-Hansen](https://avatars.discourse-cdn.com/v4/letter/k/f1d935/32.png) [@Kim-Kruse-Hansen](https://discuss.elastic.co/u/Kim-Kruse-Hansen)\
**Post date:** [January 2, 2018, 4:20pm UTC](https://discuss.elastic.co/t/kibana-6-1-0-and-newer-starts-with-error/111754/32 "2018-01-02T16:20:39Z")

</div>

Hi

@Marius_Dragomir ,@cjcenizal

Any words on this issue? More people are facing the issue and we have a great way of reproducing and how to work around it. Will it be fixed in 6.1.2 ?

Let us know

Regards  
Kim

---

<div class="post-metadata">

**Author:** ![Viorel\_Florian](https://avatars.discourse-cdn.com/v4/letter/v/58956e/32.png) [@Viorel\_Florian](https://discuss.elastic.co/u/Viorel_Florian)\
**Post date:** [January 2, 2018, 5:33pm UTC](https://discuss.elastic.co/t/kibana-6-1-0-and-newer-starts-with-error/111754/33 "2018-01-02T17:33:11Z")

</div>

I tried starting kibana-6.1.1 and I am encountering the same issue under Windows 2008:

> Error: Uncaught TypeError: (0 , \_reactcss.handleHover) is not a function  
> ([http://localhost:8280/bundles/kibana.bundle.js?v=16350:67](http://localhost:8280/bundles/kibana.bundle.js?v=16350:67)) at window.onerror ([http://localhost:8280/bundles/commons.bundle.js?v=16350:45:8728](http://localhost:8280/bundles/commons.bundle.js?v=16350:45:8728))

I tried deleting the optimize folder and starting kibana from the root directory:

> d:\ELK\apps\kibana-6.1.1-windows-x86\_64

with the command:

> bin\kibana.bat

I even tried to weed-out a permission issue by setting the owner of the kibana folder to "Everyone".  
Alas, the issue persists. Any thoughts?

---

<div class="post-metadata">

**Author:** ![tsullivan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tsullivan/32/31077_2.png) [@tsullivan](https://discuss.elastic.co/u/tsullivan)\
**Post date:** [January 2, 2018, 6:13pm UTC](https://discuss.elastic.co/t/kibana-6-1-0-and-newer-starts-with-error/111754/34 "2018-01-02T18:13:32Z")

</div>

> [@Kim-Kruse-Hansen](#):
>
> Any words on this issue? More people are facing the issue and we have a great way of reproducing and how to work around it. Will it be fixed in 6.1.2 ?

Hi, I came to this topic from [Kibana 6.1.1 Fatal Error at start](https://discuss.elastic.co/t/kibana-6-1-1-fatal-error-at-start/112986) and I think there are a few different issues going on. The few that I can think of are:

1. Installing or removing a plugin while Kibana is running. Kibana must be stopped when a plugin is installed. Kibana discovers all the plugins at startup time, so plugins have to be installed or removed while Kibana is not running.
2. X-Pack or some other plugin not being fully installed. If plugin installation gets aborted before it's finished then it may show as installed even though it is in a broken state. You can remove and try installing the plugin again. Make sure Kibana is restarted after the plugin is reinstalled. Sometimes removing the `optimize` directory and restarting Kibana could act as a shortcut.
3. Running a `bin/kibana-plugin install plugin-name` command from a different working directory. The plugin installer has to be run from the Kibana installation path.

> [@Kim-Kruse-Hansen](#):
>
> run bin\kibana  
> wait for it to launch on 5601  
> connect wit browser to verify that it works  
> shut it down  
> and then launch Kibana Service  
> and again  
> connect with browser to verify that it works

@Kim-Kruse-Hansen if this is what you need to do to run Kibana with X-Pack, it indicates to me that the Kibana Service you're launching is somehow starting Kibana without it running the optimizer first. (Sorry, but I'm not sure how that would happen.) So running `bin/kibana` manually up front does the optimization, and then Kibana can be restarted by the service successfully, because optimization was done. If you add any other plugins or change certain config settings (such as disabling a feature or changing the `server.basePath` setting) then you'd need to run `bin/kibana` manually again to force it do to the optimization again.

---

<div class="post-metadata">

**Author:** ![Kim-Kruse-Hansen](https://avatars.discourse-cdn.com/v4/letter/k/f1d935/32.png) [@Kim-Kruse-Hansen](https://discuss.elastic.co/u/Kim-Kruse-Hansen)\
**Post date:** [January 2, 2018, 6:23pm UTC](https://discuss.elastic.co/t/kibana-6-1-0-and-newer-starts-with-error/111754/35 "2018-01-02T18:23:54Z")

</div>

Hi Tim

Sorry , but there is no service running ,or no aborted plugin installation. This is always a brand new install.

**There is something fundamental changed something n the Kibana installation starting from 6.1.0.** I am using same installation scripts as from way back to 2.5.3.

First msg is always "Optimizing and caching ..."

I have found a way around this problem but as I am sure , you will notice , several other users are facing the same problem.

Only reliable way of getting it to work, once it has gone bad is to remove optimze directory and run bin\kibana from kibana root. Then you can start the service.

Regards  
Kim

---

<div class="post-metadata">

**Author:** ![Mojster](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mojster/32/21209_2.png) [@Mojster](https://discuss.elastic.co/u/Mojster)\
**Post date:** [January 2, 2018, 6:46pm UTC](https://discuss.elastic.co/t/kibana-6-1-0-and-newer-starts-with-error/111754/36 "2018-01-02T18:46:13Z")

</div>

@tsullivan:

I'm running straight Kibana with no plugins and I'm not using X-Pack .  
So my and @Kim-Kruse-Hansen issues are not listed on your list.

It's only a startup dir issue.

---

<div class="post-metadata">

**Author:** ![tsullivan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tsullivan/32/31077_2.png) [@tsullivan](https://discuss.elastic.co/u/tsullivan)\
**Post date:** [January 2, 2018, 6:46pm UTC](https://discuss.elastic.co/t/kibana-6-1-0-and-newer-starts-with-error/111754/37 "2018-01-02T18:46:45Z")

</div>

Hi Kim,

Can you check the before and after permissions of the optimize directory and the files inside it? It may be that you're required to run `bin/kibana` manually so the Kibana service runs as a user with your interactive user privileges, and has the permission to properly create the optimize directory.

If that is the problem, check that the Kibana directory and all the files it contains are owned by the same user account used for running the Kibana service.

Sometimes the core Kibana files are owned by an interactive user account, but they need to be owned by the same user that runs the Kibana service, so that the service can write new files.

---

<div class="post-metadata">

**Author:** ![Viorel\_Florian](https://avatars.discourse-cdn.com/v4/letter/v/58956e/32.png) [@Viorel\_Florian](https://discuss.elastic.co/u/Viorel_Florian)\
**Post date:** [January 2, 2018, 6:49pm UTC](https://discuss.elastic.co/t/kibana-6-1-0-and-newer-starts-with-error/111754/38 "2018-01-02T18:49:20Z")

</div>

Hi @Kim-Kruse-Hansen/@tsullivan ,  
I tried theworkaround with removing optimize directory and run bin\kibana.bat from the root dir. But the error did not go away. I tried this with or without xpack, from clean, fresh copy.  
Regards,  
Vio

---

<div class="post-metadata">

**Author:** ![Mojster](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mojster/32/21209_2.png) [@Mojster](https://discuss.elastic.co/u/Mojster)\
**Post date:** [January 2, 2018, 6:51pm UTC](https://discuss.elastic.co/t/kibana-6-1-0-and-newer-starts-with-error/111754/39 "2018-01-02T18:51:33Z")

</div>

In my example I did not touch any permissions.

But OK, I've change my paths and now it's working.  
I'm considering to write my own windows service installer as it's written for `filebeat` and so get rid of `Windows Service Wrapper`.

---

<div class="post-metadata">

**Author:** ![Kim-Kruse-Hansen](https://avatars.discourse-cdn.com/v4/letter/k/f1d935/32.png) [@Kim-Kruse-Hansen](https://discuss.elastic.co/u/Kim-Kruse-Hansen)\
**Post date:** [January 2, 2018, 7:07pm UTC](https://discuss.elastic.co/t/kibana-6-1-0-and-newer-starts-with-error/111754/40 "2018-01-02T19:07:45Z")

</div>

Hi Tim

There is no issue with permissions . I always run the install scripts from an admin account.

There is a difference between the contents of the optimize on a good and a bad installation.

On a working 6.1.1 installation with x-pack , i have 9.124.192 bytes in .cache and 38.254.227 bytes in bundles.

Can't someone look into what was changed in 6.1.0 in regards to compile/optimize step. 6.0.1 was the last good working version.

Regards  
Kim

[Previous page](https://discuss.elastic.co/t/kibana-6-1-0-and-newer-starts-with-error/111754.md?page=1)

[Next page](https://discuss.elastic.co/t/kibana-6-1-0-and-newer-starts-with-error/111754.md?page=3)
