-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: UnixHTTPConnectionPool Error #6507
Comments
Hey @fade2black, let me try to clarify my understanding of the problem. The first time you try running a Docker-based SAM CLI command the execution succeeds, and then subsequent Docker-based commands fail with the error you listed? Is my understanding correct? |
@mildaniel Hi!
Yes, correct. But now it works fine. Yesterday, after 4-5 hours recurring like this it finally works without any issue. Even more, I'd say it's started to build faster. But I don't know why the build progress does not show any more. It appears ONLY after the build finishes successfully. |
Just in case, my terminal is |
And the build progress not showing up is specifically when building image-based functions? |
@mildaniel Yes, image-based project. I type Building codeuri: blah blah blah and gets stuck with Building image for DataImportFunction function
Setting DockerBuildArgs: {} for DataImportFunction function After it builds successfully, all the history shows up at once: Building image for DataImportFunction function
Setting DockerBuildArgs: {} for DataImportFunction function
Step 1/8 : FROM public.ecr.aws/lambda/ruby:3.2
---> 74061974f58b
Step 2/8 : RUN yum install -y amazon-linux-extras ruby-devel make gcc libxml2-devel
---> Using cache
---> 69deb25d30d8
...
Build Succeeded
Built Artifacts : .aws-sam/build
Built Template : .aws-sam/build/template.yaml
Commands you can use next
=========================
[*] Validate SAM template: sam validate
[*] Invoke Function: sam local invoke
[*] Test Function in the Cloud: sam sync --stack-name {{stack-name}} --watch
[*] Deploy: sam deploy --guided
|
Thanks @fade2black, I was able to reproduce this too. This part is a bug, but I don't think there is any action to take on the Docker side of things. |
We previously switched away from using the lower level api call to build images to using images.build so that we could surface any errors encountered during an image build. You can see the reasoning in this issue #5026 The reason logs are not printed until a build is finished is because the images.build call is blocking until the build completes, and because of that we can't surface any logs until after the build completes. This ticket docker/docker-py#3108 raises the issue of no errors being surfaced by the lower level call and until a resolution is made we will have to continue using the images.build instead which means displaying build logs will be delayed |
This is such a pain in the ass. When are you planning to fix it? |
Today I have updated both Docker and AWS SAM.
Description (of
sam build --debug
):Additional environment details
sam --version
: SAM CLI, version 1.105.0eu-central-1
24.0.7, build afdd53b
I think it is related to the Docker, because
UnixHTTPConnectionPool
errorsam build
. Everything works fine.In addition to it I tried to run
sam --info
it got stuck. After I killed the Docker process completely and ransam --info
, it showed the info. That's why it says"docker_engine": "Not available"
.After I restart the Docker I run
sam build
again. It works fine. I am even able tosam deploy
it. Next time I try to build, I get the same error.I am not sure it is SAM CLI bug or Docker bug.
UPDATE
I have also noticed that the building progress like following
does not appear anymore while building and only shows up when building is successful and over. In case of failure, it does not appear, only the failure msg appears.
The text was updated successfully, but these errors were encountered: