ECS FARGATE Spot task does not start, previously worked fine

0

I have an ECS Cluster with Fargate Spot capacity provider. I have a single service for phpMyAdmin, which I set the desired task count to 1 when I want to use it, and 0 when I am done. Super frugal. Previously (about 3 weeks ago), it would take about10 seconds to get a public IP and startup, and I would use the new public IP to access the service (via http), login, do SQL stuff etc.

However, now this does not work. I get a 'This site can’t be reached' error, so I don't believe it is Security Groups or NACLs (nothing has changed). The ECS task appears to reach steady state (via cloudtrail), but the website is inaccessible. There is no Stop notification.

I created a new task definition and enabled CloudWatch. All I am seeing in the logs is this:

[mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.57 (Debian) PHP/8.2.16 configured -- resuming normal operations [core:notice] [pid 1] AH00094: Command line: 'apache2 -D FOREGROUND'

Any help appreciated!

gefragt vor 2 Monaten118 Aufrufe
2 Antworten
1

Hello!

Posting the answer for others that may have come across a similar issue. As you have rightly pointed out, to access the website hosted within the ECS container, the security group of the ECS Instance/Fargate Task must allow traffic via the port that is exposed. References: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/security-group-rules-reference.html https://docs.aws.amazon.com/vpc/latest/userguide/vpc-network-acls.html#default-network-acl

profile pictureAWS
beantwortet vor 2 Monaten
0

Ah, it was the security group. <sigh>

beantwortet vor 2 Monaten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen