Git Product home page Git Product logo

Comments (5)

stefansundin avatar stefansundin commented on August 12, 2024

I'm having the same exact issue. 🙈

Had the SAM cli installed before I upgraded to Ventura but I got an error it couldn't communicate with Docker.

Error: Running AWS SAM projects locally requires Docker. Have you got it installed and running?

I invoked the command again with --debug but this didn't make me any wiser.

2022-11-08 11:53:21,487 | Docker is not reachable
Traceback (most recent call last):
  File "/opt/homebrew/Cellar/aws-sam-cli/1.61.0/libexec/lib/python3.8/site-packages/urllib3/connectionpool.py", line 703, in urlopen
    httplib_response = self._make_request(
  File "/opt/homebrew/Cellar/aws-sam-cli/1.61.0/libexec/lib/python3.8/site-packages/urllib3/connectionpool.py", line 398, in _make_request
    conn.request(method, url, **httplib_request_kw)
  File "/opt/homebrew/Cellar/[email protected]/3.8.15/Frameworks/Python.framework/Versions/3.8/lib/python3.8/http/client.py", line 1256, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/opt/homebrew/Cellar/[email protected]/3.8.15/Frameworks/Python.framework/Versions/3.8/lib/python3.8/http/client.py", line 1302, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/opt/homebrew/Cellar/[email protected]/3.8.15/Frameworks/Python.framework/Versions/3.8/lib/python3.8/http/client.py", line 1251, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/opt/homebrew/Cellar/[email protected]/3.8.15/Frameworks/Python.framework/Versions/3.8/lib/python3.8/http/client.py", line 1011, in _send_output
    self.send(msg)
  File "/opt/homebrew/Cellar/[email protected]/3.8.15/Frameworks/Python.framework/Versions/3.8/lib/python3.8/http/client.py", line 951, in send
    self.connect()
  File "/opt/homebrew/Cellar/aws-sam-cli/1.61.0/libexec/lib/python3.8/site-packages/docker/transport/unixconn.py", line 43, in connect
    sock.connect(self.unix_socket)
FileNotFoundError: [Errno 2] No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/homebrew/Cellar/aws-sam-cli/1.61.0/libexec/lib/python3.8/site-packages/requests/adapters.py", line 439, in send
    resp = conn.urlopen(
  File "/opt/homebrew/Cellar/aws-sam-cli/1.61.0/libexec/lib/python3.8/site-packages/urllib3/connectionpool.py", line 787, in urlopen
    retries = retries.increment(
  File "/opt/homebrew/Cellar/aws-sam-cli/1.61.0/libexec/lib/python3.8/site-packages/urllib3/util/retry.py", line 550, in increment
    raise six.reraise(type(error), error, _stacktrace)
  File "/opt/homebrew/Cellar/aws-sam-cli/1.61.0/libexec/lib/python3.8/site-packages/urllib3/packages/six.py", line 769, in reraise
    raise value.with_traceback(tb)
  File "/opt/homebrew/Cellar/aws-sam-cli/1.61.0/libexec/lib/python3.8/site-packages/urllib3/connectionpool.py", line 703, in urlopen
    httplib_response = self._make_request(
  File "/opt/homebrew/Cellar/aws-sam-cli/1.61.0/libexec/lib/python3.8/site-packages/urllib3/connectionpool.py", line 398, in _make_request
    conn.request(method, url, **httplib_request_kw)
  File "/opt/homebrew/Cellar/[email protected]/3.8.15/Frameworks/Python.framework/Versions/3.8/lib/python3.8/http/client.py", line 1256, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/opt/homebrew/Cellar/[email protected]/3.8.15/Frameworks/Python.framework/Versions/3.8/lib/python3.8/http/client.py", line 1302, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/opt/homebrew/Cellar/[email protected]/3.8.15/Frameworks/Python.framework/Versions/3.8/lib/python3.8/http/client.py", line 1251, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/opt/homebrew/Cellar/[email protected]/3.8.15/Frameworks/Python.framework/Versions/3.8/lib/python3.8/http/client.py", line 1011, in _send_output
    self.send(msg)
  File "/opt/homebrew/Cellar/[email protected]/3.8.15/Frameworks/Python.framework/Versions/3.8/lib/python3.8/http/client.py", line 951, in send
    self.connect()
  File "/opt/homebrew/Cellar/aws-sam-cli/1.61.0/libexec/lib/python3.8/site-packages/docker/transport/unixconn.py", line 43, in connect
    sock.connect(self.unix_socket)
urllib3.exceptions.ProtocolError: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/homebrew/Cellar/aws-sam-cli/1.61.0/libexec/lib/python3.8/site-packages/samcli/local/docker/utils.py", line 91, in is_docker_reachable
    docker_client.ping()
  File "/opt/homebrew/Cellar/aws-sam-cli/1.61.0/libexec/lib/python3.8/site-packages/docker/client.py", line 187, in ping
    return self.api.ping(*args, **kwargs)
  File "/opt/homebrew/Cellar/aws-sam-cli/1.61.0/libexec/lib/python3.8/site-packages/docker/api/daemon.py", line 166, in ping
    return self._result(self._get(self._url('/_ping'))) == 'OK'
  File "/opt/homebrew/Cellar/aws-sam-cli/1.61.0/libexec/lib/python3.8/site-packages/docker/utils/decorators.py", line 46, in inner
    return f(self, *args, **kwargs)
  File "/opt/homebrew/Cellar/aws-sam-cli/1.61.0/libexec/lib/python3.8/site-packages/docker/api/client.py", line 230, in _get
    return self.get(url, **self._set_request_timeout(kwargs))
  File "/opt/homebrew/Cellar/aws-sam-cli/1.61.0/libexec/lib/python3.8/site-packages/requests/sessions.py", line 555, in get
    return self.request('GET', url, **kwargs)
  File "/opt/homebrew/Cellar/aws-sam-cli/1.61.0/libexec/lib/python3.8/site-packages/requests/sessions.py", line 542, in request
    resp = self.send(prep, **send_kwargs)
  File "/opt/homebrew/Cellar/aws-sam-cli/1.61.0/libexec/lib/python3.8/site-packages/requests/sessions.py", line 655, in send
    r = adapter.send(request, **kwargs)
  File "/opt/homebrew/Cellar/aws-sam-cli/1.61.0/libexec/lib/python3.8/site-packages/requests/adapters.py", line 498, in send
    raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))
Error: Running AWS SAM projects locally requires Docker. Have you got it installed and running?

So I decided to try to reinstall the formula, but now it doesn't seem to install properly and I'm getting the same Failed changing dylib ID error.

I was going to try editing the formula to update the python version, but as cald already tried that I don't think I'm going to give it a shot. I don't see any references to this problem in the cryptography package, so no idea if it is an issue on their end or not.

from homebrew-tap.

sriram-mv avatar sriram-mv commented on August 12, 2024

Thanks for posting the issue! Have you upgraded to the latest version of docker? I do get the first error as mentioned.

Error: Failed changing dylib ID of /opt/homebrew/Cellar/aws-sam-cli/1.61.0/libexec/lib/python3.8/site-packages/cryptography/hazmat/bindings/_rust.abi3.so
  from /opt/homebrew/opt/aws-sam-cli/libexec/lib/python3.8/site-packages/cryptography/hazmat/bindings/_rust.abi3.so
    to /opt/homebrew/opt/aws-sam-cli/libexec/lib/python3.8/site-packages/cryptography/hazmat/bindings/_rust.abi3.so
Error: Failed to fix install linkage

However, sam commands continue to work, I tested init-ing a sample app, building and doing a sam local invoke seem to work fine.

Below is my docker version:
Docker version 20.10.21, build baeda1f

All the above testing was on an M1 mac.

from homebrew-tap.

stefansundin avatar stefansundin commented on August 12, 2024

I just upgraded Docker to the latest version and I think it fixed it.

I think the problem was this (from the changelog):

  • Re-added the /var/run/docker.sock on Mac by default, to increase compatibility with tooling like tilt and docker-py.

The installation error looks really bad though and it should probably be fixed. I think it will rightfully make users think the installation is broken.

Thanks for the help!

from homebrew-tap.

sriram-mv avatar sriram-mv commented on August 12, 2024

@stefansundin Completely! we will be looking into the error encountered during the installation phase.

from homebrew-tap.

welljj avatar welljj commented on August 12, 2024

Looks like the error has been resolved. I just did a regular brew update, brew upgrade, then reinstalled aws-sam-cli and no longer see any errors. Thank you!

from homebrew-tap.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.