question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

If Docker is not installed locally, CDK deploy can fail without a constructive error message (possibly related to Fargate use)

See original GitHub issue

I have been building an app in CDK (lambda, fargate, sqs) with some success. I moved laptops for development, and while I installed CDK, AWS CLI etc etc, I did not install Docker as it did not seem required.

When trying to edit and deploy the app, I received an indistinct error while uploading assets:

> cdk "deploy"
FargateTaskRunnerDemoStack: deploying...
[0%] start: Publishing 0292d7d7c3f136659900411d2bec852eaf37d05f9e4b76cf33eb64270417463a:current
[50%] success: Published 0292d7d7c3f136659900411d2bec852eaf37d05f9e4b76cf33eb64270417463a:current
[50%] start: Publishing f78183504c75718fb00baea6f901199db893eddc04d21e426e8cad10f1f021a0:current
[100%] fail: write EPIPE
 ❌  FargateTaskRunnerDemoStack failed: Error: Failed to publish one or more assets. See the error messages above for more information.

It took a while to understand that this was because Docker was not installed or available.

Conversely, if Docker is installed but not enabled, then the error case is more descriptive:

[50%] start: Publishing 7a1e3989751f91a191cd33edf97f22ef63c06ad34f01895a7af11a3e32e3a97a:current
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
[100%] fail: docker build --tag cdkasset-7a1e3989751f91a191cd33edf97f22ef63c06ad34f01895a7af11a3e32e3a97a . exited with error code 1

I’m not expert enough to know whether this is due to the use of Fargate within the application itself, but a more useful error message in the first example would have really helped!

Reproduction Steps

  • Be on MacOS
  • Install CDK, AWS CLI
  • Do not install Docker
  • Try to build application (possibly dependent on use of FargateTaskDefinition() )
  • Receive indistinct error message

Error Log

[50%] start: Publishing f78183504c75718fb00baea6f901199db893eddc04d21e426e8cad10f1f021a0:current
[100%] fail: write EPIPE
 ❌  FargateTaskRunnerDemoStack failed: Error: Failed to publish one or more assets. See the error messages above for more information.

In a way it’s the lack of errors that is the problem! 😃

Environment

  • CLI Version : 2.0.14
  • Framework Version: 1.36.0
  • OS : MacOS 10.15.4
  • Language : English

This is 🐛 Bug Report

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

5reactions
davidwhewellcommented, Jun 4, 2020

That all makes sense and is fair enough - false positives definitely do not help while debugging.

If a specific error message can’t be added for this situation, hopefully having it on this page is enough for someone to find when they come across it later on!

3reactions
davidwhewellcommented, Jun 12, 2020

If this is regarding the message due to the lack of a Docker installation, installing Docker on the local machine would resolve the issue.

If it is about a general EPIPE error without context (such as is given without Docker being installed), then I agree right now it is hard to know where to start looking!

On Fri, 12 Jun 2020 at 09:04, Dzhuneyt notifications@github.com wrote:

We just encountered this and after reading the comments here, it’s still not very clear how to solve this issue (or at least start debugging). Do you have any suggestions on where to start looking?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/aws/aws-cdk/issues/8133#issuecomment-643134633, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEXL2CQ2DKOCX5L2CELF6UDRWHOQ5ANCNFSM4NG7MCYA .

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error when deploying Lambda Docker using AWS CDK
Docker needs to be installed to build the image. After installing docker on machine where I run 'cdk deploy' above issue is resolved....
Read more >
ECS load container image from sagemaker built-in algorithm ...
Hello, I'd like to deploy SageMaker's built-in algorithm, BlazingText model on Fargate instead of Sagemaker endpoint. So, I tried to make an ECS...
Read more >
Creating an AWS Fargate service using the AWS CDK
This example walks you through how to create an AWS Fargate service running on an Amazon Elastic Container Service (Amazon ECS) cluster that's...
Read more >
Deploy Your React App to ECS (Fargate) - DEV Community ‍ ‍
It's assumed that you have already containerized your React app. If you haven't then read this... Tagged with react, aws, devops, docker.
Read more >
homebrew-core - Homebrew Formulae
a2ps 4.14 Any‑to‑PostScript filter aacgain 1.8 AAC‑supporting version of mp3gain aalib 1.4rc5 Portable ASCII art graphics library aamath 0.3 Renders mathematical expressions as ASCII art
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found