# Connection errors when running functional\_test\_runner.js

**URL:** <https://discuss.elastic.co/t/connection-errors-when-running-functional-test-runner-js/153685>\
**Category:** Kibana\
**Created:** [October 23, 2018, 9:11pm UTC](https://discuss.elastic.co/t/connection-errors-when-running-functional-test-runner-js/153685 "2018-10-23T21:11:57Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sam\_Reynolds](https://avatars.discourse-cdn.com/v4/letter/s/3da27b/32.png) [@Sam\_Reynolds](https://discuss.elastic.co/u/Sam_Reynolds)\
**Post date:** [October 23, 2018, 9:11pm UTC](https://discuss.elastic.co/t/connection-errors-when-running-functional-test-runner-js/153685/1 "2018-10-23T21:11:57Z")

</div>

Hello,

I'm having an issue with running tests for kibana. These are the steps I took to run the tests.

1. cloned the 6.3.4 repo to a directory
2. ran yarn kbn bootstrap in the kibana directory.
3. ran node ./script/functional\_test\_runner.js

it opens up a web browser and does some UI testing with the following output:

```auto
$ node ./scripts/functional_test_runner.js 
 info Config loaded
 info Starting local chromedriver at port 9515
 info Remote initialized
 info Starting tests

 └-: console app
   └-> "before all" hook
   └-> "before all" hook
   └-: console app
     └-> "before all" hook
     └-> "before all" hook

```

then I get errors stating:

`unable to revive connections: http://localhost:9220/`

here's the full log: [https://pastebin.com/jF1BhDgB](https://pastebin.com/jF1BhDgB)

I'm running Kibana 6.3.4 from the github repo on Centos 7.

Let me know if there's a part of the documentation that I missed that might address this.

---

<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:** [October 24, 2018, 12:46pm UTC](https://discuss.elastic.co/t/connection-errors-when-running-functional-test-runner-js/153685/2 "2018-10-24T12:46:46Z")

</div>

You either need to run `node scripts/functional_tests_server` before the test\_runner or run directly with `node scripts/functional_tests` . You can read the description of the functional test suite here: [https://www.elastic.co/guide/en/kibana/current/development-functional-tests.html](https://www.elastic.co/guide/en/kibana/current/development-functional-tests.html)

---

<div class="post-metadata">

**Author:** ![Sam\_Reynolds](https://avatars.discourse-cdn.com/v4/letter/s/3da27b/32.png) [@Sam\_Reynolds](https://discuss.elastic.co/u/Sam_Reynolds)\
**Post date:** [October 24, 2018, 1:50pm UTC](https://discuss.elastic.co/t/connection-errors-when-running-functional-test-runner-js/153685/3 "2018-10-24T13:50:39Z")

</div>

Ah I see now. I tried running `functional_tests.js` and this is my output

```auto
node ./scripts/functional_tests.js 
 info Installing from snapshot
   │ info version: 6.3.2
   │ info install path: /home/sreynolds/kibana/kibana/.es/test-rwu9yk212d
   │ info license: oss
   │ info downloading from https://snapshots.elastic.co/downloads/elasticsearch/elasticsearch-oss-6.3.2-SNAPSHOT.tar.gz
Error: Not Found

```

Running functional\_tests\_server.js produces the same result. Is there somewhere I can change the URL to a valid URL?

---

<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:** [October 24, 2018, 1:51pm UTC](https://discuss.elastic.co/t/connection-errors-when-running-functional-test-runner-js/153685/4 "2018-10-24T13:51:42Z")

</div>

you need to run on master or 6.x, i don't think we have snapshots stored for 6.3.2.

---

<div class="post-metadata">

**Author:** ![Sam\_Reynolds](https://avatars.discourse-cdn.com/v4/letter/s/3da27b/32.png) [@Sam\_Reynolds](https://discuss.elastic.co/u/Sam_Reynolds)\
**Post date:** [October 24, 2018, 2:27pm UTC](https://discuss.elastic.co/t/connection-errors-when-running-functional-test-runner-js/153685/5 "2018-10-24T14:27:56Z")

</div>

Okay, what I'm trying to do is write some tests for a plugin developed in kibana-6.3.2 and the documentation says to use functional\_test\_runner. Is there another way to write tests for this plugin without having to change kibana version?

---

<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:** [October 24, 2018, 3:32pm UTC](https://discuss.elastic.co/t/connection-errors-when-running-functional-test-runner-js/153685/6 "2018-10-24T15:32:26Z")

</div>

Hmm, you can try to run it with ES from source by adding this as a parameter `--esFrom=source` to the call.

---

<div class="post-metadata">

**Author:** ![Sam\_Reynolds](https://avatars.discourse-cdn.com/v4/letter/s/3da27b/32.png) [@Sam\_Reynolds](https://discuss.elastic.co/u/Sam_Reynolds)\
**Post date:** [October 24, 2018, 3:48pm UTC](https://discuss.elastic.co/t/connection-errors-when-running-functional-test-runner-js/153685/7 "2018-10-24T15:48:24Z")

</div>

Alright that got me passed the URL error. Is there a way to use an already running elasticsearch server instead of starting a new one or am I misunderstanding what it's actually doing with elasticsearch?

---

<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:** [October 24, 2018, 3:50pm UTC](https://discuss.elastic.co/t/connection-errors-when-running-functional-test-runner-js/153685/8 "2018-10-24T15:50:50Z")

</div>

you don't need to use a new elasticsearch server. just set that setting and restart the browser.

---

<div class="post-metadata">

**Author:** ![Sam\_Reynolds](https://avatars.discourse-cdn.com/v4/letter/s/3da27b/32.png) [@Sam\_Reynolds](https://discuss.elastic.co/u/Sam_Reynolds)\
**Post date:** [October 24, 2018, 5:14pm UTC](https://discuss.elastic.co/t/connection-errors-when-running-functional-test-runner-js/153685/9 "2018-10-24T17:14:01Z")

</div>

Is the functional tests script not starting a new elasticsearch server to use during the tests?

I tried adding --esFrom=source to the command and it was looking for elasticsearch in the directory below kibana. I cloned elasticsearch in the directory it was expecting to find it in and It failed to build due to some java error. [https://pastebin.com/ebzmg1uF](https://pastebin.com/ebzmg1uF)

According to [https://www.elastic.co/guide/en/kibana/current/development-functional-tests.html](https://www.elastic.co/guide/en/kibana/current/development-functional-tests.html) the 3rd option looks like I can use a remote instance of elasticsearch for testing. This would be a better option than building elasticsearch locally, but I am a little reluctant using an elasticsearch that contains data that I don't want to lose. Do the Kibana tests have any affect on the elasticsearch data? I cant imagine it would but I figured I'd ask.

---

<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:** [October 24, 2018, 11:25pm UTC](https://discuss.elastic.co/t/connection-errors-when-running-functional-test-runner-js/153685/10 "2018-10-24T23:25:21Z")

</div>

You can run a clean ES instance. This will be the safest option. I think even the latest 6.3 release should work with your branch. Just use the environment variables `TEST_ES...` to set the address for your ES.

---

<div class="post-metadata">

**Author:** ![Sam\_Reynolds](https://avatars.discourse-cdn.com/v4/letter/s/3da27b/32.png) [@Sam\_Reynolds](https://discuss.elastic.co/u/Sam_Reynolds)\
**Post date:** [October 26, 2018, 2:50pm UTC](https://discuss.elastic.co/t/connection-errors-when-running-functional-test-runner-js/153685/11 "2018-10-26T14:50:04Z")

</div>

Okay, I'll try that out next week. Thanks for the help!

---

<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:** [November 23, 2018, 3:01pm UTC](https://discuss.elastic.co/t/connection-errors-when-running-functional-test-runner-js/153685/12 "2018-11-23T15:01:15Z")

</div>

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