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

Response: Status: nil Content-Type: nil (nil bytes) #84

Open
gitsly opened this issue Sep 26, 2022 · 1 comment
Open

Response: Status: nil Content-Type: nil (nil bytes) #84

gitsly opened this issue Sep 26, 2022 · 1 comment

Comments

@gitsly
Copy link

gitsly commented Sep 26, 2022

Hi, I'm trying to get basic GET request working but no matter what, I seem to get

Running: es-execute-request-dwim (C-c C-c)

Issuing GET against https://elastic:password@localhost:9200/_cluster/health
REQUEST [error] Error (error) while connecting to https://elastic:password@localhost:9200/_cluster/health.
Response: Status: nil Content-Type: nil (nil bytes)

(note: password above is naturally the real password).

For installation of the ELK stack I've followed the guide here:
https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html

Possibly worth mentioning is that I run emacs under windows, and I can get the JSON as successful response from 'curl' on the cmd.exe line:

curl https://elastic:password@localhost:9200/_cluster/health

Warning: C:\users\xxx.curlrc:2: warning: 'compressed' the
Warning: installed libcurl version doesn't support this
{"cluster_name":"elk1-cluster","status":"green","timed_out":false,"number_of_nodes":3,"number_of_data_nodes":3,"active_primary_shards":13,"active_shards":26,"relocating_shards":0,"initializing_shards":0,"unassigned_shards":0,"delayed_unassigned_shards":0,"number_of_pending_tasks":0,"number_of_in_flight_fetch":0,"task_max_waiting_in_queue_millis":0,"active_shards_percent_as_number":100.0}

@dakrone
Copy link
Owner

dakrone commented Sep 26, 2022

Hey Gitsly, when you're executing things from es-mode, what does your es-mode file look like? Does it look like:

GET /_cluster/health

? If so, are you adding the password using the es-default-headers parameter?

For example, I used the following to send basic-auth for my testing:

// local variables:
// es-default-url: "http://localhost:9200"
// eval: (add-to-list 'es-default-headers '("Authorization" . "Basic ZWxhc3RpYzpwYXNzd29yZA=="))
// END:

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

2 participants