calcom / cal.com

Scheduling infrastructure for absolutely everyone.
https://cal.com
Other
31.4k stars 7.59k forks source link

API Error : Failed to proxy http://localhost:5555/api/v2/me Error: connect ECONNREFUSED 127.0.0.1:5555 #16590

Open SanjuMLGeek opened 1 week ago

SanjuMLGeek commented 1 week ago

Found a bug? Please fill out the sections below. šŸ‘

Issue Summary

I am deploying the cal.com docker container on AWS ECS Fargate using instructions here

The cal.com web application runs fine but when I see the logs, I find below error

@calcom/web:start: Failed to proxy http://localhost:5555/api/v2/me Error: connect ECONNREFUSED 127.0.0.1:5555

Steps to Reproduce

  1. Set .env variable to provide public DNS and container name as below

NEXT_PUBLIC_WEBAPP_URL=https://cal.example.com NEXT_PUBLIC_API_V2_URL=http://calcom:5555/api/v2 (Note that calcom is the name of container in ECS task definition. I tried http://cal.example.com/api/v2 as well) NEXTAUTH_URL=https://cal.example.com/api/auth

  1. Go to ECS Service Logs and search for 5555

All front-end operations are working fine but if I want to use API for testing, I am wondering what should be the configuration? It seems the API is not running on 5555 port becuase I don't see any statement in docker file exposing 5555 port.

Actual Results

"Internal Server Error" while accessing "http://cal.example.com/api/v2" from postman or culr

Expected Results

Postman or Curl command should be able to run GET and POST successfully

Evidence

image
mikeyjoel commented 4 days ago

Was looking into this myself as well.

Prisma Studio uses port 5555 to manage the PostgreSQL database. Inside the docker-compose.yml file, you will find three services: calcom webserver, PostgreSQL and Prisma Studio. Note* I usually eliminate or comment out Prisma Studio since I use pgadmin to manage the database.

Questions:

I assume that v1 and v2 are running from inside the Calcom webserver service and not the Prisma Studio service.