[SOLVED] X-Pack 6.2 install Fatal Error: ace.require is not a function

Uncaught TypeError: ace.require is not a function (http://localhost:5601/bundles/kibana.bundle.js?v=16602:1)

I am struggling to get X-Pack 6.2.3 running a single node on Windows 10 and Windows 2012.
I have installed three times already. ELK works before X-Pack.

Once the X-Pack has been installed, on going to http://localhost:5601 the login page appears, after logging in the following error message appears:

This is not a unique issue and I cannot find a solution

https://github.com/floragunncom/search-guard-kibana-plugin/issues/80

Things I have tried:

  • Elasticsearch SSL or without SSL
  • Passwords with only alphanum chars
  • Basic License install vs Trial license
  • Different Browsers
  • Windows 10 & Windows 2012

I have confirmed that the kibana user login is correctly authenticating. (an incorrect user or an incorrect password will not proceed past the login page)

When I have enabled Kibana verbose logging I can see the following:

Anyone have any ideas please?

I am having the same issue with ES and Kibana 6.2.3. Also running Windows 10. Elasticsearch installed fine, and setting up x-pack with transport security went fine as well. Also setup the default elastic,kibana,logstash users with passwords as well. Kibana installed fine, and x-pack installed there as well.

Could this be an issue with Windows 10 and v6? Has any one tried down grading to v5?

@AlphaJosh the linked Windows installer issue #166 is not related; would you mind editing the question and removing it, as I think it conflates and confuses the issue.

I just installed both Elasticsearch and Kibana 6.2.3 with X-Pack plugin to see if I could replicate the issue, however I was unable to:

I'm using an installation PowerShell script for this, which you're also more than welcome to try

You can run it with

. { iwr -useb https://gist.githubusercontent.com/russcam/ee5293c7ae5bf1fa22de13cbbd2d28c4/raw/90d8f4f78ae4be1b1fab8796bcb782607d8f60d0/ElasticStack.ps1 } | iex; Install-ElasticStack -Product Elasticsearch,Kibana -Version 6.2.3 -Destination C:\elasticsearch

and follow the bootstrap/user password prompts that appear.

Note: multi-tabbed console emulators such as Cmder may not wait for processes started with Start-Process <name> -Wait that spawn new windows with PowerShell to finish, so it's best to run it from a PowerShell terminal, which will.

Let me know if it works for you.

Encountering the same issue. Found two other discussions on the topic that seem to have stalled:

In each discussion, including this one, I believe there are key facts missing to reproduce the issue.

  1. For consistency, we are talking about installing/running on Windows.
  2. It seems that in each case "installation" of kibana was actually just download and extract the zip file
  3. Probably most importantly, we are missing the current directory from which the kibana was executed (the first time, and each subsequent time).

For me, the process was as follows:

  1. Download and extract kibana 6.2.3 zip file to a safe location (no spaces in path)
  2. Change directory to bin folder
  3. Run kibana.bat
  4. Kibana launches, works fine
  5. Later, shut down kibana
  6. Still in bin folder, run kibana-plugin install x-pack
  7. After installation and config complete, run kibana again with kibana.bat
  8. Got the error mentioned in the OP, but, I almost immediately realized my error of executing kibana-plugin from the bin folder (a x-pack folder was created inside bin!)
  9. So I did a kibana-plugin remove x-pack. Folders got cleaned up.
  10. Change directory to kibana root, remove optimize folder
  11. Run bin\kibana.bat
  12. From this point forward, no combination of workarounds suggested in the other two discussions help; I always get the "Uncaught TypeError".

I really suspect the key to reproducing the problem has to do with using the windows command prompt shell, and the path from which kibana is executed for the very first time.

Hi

This has been a known issue on Windows since version 6.1.x. Elastic has apparently not been able to reproduce the error or document what they changed in Kibana 6.1.0.

I have published a workaround that has worked for me on every version from 6.1.0 to currently 6.2.3.

It has to do with how you run kibana bat and from directory you start it as you write yourself.

make sure Kibana is stopped
Start a fresh prompt in admin mode.
cd to your kibana root directory
rd optimize /s /q
bin\kibana
wait for it to launch

whether x-pack is installed or not doesnt matter. I follow same steps every time.

This works consistently for me on all my clusters. I have 6 clusters currently. I cannot speak for your particular environment ofc.

Best of luck
Kim

1 Like

Hey Kim, thanks for your contributions to this discussion so far. In fact, I've been carefully following the steps of your work around, but so far I haven't had success (part of the reason for my post).

I plan on starting over with a fresh "install" shortly, and will follow your procedure. I'll post an update.

Thanks again!

SUCCESS!!!!

The powershell script worked! Thank you

. { iwr -useb https://gist.githubusercontent.com/russcam/ee5293c7ae5bf1fa22de13cbbd2d28c4/raw/90d8f4f78ae4be1b1fab8796bcb782607d8f60d0/ElasticStack.ps1 } | iex; Install-ElasticStack -Product Elasticsearch,Kibana -Version 6.2.3 -Destination C:\elasticsearch

I started with a completely fresh folder. Though I got an error (which would have been related to my computer: "The term 'Install-ElasticStack' is not recognized"
So I downloaded the script https://gist.githubusercontent.com/russcam/ee5293c7ae5bf1fa22de13cbbd2d28c4/raw/90d8f4f78ae4be1b1fab8796bcb782607d8f60d0/ElasticStack.ps1

In powershell I changed to the folder and then ran .\ElasticStack.ps1 - This loads the install module. Then I ran the actual install:
Install-ElasticStack -Product Elasticsearch,Kibana -Version 6.2.3 -Destination C:\elk

I had a and followed the prompt for new passwords. I did notice there was prompt about password for a keystore that I hadnt seen before: bootstrap.password does not exist in keystore.

At the end I could log onto Kibana with the credentials:
Username: kibana
Password: kibana

Thank you, that script NEEDS to be on the offical doco, it would have saved me hours and hours of frustration.

FYI: I had previously tried deleting optimize and reinstalling and that didnt work for me.

Still no success using your workaround. I don't doubt that it works (probably for most), I'm more inclined to think that something is wrong/off about my environment. I am prototyping an elasticstack setup to demonstrate how the ingestion process works, and how Kibana can be used to view the data, and I'm doing all of this on my dev workstation (Windows).

It seems that the OP is happy with the custom installation powershell script provided by @forloop, but I'm not ready to use an unofficial install-aid from here or elsewhere.

So for now, I'll have to do without x-pack.

Happy to hear it worked for you :slight_smile:

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