# Documents and Reference UI sections not populated

**URL:** <https://discuss.elastic.co/t/documents-and-reference-ui-sections-not-populated/269910>\
**Category:** Elastic Search\
**Tags:** elastic-app-search\
**Created:** [April 12, 2021, 4:06pm UTC](https://discuss.elastic.co/t/documents-and-reference-ui-sections-not-populated/269910 "2021-04-12T16:06:07Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![mack](https://avatars.discourse-cdn.com/v4/letter/m/b19c9b/32.png) [@mack](https://discuss.elastic.co/u/mack)\
**Post date:** [April 12, 2021, 4:06pm UTC](https://discuss.elastic.co/t/documents-and-reference-ui-sections-not-populated/269910/1 "2021-04-12T16:06:08Z")

</div>

Hi all,

I've recently set up a linux server running AppSearch with the aim of creating a mini search engine for a project I'm working on. I used the new web crawler to drawl a test set of 10 domains and the crawl went well. I now have 7635 documents on my instance, however when i click on the Documents section, none of the docs are displayed.  
I'm able to view them in the Query Tester area so they do seem to be there.

In addition to this, when attempting to generate a preview of the Reference UI, I am presented with an error stating "An unexpected error occurred: Failed to fetch".

I've searched for possible solutions of event explanations of why this is happening but haven't managed to get anywhere, so any help on this would be amazing.

Thanks in advance.

Malcolm

---

<div class="post-metadata">

**Author:** ![JasonStoltz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jasonstoltz/32/49893_2.png) [@JasonStoltz](https://discuss.elastic.co/u/JasonStoltz)\
**Post date:** [April 13, 2021, 12:59pm UTC](https://discuss.elastic.co/t/documents-and-reference-ui-sections-not-populated/269910/2 "2021-04-13T12:59:13Z")

</div>

Hi @mack. Could you open the up the Network tab in your browser and give us the details of the failure? I.e., on the failed API call, is there a body on the response? And what is the HTTP status code?

---

<div class="post-metadata">

**Author:** ![JasonStoltz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jasonstoltz/32/49893_2.png) [@JasonStoltz](https://discuss.elastic.co/u/JasonStoltz)\
**Post date:** [April 13, 2021, 1:00pm UTC](https://discuss.elastic.co/t/documents-and-reference-ui-sections-not-populated/269910/3 "2021-04-13T13:00:47Z")

</div>

@mack Could you also try either clearing your cookies, logging in with an Incognito (in chrome) window, or try a different browser? I'm curious if you'll still see the same error.

---

<div class="post-metadata">

**Author:** ![mack](https://avatars.discourse-cdn.com/v4/letter/m/b19c9b/32.png) [@mack](https://discuss.elastic.co/u/mack)\
**Post date:** [April 14, 2021, 2:43pm UTC](https://discuss.elastic.co/t/documents-and-reference-ui-sections-not-populated/269910/4 "2021-04-14T14:43:53Z")

</div>

Hi @JasonStoltz

Thanks so much for getting back to me and for the assist.

When attempting to open the ReferenceUI preview, the error I seem to be getting is "ERR\_CONNECTION\_REFUSED".

```
reference-ui-cc86e1ae44c19bb1373a4b8d69bf6644a0fcf6f3dd4b8c860d324f0f56e1d8dc.js:1 POST http://localhost:3002/api/as/v1/engines/mvm-search/search.json net::ERR_CONNECTION_REFUSED

```

Just FYI, I'm connecting to the Elastic AppSearch admin console UI remotely using the public IP of the server in question and I've made sure that ports 3002 and 9200 are open for inbound connections from the machine I am using to connect to the server.

Clearing cookies and connecting through Incognito are still producing the same results unfortunately.

The logs on the actual server aren't much help either as they do not seem to be showing any exceptions thrown when attempting to load the Reference UI preview. Only the following is being shown in the console:

```
[2021-04-14T14:40:30.552+00:00][2832][2510][app-server][INFO]: [05797c28-b5d3-4274-af22-089897b7b7c9] Started GET "/as/engines/mvm-search/reference_application/preview?titleField=title" for x.x.x.x at 2021-04-14 14:40:30 +0000
[2021-04-14T14:40:30.559+00:00][2832][2510][action_controller][INFO]: [05797c28-b5d3-4274-af22-089897b7b7c9] Processing by LocoMoco::Dashboard::ReferenceApplicationsController#preview as HTML
[2021-04-14T14:40:30.560+00:00][2832][2510][action_controller][INFO]: [05797c28-b5d3-4274-af22-089897b7b7c9] Parameters: {"titleField"=>"title", "engine_slug"=>"mvm-search"}
[2021-04-14T14:40:30.795+00:00][2832][2510][action_view][INFO]: [05797c28-b5d3-4274-af22-089897b7b7c9] Rendered loco_moco/app/views/loco_moco/dashboard/reference_applications/preview.html.rb (17.0ms)
[2021-04-14T14:40:30.832+00:00][2832][2510][action_controller][INFO]: [05797c28-b5d3-4274-af22-089897b7b7c9] Completed 200 OK in 271ms (Views: 30.2ms)

```

Could there be some connection between the fact that the items aren't loading in the "Documents" section and the Reference UI preview isn't loading either or am I on the wrong track?

Let me know if you need me to extract more info.

---

<div class="post-metadata">

**Author:** ![JasonStoltz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jasonstoltz/32/49893_2.png) [@JasonStoltz](https://discuss.elastic.co/u/JasonStoltz)\
**Post date:** [April 15, 2021, 11:49am UTC](https://discuss.elastic.co/t/documents-and-reference-ui-sections-not-populated/269910/5 "2021-04-15T11:49:32Z")

</div>

Yep. The connection there is that they both use the public search API, which has slightly different auth mechanisms than the rest of the admin console.

---

<div class="post-metadata">

**Author:** ![JasonStoltz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jasonstoltz/32/49893_2.png) [@JasonStoltz](https://discuss.elastic.co/u/JasonStoltz)\
**Post date:** [April 15, 2021, 11:58am UTC](https://discuss.elastic.co/t/documents-and-reference-ui-sections-not-populated/269910/6 "2021-04-15T11:58:45Z")

</div>

> [@mack](#):
>
> The logs on the actual server aren't much help either as they do not seem to be showing any exceptions thrown when attempting to load the Reference UI preview

Correct, I think if you're seeing ERR\_CONNECTION\_REFUSED then the browser was completely unable to contact the server so nothing would be logged.

Does it have something to do with the network request going to `http://localhost:3002`? Are you accessing the Admin UI at `http://localhost:3002`?

---

<div class="post-metadata">

**Author:** ![mack](https://avatars.discourse-cdn.com/v4/letter/m/b19c9b/32.png) [@mack](https://discuss.elastic.co/u/mack)\
**Post date:** [April 15, 2021, 3:19pm UTC](https://discuss.elastic.co/t/documents-and-reference-ui-sections-not-populated/269910/7 "2021-04-15T15:19:18Z")

</div>

I'm accessing the Admin UI on [http://x.x.x.x:3002](http://x.x.x.x:3002) where x.x.x.x is the public IP of the server where AppSearch is installed and running.

I thought it might have something to do with the fact that the request was going there and since i was not on localhost there may be an issue, but i assumed that there would be some redirect ☹

Is there something i need to do in the config file to force the redirect or am i missing something else?

Thanks

---

<div class="post-metadata">

**Author:** ![JasonStoltz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jasonstoltz/32/49893_2.png) [@JasonStoltz](https://discuss.elastic.co/u/JasonStoltz)\
**Post date:** [April 15, 2021, 3:41pm UTC](https://discuss.elastic.co/t/documents-and-reference-ui-sections-not-populated/269910/8 "2021-04-15T15:41:01Z")

</div>

You might need to set this in `ent_search.external_url`: [Configuration | Elastic Enterprise Search Documentation [7.12] | Elastic](https://www.elastic.co/guide/en/enterprise-search/current/configuration.html). The default it `http://localhost:3002` it looks like, so changing it to `http://x.x.x.x:3002 ` may do the trick.

---

<div class="post-metadata">

**Author:** ![mack](https://avatars.discourse-cdn.com/v4/letter/m/b19c9b/32.png) [@mack](https://discuss.elastic.co/u/mack)\
**Post date:** [April 16, 2021, 3:20pm UTC](https://discuss.elastic.co/t/documents-and-reference-ui-sections-not-populated/269910/9 "2021-04-16T15:20:10Z")

</div>

That did the trick. Thanks so much for your help with this @JasonStoltz  
Much appreciated 🙂

Now to work on implementing the UI on our site.

---

<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:** [May 14, 2021, 3:20pm UTC](https://discuss.elastic.co/t/documents-and-reference-ui-sections-not-populated/269910/10 "2021-05-14T15:20:47Z")

</div>

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