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

internal server error when trying to upload a file. #34

Open
simonprudhomme opened this issue Mar 10, 2024 · 4 comments
Open

internal server error when trying to upload a file. #34

simonprudhomme opened this issue Mar 10, 2024 · 4 comments

Comments

@simonprudhomme
Copy link

Hey,

I just spent a few hours on the YouTube video and tutorial. Great work! However, I need help at this point.

My dev setup:

I clone this repo on my MacOS M1.

Description of the error:

When I try to upload a document, I get an error: internal server error
Here is my request:
curl -X POST -F 'file=@./test.mkv' -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VybmFtZSI6InNpbW9ucHJ1ZGhvbW1lQGdtYWlsLmNvbSIsImV4cCI6MTcxMDE1ODUyNCwiaWF0IjoxNzEwMDcyMTI0LCJhZG1pbiI6dHJ1ZX0.no2pRm__ILHtMKtsWlg1yTxXS5yJllGtAed9HZJgEyo' http://mp3converter.com/upload

I am able to acquire a token.
In the gateway pod logs in k9s I see that the requests for POST /login -> 200 and POST /upload -> 500.
The minikube tunnel is always open, I have all the services running. The queues are define in RabbitMQ Managment.
Also, I reset the gateway service to try to reconnect it to rabbitmq, as explained in the video.

rabbit/manifests/ingress.yaml:
Screenshot 2024-03-10 at 8 13 57 AM

rabbit/manifests/service.yaml:
Screenshot 2024-03-10 at 8 14 28 AM

gateway/server.p
Screenshot 2024-03-10 at 8 16 37 AM
y:

RabbitMQ Management
Screenshot 2024-03-10 at 8 17 20 AM

@simonprudhomme
Copy link
Author

simonprudhomme commented Mar 10, 2024

Could this comment from youtube be related?
I didnt install mongodb at any moment.

Screenshot 2024-03-10 at 8 32 59 AM

I dont see videos and mp3s tables in MongoDB :(
Screenshot 2024-03-10 at 8 42 02 AM

@kantancoding
Copy link
Owner

For the POST /upload -> 500, Check the code in the gateway where that error is thrown. It should tell you the file and line number.

Otherwise internal server error is too general.

@mridul549
Copy link

I just created a cluster on mongodb atlas (cloud), and replaced the connection string, and it worked like a charm.

In a nutshell, just use cloud MongoDB instead of local one to avoid all the hassle.

@Shwejansrv
Copy link

I'm getting the same error as internal server error. How did you solve it?

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

4 participants