Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't connect to elasticsearch #170

Closed
kagashe opened this issue Mar 9, 2018 · 33 comments
Closed

Can't connect to elasticsearch #170

kagashe opened this issue Mar 9, 2018 · 33 comments

Comments

@kagashe
Copy link

kagashe commented Mar 9, 2018

Have installed via Docker
Can't connect to elasticsearch instance
My elasticsearch installation is on a separate machine. when logging in, loading screen just loops.

@siddharthlatest
Copy link
Member

@kagashe Have you followed the recommended config settings on Elasticsearch? Can you please describe enough info to replicate this behavior:

  1. What is the version of dejavu you are using?
  2. What is the CORS setting?
  3. Do you see any console errors? If yes, a screenshot of the error would help.

@kagashe
Copy link
Author

kagashe commented Mar 9, 2018

Using the latest version of dejavu that comes with docker.

Added the following lines to my elasticsearch.yml

http.cors.allow-origin: "http://localhost:1358"
http.cors.enabled: true
http.cors.allow-headers : X-Requested-With,X-Auth-Token,Content-Type,Content-Length,Authorization
http.cors.allow-credentials: true

where can I check for errors?

@siddharthlatest
Copy link
Member

@kagashe Thanks, that is helpful. Your config is good, what exact URL are you running dejavu on? You would check errors from the browser console (like Google Chrome) where you are running dejavu on http://localhost:1358.

@kagashe
Copy link
Author

kagashe commented Mar 9, 2018

This seems to be the error?

Failed to load http://elk/printlogs/_mapping?: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://elk:1358' is therefore not allowed access. The response had HTTP status code 401.

@siddharthlatest
Copy link
Member

@kagashe Change your config to allow access to where you are using dejavu. It would be:

http.cors.allow-origin: "http://elk:1358"

Enjoy!

@kagashe
Copy link
Author

kagashe commented Mar 9, 2018

Seem to be getting the same error?

@siddharthlatest
Copy link
Member

Did you change your Elasticsearch config file and redeploy the cluster?

@kagashe
Copy link
Author

kagashe commented Mar 10, 2018

Yes, changed the config and restarted the elasticsearch service.

@siddharthlatest
Copy link
Member

@kagashe can you tell me what the browser error looks like now?

@kagashe
Copy link
Author

kagashe commented Mar 10, 2018

vendor.min.js:11 OPTIONS http://elk/printlogs/_mapping 401 (Unauthorized)
send @ vendor.min.js:11
ajax @ vendor.min.js:11
getMapping @ feed.js:531
setMap @ live.js:1
setTimeout (async)
init_map_stream @ live.js:1
(anonymous) @ live.js:1
setTimeout (async)
connectSync @ live.js:1
(anonymous) @ live.js:1
compressCb @ urlShare.js:32
(anonymous) @ urlShare.js:124
onmessage @ vendor.min.js:17414
12:05:30.236 vendor.min.js:11 OPTIONS http://elk/printlogs/_mapping 401 (Unauthorized)
send @ vendor.min.js:11
ajax @ vendor.min.js:11
getMapping @ feed.js:531
setMap @ live.js:1
setTimeout (async)
init_map_stream @ live.js:1
(anonymous) @ live.js:1
setTimeout (async)
connectSync @ live.js:1
(anonymous) @ live.js:1
compressCb @ urlShare.js:32
(anonymous) @ urlShare.js:124
onmessage @ vendor.min.js:17414
12:05:30.237 :1358/live/#?input_state=XQAAAAI5AAAAAAAAAAA9iIqnY-B2BnTZGEQzY8iyqBUj6gyr4N0bUg3ThGmsN2SOqNPukSPYLifL9FGv0R6ZFfoGF447ifjr___uCAAA:1 Failed to load http://elk/printlogs/_mapping: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://elk:1358' is therefore not allowed access. The response had HTTP status code 401.
12:05:30.238 vendor.min.js:7 OPTIONS http://elk/printlogs/_mapping? 401 (Unauthorized)
(anonymous) @ vendor.min.js:7
t.fetch @ vendor.min.js:7
t @ vendor.min.js:7
value @ vendor.min.js:7
e.default @ vendor.min.js:7
value @ vendor.min.js:7
getTypes @ feed.js:383
getStreamingTypes @ live.js:1
setTimeout (async)
init_map_stream @ live.js:1
(anonymous) @ live.js:1
setTimeout (async)
connectSync @ live.js:1
(anonymous) @ live.js:1
compressCb @ urlShare.js:32
(anonymous) @ urlShare.js:124
onmessage @ vendor.min.js:17414
12:05:30.238 vendor.min.js:7 OPTIONS http://elk/printlogs/_mapping? 401 (Unauthorized)
(anonymous) @ vendor.min.js:7
t.fetch @ vendor.min.js:7
t @ vendor.min.js:7
value @ vendor.min.js:7
e.default @ vendor.min.js:7
value @ vendor.min.js:7
getTypes @ feed.js:383
getStreamingTypes @ live.js:1
setTimeout (async)
init_map_stream @ live.js:1
(anonymous) @ live.js:1
setTimeout (async)
connectSync @ live.js:1
(anonymous) @ live.js:1
compressCb @ urlShare.js:32
(anonymous) @ urlShare.js:124
onmessage @ vendor.min.js:17414
12:05:30.239 :1358/live/#?input_state=XQAAAAI5AAAAAAAAAAA9iIqnY-B2BnTZGEQzY8iyqBUj6gyr4N0bUg3ThGmsN2SOqNPukSPYLifL9FGv0R6ZFfoGF447ifjr___uCAAA:1 Failed to load http://elk/printlogs/_mapping?: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://elk:1358' is therefore not allowed access. The response had HTTP status code 401.
12:05:30.239 feed.js:407 TypeError: Network request failed
at XMLHttpRequest.o.onerror (vendor.min.js:7)
12:05:30.240 feed.js:409 error in retrieving types: TypeError: Network request failed
at XMLHttpRequest.o.onerror (vendor.min.js:7)

@kagashe
Copy link
Author

kagashe commented Mar 12, 2018

Any Ideas?

@siddharthlatest
Copy link
Member

@kagashe The logs still point to Dejavu hosted domain not being whitelisted in the Elasticsearch's config. There are some things to check on:

  1. Are the configs really being passed correctly to Elasticsearch? For example, if you are running Elasticsearch via Docker, depending on the image you use -- these configs need to be passed in different ways.

  2. If you have a flexibility on running Elasticsearch via Docker, we have the example commands that work with both Docker and Docker compose - https://hub.docker.com/r/appbaseio/dejavu/.

@kagashe
Copy link
Author

kagashe commented Mar 12, 2018

My ELK stack isn't running in docker it's installed direct into ubuntu

@siddharthlatest
Copy link
Member

siddharthlatest commented Mar 12, 2018

Can you try with

http.cors.allow-origin: "/.*/"

@kagashe
Copy link
Author

kagashe commented Mar 12, 2018

if I add http.cors.allow-origin="/./" the service doesn't start.
if I add http.cors.allow-origin: "/.
/" the service starts but still get error.

@siddharthlatest
Copy link
Member

siddharthlatest commented Mar 12, 2018

Can you try with * included?

http.cors.allow-origin: "*"

* is the important character here, which allows wildcard domains to connect to your ES cluster.

Reference: elastic/elasticsearch#9031 (comment).

@kagashe
Copy link
Author

kagashe commented Mar 12, 2018

vendor.min.js:7 OPTIONS http://elk/printlogs/_mapping? 401 (Unauthorized)
(anonymous) @ vendor.min.js:7
t.fetch @ vendor.min.js:7
t @ vendor.min.js:7
value @ vendor.min.js:7
e.default @ vendor.min.js:7
value @ vendor.min.js:7
getTypes @ feed.js:383
getStreamingTypes @ live.js:1
setTimeout (async)
init_map_stream @ live.js:1
(anonymous) @ live.js:1
setTimeout (async)
connectSync @ live.js:1
(anonymous) @ live.js:1
compressCb @ urlShare.js:32
(anonymous) @ urlShare.js:124
onmessage @ vendor.min.js:17414
12:34:46.539 vendor.min.js:7 OPTIONS http://elk/printlogs/_mapping? 401 (Unauthorized)
(anonymous) @ vendor.min.js:7
t.fetch @ vendor.min.js:7
t @ vendor.min.js:7
value @ vendor.min.js:7
e.default @ vendor.min.js:7
value @ vendor.min.js:7
getTypes @ feed.js:383
getStreamingTypes @ live.js:1
setTimeout (async)
init_map_stream @ live.js:1
(anonymous) @ live.js:1
setTimeout (async)
connectSync @ live.js:1
(anonymous) @ live.js:1
compressCb @ urlShare.js:32
(anonymous) @ urlShare.js:124
onmessage @ vendor.min.js:17414
12:34:46.539 :1358/live/#?input_state=XQAAAAI5AAAAAAAAAAA9iIqnY-B2BnTZGEQzY8iyqBUj6gyrm0P3gMtNg498D0h29oVxP6I2Nx1YskGirhhTCpSbPbab5aIUImv_-_AwAA:1 Failed to load http://elk/printlogs/_mapping?: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://elk:1358' is therefore not allowed access. The response had HTTP status code 401.
12:34:46.540 feed.js:407 TypeError: Network request failed
at XMLHttpRequest.o.onerror (vendor.min.js:7)
12:34:46.542 feed.js:409 error in retrieving types: TypeError: Network request failed
at XMLHttpRequest.o.onerror (vendor.min.js:7)

@kagashe
Copy link
Author

kagashe commented Mar 12, 2018

curl -H "User-Agent: Mozilla" -H "Origin: 192.168.1.53" -i localhost:9200
HTTP/1.1 200 OK
access-control-allow-origin: *
access-control-allow-credentials: true
content-type: application/json; charset=UTF-8
content-length: 435

{
"name" : "UI5Ovdp",
"cluster_name" : "elasticsearch",
"cluster_uuid" : "5Eni5GfmTUyP5jIBy8JDRg",
"version" : {
"number" : "6.2.2",
"build_hash" : "10b1edd",
"build_date" : "2018-02-16T19:01:30.685723Z",
"build_snapshot" : false,
"lucene_version" : "7.2.1",
"minimum_wire_compatibility_version" : "5.6.0",
"minimum_index_compatibility_version" : "5.0.0"
},
"tagline" : "You Know, for Search"

@siddharthlatest
Copy link
Member

@kagashe I tried by downloading the latest Elasticsearch 6.2.2 and these are the settings that work:

http.cors.allow-origin: "*"
http.cors.enabled: true
http.cors.allow-headers : X-Requested-With,X-Auth-Token,Content-Type,Content-Length,Authorization
http.cors.allow-credentials: true

GETing / returns

{
  "name" : "n7ujqcj",
  "cluster_name" : "elasticsearch",
  "cluster_uuid" : "AIforh3dSPuWHOUqrgci9g",
  "version" : {
    "number" : "6.2.2",
    "build_hash" : "10b1edd",
    "build_date" : "2018-02-16T19:01:30.685723Z",
    "build_snapshot" : false,
    "lucene_version" : "7.2.1",
    "minimum_wire_compatibility_version" : "5.6.0",
    "minimum_index_compatibility_version" : "5.0.0"
  },
  "tagline" : "You Know, for Search"
}

And a screenshot from dejavu on how I am connecting it:

Note: Here, testindex already exists. It's important for the index to already exist before connecting.

@kagashe
Copy link
Author

kagashe commented Mar 12, 2018

vendor.min.js:7 OPTIONS http://elk:9200/printlogs//_search?from=0&size=0 net::ERR_CONNECTION_REFUSED
(anonymous) @ vendor.min.js:7
t.fetch @ vendor.min.js:7
t @ vendor.min.js:7
value @ vendor.min.js:7
e.default @ vendor.min.js:7
value @ vendor.min.js:7
getTotalRecord @ feed.js:673
getTotalRecord @ live.js:1
afterConnect @ live.js:1
connectSync @ live.js:1
(anonymous) @ live.js:1
compressCb @ urlShare.js:32
(anonymous) @ urlShare.js:124
onmessage @ vendor.min.js:17414
13:45:24.526 vendor.min.js:11 OPTIONS http://elk:9200/printlogs/_settings net::ERR_CONNECTION_REFUSED
send @ vendor.min.js:11
ajax @ vendor.min.js:11
getSettings @ feed.js:544
reloadSettings @ live.js:1
afterConnect @ live.js:1
connectSync @ live.js:1
(anonymous) @ live.js:1
compressCb @ urlShare.js:32
(anonymous) @ urlShare.js:124
onmessage @ vendor.min.js:17414
13:45:24.528 live.js:1 Unable to fetch settings
(anonymous) @ live.js:1
j @ vendor.min.js:9
fireWith @ vendor.min.js:9
x @ vendor.min.js:11
(anonymous) @ vendor.min.js:11
XMLHttpRequest.send (async)
send @ vendor.min.js:11
ajax @ vendor.min.js:11
getSettings @ feed.js:544
reloadSettings @ live.js:1
afterConnect @ live.js:1
connectSync @ live.js:1
(anonymous) @ live.js:1
compressCb @ urlShare.js:32
(anonymous) @ urlShare.js:124
onmessage @ vendor.min.js:17414
13:45:24.530 vendor.min.js:11 OPTIONS http://192.168.1.8:9200/ net::ERR_CONNECTION_REFUSED
send @ vendor.min.js:11
ajax @ vendor.min.js:11
beforeInit @ feed.js:125
connectSync @ live.js:1
(anonymous) @ live.js:1
compressCb @ urlShare.js:32
(anonymous) @ urlShare.js:124
onmessage @ vendor.min.js:17414
13:45:24.531 feed.js:142 Unable to fetch elasticsearch version
error @ feed.js:142
j @ vendor.min.js:9
fireWith @ vendor.min.js:9
x @ vendor.min.js:11
(anonymous) @ vendor.min.js:11
XMLHttpRequest.send (async)
send @ vendor.min.js:11
ajax @ vendor.min.js:11
beforeInit @ feed.js:125
connectSync @ live.js:1
(anonymous) @ live.js:1
compressCb @ urlShare.js:32
(anonymous) @ urlShare.js:124
onmessage @ vendor.min.js:17414
13:45:24.536 vendor.min.js:7 Uncaught (in promise) TypeError: Network request failed
at XMLHttpRequest.o.onerror (vendor.min.js:7)
o.onerror @ vendor.min.js:7
Promise.catch (async)
t @ vendor.min.js:7
value @ vendor.min.js:7
e.default @ vendor.min.js:7
value @ vendor.min.js:7
getTotalRecord @ feed.js:673
getTotalRecord @ live.js:1
afterConnect @ live.js:1
connectSync @ live.js:1
(anonymous) @ live.js:1
compressCb @ urlShare.js:32
(anonymous) @ urlShare.js:124
onmessage @ vendor.min.js:17414
13:45:24.773 vendor.min.js:7 OPTIONS http://192.168.1.8:9200/printlogs//_search?from=0&size=0 net::ERR_CONNECTION_REFUSED
(anonymous) @ vendor.min.js:7
t.fetch @ vendor.min.js:7
t @ vendor.min.js:7
value @ vendor.min.js:7
e.default @ vendor.min.js:7
value @ vendor.min.js:7
getTotalRecord @ feed.js:673
getTotalRecord @ live.js:1
init_map_stream @ live.js:1
(anonymous) @ live.js:1
setTimeout (async)
connectSync @ live.js:1
(anonymous) @ live.js:1
compressCb @ urlShare.js:32
(anonymous) @ urlShare.js:124
onmessage @ vendor.min.js:17414
13:45:24.776 vendor.min.js:7 Uncaught (in promise) TypeError: Network request failed
at XMLHttpRequest.o.onerror (vendor.min.js:7)
o.onerror @ vendor.min.js:7
Promise.catch (async)
t @ vendor.min.js:7
value @ vendor.min.js:7
e.default @ vendor.min.js:7
value @ vendor.min.js:7
getTotalRecord @ feed.js:673
getTotalRecord @ live.js:1
init_map_stream @ live.js:1
(anonymous) @ live.js:1
setTimeout (async)
connectSync @ live.js:1
(anonymous) @ live.js:1
compressCb @ urlShare.js:32
(anonymous) @ urlShare.js:124
onmessage @ vendor.min.js:17414
13:45:26.508 vendor.min.js:11 OPTIONS http://192.168.1.8:9200/printlogs/_mapping net::ERR_CONNECTION_REFUSED
send @ vendor.min.js:11
ajax @ vendor.min.js:11
getMapping @ feed.js:531
setMap @ live.js:1
setTimeout (async)
afterConnect @ live.js:1
connectSync @ live.js:1
(anonymous) @ live.js:1
compressCb @ urlShare.js:32
(anonymous) @ urlShare.js:124
onmessage @ vendor.min.js:17414
13:45:26.509 vendor.min.js:7 OPTIONS http://192.168.1.8:9200/printlogs/_mapping? net::ERR_CONNECTION_REFUSED
(anonymous) @ vendor.min.js:7
t.fetch @ vendor.min.js:7
t @ vendor.min.js:7
value @ vendor.min.js:7
e.default @ vendor.min.js:7
value @ vendor.min.js:7
getTypes @ feed.js:383
getStreamingTypes @ live.js:1
setTimeout (async)
afterConnect @ live.js:1
connectSync @ live.js:1
(anonymous) @ live.js:1
compressCb @ urlShare.js:32
(anonymous) @ urlShare.js:124
onmessage @ vendor.min.js:17414
13:45:26.510 feed.js:407 TypeError: Network request failed
at XMLHttpRequest.o.onerror (vendor.min.js:7)
13:45:26.511 feed.js:409 error in retrieving types: TypeError: Network request failed
at XMLHttpRequest.o.onerror (vendor.min.js:7)
13:45:26.759 vendor.min.js:11 OPTIONS http://192.168.1.8:9200/printlogs/_mapping net::ERR_CONNECTION_REFUSED
send @ vendor.min.js:11
ajax @ vendor.min.js:11
getMapping @ feed.js:531
setMap @ live.js:1
setTimeout (async)
init_map_stream @ live.js:1
(anonymous) @ live.js:1
setTimeout (async)
connectSync @ live.js:1
(anonymous) @ live.js:1
compressCb @ urlShare.js:32
(anonymous) @ urlShare.js:124
onmessage @ vendor.min.js:17414
13:45:27.038 vendor.min.js:7 OPTIONS http://192.168.1.8:9200/printlogs/_mapping? net::ERR_CONNECTION_REFUSED
(anonymous) @ vendor.min.js:7
t.fetch @ vendor.min.js:7
t @ vendor.min.js:7
value @ vendor.min.js:7
e.default @ vendor.min.js:7
value @ vendor.min.js:7
getTypes @ feed.js:383
getStreamingTypes @ live.js:1
setTimeout (async)
init_map_stream @ live.js:1
(anonymous) @ live.js:1
setTimeout (async)
connectSync @ live.js:1
(anonymous) @ live.js:1
compressCb @ urlShare.js:32
(anonymous) @ urlShare.js:124
onmessage @ vendor.min.js:17414
13:45:27.043 feed.js:407 TypeError: Network request failed
at XMLHttpRequest.o.onerror (vendor.min.js:7)
13:45:27.046 feed.js:409 error in retrieving types: TypeError: Network request failed
at XMLHttpRequest.o.onerror (vendor.min.js:7)

@siddharthlatest
Copy link
Member

What does your entire elasticsearch.yml config file look like? Have you made any changes from the default configs?

@kagashe
Copy link
Author

kagashe commented Mar 12, 2018

`# ======================== Elasticsearch Configuration =========================

NOTE: Elasticsearch comes with reasonable defaults for most settings.

Before you set out to tweak and tune the configuration, make sure you

understand what are you trying to accomplish and the consequences.

The primary way of configuring a node is via this file. This template lists

the most important settings you may want to configure for a production cluster.

Please consult the documentation for further information on configuration options:

https://www.elastic.co/guide/en/elasticsearch/reference/index.html

---------------------------------- Cluster -----------------------------------

Use a descriptive name for your cluster:

#cluster.name: my-application

------------------------------------ Node ------------------------------------

Use a descriptive name for the node:

#node.name: node-1

Add custom attributes to the node:

#node.attr.rack: r1

----------------------------------- Paths ------------------------------------

Path to directory where to store the data (separate multiple locations by comma):

path.data: /var/lib/elasticsearch

Path to log files:

path.logs: /var/log/elasticsearch

----------------------------------- Memory -----------------------------------

Lock the memory on startup:

bootstrap.memory_lock: true

Make sure that the heap size is set to about half the memory available

on the system and that the owner of the process is allowed to use this

limit.

Elasticsearch performs poorly when the system is swapping the memory.

---------------------------------- Network -----------------------------------

Set the bind address to a specific IP (IPv4 or IPv6):

network.host: localhost

Set a custom port for HTTP:

http.port: 9200
http.cors.allow-origin: "*"
http.cors.enabled: true
http.cors.allow-headers : X-Requested-With,X-Auth-Token,Content-Type,Content-Length,Authorization
http.cors.allow-credentials: true

For more information, consult the network module documentation.

--------------------------------- Discovery ----------------------------------

Pass an initial list of hosts to perform discovery when new node is started:

The default list of hosts is ["127.0.0.1", "[::1]"]

#discovery.zen.ping.unicast.hosts: ["host1", "host2"]

Prevent the "split brain" by configuring the majority of nodes (total number of master-eligible nodes / 2 + 1):

#discovery.zen.minimum_master_nodes:

For more information, consult the zen discovery module documentation.

---------------------------------- Gateway -----------------------------------

Block initial recovery after a full cluster restart until N nodes are started:

#gateway.recover_after_nodes: 3

For more information, consult the gateway module documentation.

---------------------------------- Various -----------------------------------

Require explicit names when deleting indices:

#action.destructive_requires_name: true

`

@siddharthlatest
Copy link
Member

@kagashe This looks fine. Your Elasticsearch should let Dejavu connect with it. Another thing I am wondering is if you have any other IP Tables / Network config that might be blocking CORS by default?

@kagashe
Copy link
Author

kagashe commented Mar 12, 2018

There isn't as far as I can see, have disabled firewall on my laptop and the elastic-search server just to test and still can't connect...

@kagashe
Copy link
Author

kagashe commented Mar 15, 2018

my elk stack is running behind an nginx setup, would that affect anything?

@siddharthlatest
Copy link
Member

siddharthlatest commented Mar 15, 2018

That may, if your nginx config doesn't support CORS.

One easy way to debug this is going in steps: If you run a raw ES cluster and connect it with dejavu, can you do that?

If yes, then the problem simplifies to figuring out the right nginx settings.

If no, we can help you with that and that would also be easier for us to replicate.

@siddharthlatest
Copy link
Member

@kagashe did the above help? Any other updates?

@al-serebrov
Copy link

Hey @siddharthlatest
I have exactly the same problem and tried all steps that you suggested, but I still have the same error as @kagashe
My ElasticSearch is behind nginx. Could you please help to figure out correct settings for it?
now it looks like:

server {
     listen XXXX;

      server_name my_app.cloud.com;
      location / {
         auth_basic           "AuthName";
         auth_basic_user_file admin_users;
         proxy_pass http://127.0.0.1:YYYY;
      }
     }

@al-serebrov
Copy link

al-serebrov commented Mar 22, 2018

I figured it out, now it works:

server {
      listen XXXX;

       server_name my_app.cloud.com;
       location / {
          auth_basic           "AuthName";
          auth_basic_user_file admin_users;
          proxy_pass http://127.0.0.1:YYYY;
          if ($request_method = OPTIONS) {
            add_header Access-Control-Allow-Origin "dejavu_app.tld:port";
            add_header Access-Control-Allow-Methods "GET, OPTIONS";
            add_header Access-Control-Allow-Headers "Authorization, content-type";
            add_header Access-Control-Allow-Credentials "true";
            add_header Content-Length 0;
            add_header Content-Type text/plain;
            return 200;
        }
       }
     }

@siddharthlatest
Copy link
Member

@al-serebrov Awesome! I was just going to link to a similar doc - https://enable-cors.org/server_nginx.html.

@kagashe I believe the above should work.

@robertalers
Copy link

I hope you can help me: I get the same error, and since I use a docker i have have no nginx/apache?
Strange thing is: the 'data browser' can connect with no issues, only connecting with the 'search preview' generates this error..
Please help!

@robertalers
Copy link

Stupid! turning off the toggle: record analytics did the job: it works now :-)

@ssp5zone
Copy link

ssp5zone commented Nov 2, 2022

Cors BYpass

In case you do not have access to update the remote Elastic Cluster repo,

  1. Docker install Cors Proxy or other alternatives: https://hub.docker.com/r/redocly/cors-anywhere
  2. Start the Docker Service at a port - say: 5050
  3. Prefix your Elastic Node URL with http://localhost:5050/

Before
image

After
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants