Documents and Reference UI sections not populated

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.


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?

@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.

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.

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.

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?

I'm accessing the Admin UI on 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 :frowning:

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


You might need to set this in ent_search.external_url: Configuration | Elastic Enterprise Search Documentation [7.12] | Elastic. The default it http://localhost:3002 it looks like, so changing it to http://x.x.x.x:3002 may do the trick.

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

Now to work on implementing the UI on our site.

1 Like

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