Moving to support from general: > Hey everyone,...
# support
a
Moving to support from general:
Hey everyone, hoping this is the right place for a random question.
I'm playing with self hosting RudderStack on AWS ECS in a private VPC, with 
RSERVER_BACKEND_CONFIG_CONFIG_FROM_FILE=true
and
RSERVER_BACKEND_CONFIG_CONFIG_JSONPATH=/etc/rudderstack/workspaceConfig.json
. Getting an error on start up: 
Operation timed out
. If anyones got any ideas would be rad 🙂.
I tried turning up the logs to no avail. I don't have internet access from my VPC if that makes a difference.
What's interesting is the only log message I'm getting in my 
rudder-server
 container is the message: 
Operation timed out
. My guess is it is trying to connect to the database and failing (since the db log messages show first when I run it locally).
Srikanth:
Its waiting for postgres and timing out. Ref: https://github.com/rudderlabs/rudder-server/blob/master/build/wait-for#L23-L41
GitHub
rudderlabs/rudder-server
Privacy and Security focused Segment-alternative, in Golang and React - rudderlabs/rudder-server
@billions-terabyte-89990 Just threading the message.
@ambitious-journalist-66344 i have a rudder-server running on a private VPC with very limited outbound gateway, i'm using the hosted config panel.  the server is accessed via private dns using route53 rudder.foo.internal, and since i'm only currently warehousing events to postgres it's all behind www.  Most likely, per usual, it's a security group egress issue. can you send the tail of the startup logs?
[8:40 AM] curl -v [localhost|private ip|dns]:8085/health is an easy sanity check
[8:40 AM] do you have an alb in front it?
I'm guessing right now, even though they're part of the same set of services in my
docker-compose.yml
somehow my
rudder-server
container doesn't have a route to my
db
container. Just swapping ECS
network
modes at the moment to see if that helps.
GET /health
won't work yet as the server isn't starting. (I did try using a postgres RDS, and it's still failing, even tho the underlying ec2 instance the container is running on has a route to the RDS. I could connect with
psql
so I don't think it's SG related.)
b
and you're just talking about rudder-server + postgres:6432 coupled with the compose file right? not db in the context of warehousing
ahh, so db connect failure is basically stalling out backend startup
👍 1
a
and you're just talking about rudder-server + postgres:6432
Yes. (tho I'm using port 5432.)
b
have you done sanity test with db localhost (the default install config)
i know absolutely nothing about ecs, but i'm assuming it's the same nuts and bolts as ec2. I did have trouble setting up my RDS postgres for destination warehouse but i was able to work through it, but that database is a different context than this
do you even use docker-compose/docker or is it some AWS-flavored-derivative
here's mine. transformer, jobs, server all on the same host. All events are warehoused to aurora postgres, i was getting startup failures because new/missing env vars, and making assumptions that IAM ec2 instance roles would just work
also forgot to enable VPC endpoint for s3, so those connections attempts were being dropped at that NAT gateway
a
I'm using docker-compose. I'm using the
ecs-cli
.
Copy code
ecs-cli compose --verbose -f ./rudder-docker.yml --project-name rudder run
Thanks for the note about VPC endpoint - I do need to do that in our VPC 🙂
b
notice how i have my restart-always turned off. I had an oddly similar situation that took me a while to figure out, because the error messages were just symptoms. It was just throwing an exception inside the db dependent container at launch, and was unrelated to db connectivity at all. Something was expecting INSTANCE_ID and threw because of it, so i just added and then it unblocked other issues i actually had
👍 1
a
When running in ECS,
db
doesn't resolve from my
rudder-server
container. Currently figuring how `link`ed containers are supposed to work on ECS. I can see Service Discovery but them seems unnecessary...
Okay - figured it out. I had to add explicitly links between my docker-compose when running on ECS. eg:
Copy code
backend:
    depends_on:
      - db
      - d-transformer
    links: # <----what I needed to add for ECS
      - db
      - d-transformer
    image: rudderlabs/rudder-server:latest
🙌 1