Reputation: 71
I am trying to run 1 service in AWS ECS where I am getting "essential container in task exited exit code 0" as error .
While checking the logs , i don't see any logs also
Troubleshooting done:
Still only for this 1 service, am getting the same error again and again. While checking for logs also , Am not able to get the logs.
Can anyone suggest what to do here?
The below shows an example of the error .
Upvotes: 3
Views: 15741
Reputation: 11
Glad you found out the issue for your use case. The exit code 0 usually indicates that the container was stopped due to any possible reason which may include the error in the code .As we all know containers are nothing but processes so once the process ends the containers kill themselves.
So if your application is not starting (which is also a kind of process) then the container would kill itself.
Here are some possible reasons:
Upvotes: 0
Reputation: 71
The problem got solved.
Was having issue with environment variables , as it was not loading in docker container.
Hence container got up and drains out
Upvotes: 0