Skip to main content
Version: v2.10.0

Troubleshooting

Common failure modes during and after Yeedu CFT deployment, with diagnosis steps and fixes.


Lambda Timeout / Stack Rollback​

Symptom: Stack rolls back at YeeduSetupLambdaInvoke with status CREATE_FAILED. CloudFormation events show:

Custom Resource failed to stabilize in expected time

or

Received FAILED signal with UniqueId ...

Diagnosis:

# Tail Lambda logs (replace yeedu-prod with your stack name)
aws logs tail /aws/lambda/yeedu-prod-yeedu-setup --since 2h --follow

Common causes and fixes:

CauseFix
s3:GetObject denied on yeedu-softwaresVerify the Lambda execution role has s3:GetObject on arn:aws:s3:::yeedu-softwares/releases/*. Check for SCP denials in your AWS Organization.
Target S3 bucket access deniedLambda validates bucket access first (head_bucket). Verify the bucket exists and Lambda role has s3:ListBucket on it.
ECR CreateRepository deniedLambda role must have ecr:CreateRepository on arn:aws:ecr:<region>:<account>:repository/yeedu_*.
Core-Services-Formation.tar.gz not found in yeedu-softwaresThe iYeeduVersion value may not exist in the Yeedu S3 bucket. Contact Yeedu support to confirm the version string.
Lambda timeout (900s exceeded)The S3 object being copied may exceed Lambda's network throughput capacity. This is rare for artifact files — contact Yeedu support.

EC2 UserData Failure​

Symptom: EC2 creation fails with:

WaitCondition received a failure signal with UniqueId ...

or the CreationPolicy timeout (60 min) expires.

Diagnosis:

The bootstrap log is streamed to CloudWatch automatically. Check it first:

# Get EC2 instance ID
INSTANCE_ID=$(aws cloudformation describe-stack-resources \
--stack-name yeedu-prod \
--query "StackResources[?LogicalResourceId=='EC2Instance'].PhysicalResourceId" \
--output text)

# Tail the bootstrap log
aws logs tail yeedu_userdata_logs \
--log-stream-name $INSTANCE_ID \
--since 2h --follow

Alternatively, if the instance is still running, SSM in:

aws ssm start-session --target $INSTANCE_ID
sudo tail -f /var/log/bootstrap.log

Common causes and fixes:

Symptom in logCauseFix
mount: Connection timed outEFS mount failureVerify EFS SG allows TCP 2049 from EC2 SG. Check EFS mount targets exist in correct subnets.
AccessDeniedException on GetSecretValueSecrets Manager access deniedEC2 IAM role is scoped to yeedu* secrets. Verify stack name matches (secrets are named <stack-name>-...).
ERROR: Core-Services-Formation.tar.gz not foundS3 artifact missingLambda should have copied it. Check Lambda logs to confirm prepare_yeedu_software completed. Verify s3://<bucket>/yeedu/Core-Services-Formation.tar.gz exists.
ERROR: cfn-signal not found in PATHcfn-bootstrap install failedCheck apt-get and python3 setup.py install output earlier in the log. May be a transient apt mirror issue — try redeploying.
Cannot connect to Docker daemonDocker not startedCheck systemctl status docker on the instance. docker.io install may have failed.
Docker image docker load failsLarge .tar file, disk fullEC2 has 200 GB root volume. Check df -h. Also verify all .tar files downloaded correctly from S3.
yeedu-core-services.sh not foundExtraction failedCheck that tar -xzf Core-Services-Formation.tar.gz completed without errors.

ALB 502 Bad Gateway​

Symptom: Navigating to the Yeedu UI (https://<alb>:8012 or http://<alb>:8002) returns 502 Bad Gateway.

Diagnosis steps:

  1. Check target health:

    TG_ARN=$(aws cloudformation describe-stack-resources \
    --stack-name yeedu-prod \
    --query "StackResources[?LogicalResourceId=='TargetGroupUI'].PhysicalResourceId" \
    --output text)

    aws elbv2 describe-target-health --target-group-arn $TG_ARN
  2. Check containers on EC2:

    aws ssm start-session --target <EC2InstanceId>
    sudo docker ps

Common causes and fixes:

CauseFix
Services still starting (first boot)Docker images are large. Allow 10–15 minutes after EC2 becomes healthy for all containers to start.
EC2 security group not allowing ALBConfirm EC2 SG has inbound TCP from ALBSecurityGroup on ports 8002, 8080, and 8081.
Wrong target group portUI target group forwards to EC2 port 8002 (not 80). Verify the target group configuration.
Nginx/UI container not runningCheck sudo docker logs <ui_container_name> --tail 50

Docker Image Push Failures (EC2 UserData)​

Symptom: Bootstrap log shows errors during the docker push phase.

# Check ECR push errors in bootstrap log
grep -i "error\|failed\|denied" /var/log/bootstrap.log | grep -i ecr

Common causes and fixes:

CauseFix
ECR login expiredThe ECR auth token is valid for 12 hours. If UserData runs longer than 12 hours (unusual), re-login: aws ecr get-login-password | docker login ...
Repository doesn't existLambda should have created all 17 repos. Check Lambda logs. If missing, create manually: aws ecr create-repository --repository-name yeedu_<name>
Disk full during docker loadEC2 has 200 GB. Run df -h and docker system df. Prune unused images: docker image prune -f
denied: User is not authorizedEC2 IAM role ECR permissions are scoped to arn:aws:ecr:<region>:<account>:repository/yeedu*. All Yeedu repo names start with yeedu_ — verify no typo in image name.

RDS Connection Failures​

Symptom: Yeedu services start but show database errors, or yeedu-connection.properties shows wrong endpoint.

Diagnosis:

# Test from EC2 directly
source /etc/yeedu-env
psql -h $YEEDU_RDS_ENDPOINT -p $YEEDU_RDS_PORT -U yeedu -d yeedu -c "SELECT 1"

Common causes and fixes:

CauseFix
fRDSEngineVersion not available in regionFind available versions and update. See command below.
RDS not in ServiceSecurityGroupVerify in the RDS console that the instance uses <stack-name>-service-sg.
EC2 not in ServiceSecurityGroupEC2 must be in both EC2SecurityGroup and ServiceSecurityGroup. Check attached SGs in EC2 console.
Wrong RDS secret valuesThe YeeduRdsSecret is populated with YeeduDb.Endpoint.Address at deploy time. Check current values: aws secretsmanager get-secret-value --secret-id yeedu-prod-prod-rds-secret
# Find available PostgreSQL 15.x versions in your region
aws rds describe-db-engine-versions \
--engine postgres \
--query "DBEngineVersions[?starts_with(EngineVersion,'15')].EngineVersion" \
--output table

Security Group Quick Reference​

ALB Security Group — inbound from internet​

PortProtocolSourcePurpose
8012TCP0.0.0.0/0HTTPS — Yeedu UI (SSL termination at ALB)
8002TCP0.0.0.0/0HTTP — Yeedu UI (non-SSL or EC2 target)
8080TCP0.0.0.0/0REST API
8081TCP0.0.0.0/0Functions Proxy

EC2 Security Group — inbound from ALB and YeeduInternal SG​

PortProtocolSourcePurpose
8002TCPALB SGYeedu UI
8080TCPALB SGREST API
8081TCPALB SGFunctions Proxy
8888–9088TCPYeeduInternal SGJupyter workspace ports
8003TCPYeeduInternal SGRabbitMQ management UI
8004TCPYeeduInternal SGRedis
8005TCPYeeduInternal SGRabbitMQ AMQP
8006TCPYeeduInternal SGPostgreSQL
8007TCPYeeduInternal SGSpark History Server
8008TCPYeeduInternal SGGrafana
8086TCPYeeduInternal SGInfluxDB
8009TCPYeeduInternal SGLDAP
8010TCPYeeduInternal SGYeedu UI (internal)
8200TCPYeeduInternal SGHashiCorp Vault API
8011TCPYeeduInternal SGFunctions service
8765TCPYeeduInternal SGProxy cacher
22TCP0.0.0.0/0SSH — restrict to your CIDR in production

EFS Security Group — inbound NFS​

PortProtocolSourcePurpose
2049TCPEC2 SGNFS from main Yeedu EC2
2049TCPYeeduInternal SGNFS from Spark worker EC2s