Gunicorn local server started on Lightsail Ubuntu but not accessible [Error: connect ECONNREFUSED "server ip address":8000]

0

I'm trying to deploy my FastAPI on lightsail AWS which uses ubuntu. I created a directory in /home/ubunutu named say myapp so, /home/ubuntu/myapp Now I create Virtual Environment in the virtual env and install required libraries. After this I start my gunicorn server on local host which is listening at port 8000.

But whenever I access the serverip:8000 it gives error [Error: connect ECONNREFUSED "server ip address":8000].

I didn't create any ".service" files because I want to make sure first if it runs locally but it isn't running when the same runs on Vs-Code and the same API is deployed on Heroku working as-well.

I even tried to create a sample file using a tutorial and followed the same steps which were also given on the tutorial itself but I got the same error.

The :8000 port is free, I made sure of that. Server is returning API calls on other API's even changed some other API's to port 8000 as-well and there it worked perfect.

The firewall is disabled so that is not the problem as-well.

It just isn't working with Gunicorn.

질문됨 일 년 전56회 조회
답변 없음

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠