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

"Request parse error: Invalid Header provided" error when trying to create a dump with cURL in a DO droplet #42

Open
CaroFG opened this issue Dec 1, 2022 · 3 comments
Labels
bug Something isn't working needs investigation Needs to take time to understand the issue.

Comments

@CaroFG
Copy link

CaroFG commented Dec 1, 2022

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to DO and create a droplet with the official Meilisearch image
  2. Setup the Meilisearch instance for production with the setup script
  3. Add some documents to Meilisearch:
curl \
  -X POST 'http://{address}/indexes/movies/documents?primaryKey=id' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer MASTER_KEY'  --data-binary @movies.json

Check task has succeeded:
curl 'http://{address}/tasks' -H 'Authorization: Bearer MASTER_KEY'

  1. Send a create a dump request:
curl \
  -X POST 'http://{address}/dumps' \
  -H 'Authorization: Bearer MASTER_KEY'

No response received

  1. Check logs:

[2022-12-01T12:44:00Z ERROR actix_http::h1::dispatcher] stream error: Request parse error: Invalid Header provided

Expected behavior
The request is enqueued and eventually processed. I receive a response with a taskUid

Meilisearch version:
The official Meilisearch image in DO is still using v0.29.0, I installed v0.30.0 manually. The behavior occurs with the 2 versions.

@CaroFG CaroFG changed the title Request parse error: Invalid Header provided when trying to create a dump with cURL "Request parse error: Invalid Header provided" error when trying to create a dump with cURL in a DO droplet Dec 1, 2022
@curquiza curquiza added the bug Something isn't working label Dec 1, 2022
@ManyTheFish
Copy link
Member

After some investigations, I managed to find the source of the issue without having a real fix.

This issue occurs on digitalocean because the meilisearch server is "proxyfied" by an Nginx, if I remove the Nginx and make meilisearch listening on port 80, everything works well.

So the issue seems to come from the Nginx, however, despite my attempts to modify the Nginx configurations, I didn't manage to make them work together.

so I have several questions:

  • why should we have an Nginx proxy on the digital ocean droplet and not directly Meilisearch listening on port 80 and can we remove it?
  • Is someone already had this kind of issue with Nginx? I probably forgot something.

(Poke @alallema who is the maintainer of the https://github.com/meilisearch/meilisearch-digitalocean repository don't hesitate to notify someone else if I'm wrong)

@alallema
Copy link
Contributor

alallema commented Dec 7, 2022

Thanks @ManyTheFish for your inquiry and sorry for the delay.
You are absolutely right this issue is due to Nginx I still don't know why but I think this issue can be transferred to cloud-script.
I will investigated on it

@curquiza curquiza transferred this issue from meilisearch/meilisearch Dec 7, 2022
@alallema alallema added the needs investigation Needs to take time to understand the issue. label Dec 8, 2022
@alallema
Copy link
Contributor

alallema commented May 9, 2023

Transfer of this issue to the cloud-provider project due to its depreciation

@alallema alallema transferred this issue from meilisearch/cloud-scripts May 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs investigation Needs to take time to understand the issue.
Projects
None yet
Development

No branches or pull requests

4 participants