Skip to content
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

Apple M1 : block_storage.save TimeOut #39

Open
johnhorn2 opened this issue Oct 18, 2022 · 2 comments
Open

Apple M1 : block_storage.save TimeOut #39

johnhorn2 opened this issue Oct 18, 2022 · 2 comments
Labels
help wanted Extra attention is needed

Comments

@johnhorn2
Copy link

On M1 Mac for both client_s3 and local storage client I'm getting the same error when running the client:

weather_1  | The above exception was the direct cause of the following exception:
weather_1  |
weather_1  | Traceback (most recent call last):
weather_1  |   File "/usr/app/weather.py", line 47, in <module>
weather_1  |     block_storage.save("local-storage", overwrite=True)

The agent and server both work fine though.

@johnhorn2
Copy link
Author

full stack trace:

prefect-docker-compose % docker-compose -f client/docker-compose.yml up
Recreating client_weather_1 ... done
Attaching to client_weather_1
weather_1  | Traceback (most recent call last):
weather_1  |   File "/usr/local/lib/python3.10/site-packages/httpcore/backends/asyncio.py", line 109, in connect_tcp
weather_1  |     stream: anyio.abc.ByteStream = await anyio.connect_tcp(
weather_1  |   File "/usr/local/lib/python3.10/site-packages/anyio/_core/_sockets.py", line 213, in connect_tcp
weather_1  |     async with create_task_group() as tg:
weather_1  |   File "/usr/local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 662, in __aexit__
weather_1  |     raise exceptions[0]
weather_1  |   File "/usr/local/lib/python3.10/site-packages/anyio/_core/_sockets.py", line 164, in try_connect
weather_1  |     stream = await asynclib.connect_tcp(remote_host, remote_port, local_address)
weather_1  |   File "/usr/local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 1691, in connect_tcp
weather_1  |     await get_running_loop().create_connection(
weather_1  |   File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1052, in create_connection
weather_1  |     sock = await self._connect_sock(
weather_1  |   File "/usr/local/lib/python3.10/asyncio/base_events.py", line 963, in _connect_sock
weather_1  |     await self.sock_connect(sock, address)
weather_1  |   File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 500, in sock_connect
weather_1  |     return await fut
weather_1  | asyncio.exceptions.CancelledError
weather_1  |
weather_1  | During handling of the above exception, another exception occurred:
weather_1  |
weather_1  | Traceback (most recent call last):
weather_1  |   File "/usr/local/lib/python3.10/site-packages/httpcore/_exceptions.py", line 8, in map_exceptions
weather_1  |     yield
weather_1  |   File "/usr/local/lib/python3.10/site-packages/httpcore/backends/asyncio.py", line 108, in connect_tcp
weather_1  |     with anyio.fail_after(timeout):
weather_1  |   File "/usr/local/lib/python3.10/site-packages/anyio/_core/_tasks.py", line 118, in __exit__
weather_1  |     raise TimeoutError
weather_1  | TimeoutError
weather_1  |
weather_1  | During handling of the above exception, another exception occurred:
weather_1  |
weather_1  | Traceback (most recent call last):
weather_1  |   File "/usr/local/lib/python3.10/site-packages/httpx/_transports/default.py", line 60, in map_httpcore_exceptions
weather_1  |     yield
weather_1  |   File "/usr/local/lib/python3.10/site-packages/httpx/_transports/default.py", line 353, in handle_async_request
weather_1  |     resp = await self._pool.handle_async_request(req)
weather_1  |   File "/usr/local/lib/python3.10/site-packages/httpcore/_async/connection_pool.py", line 253, in handle_async_request
weather_1  |     raise exc
weather_1  |   File "/usr/local/lib/python3.10/site-packages/httpcore/_async/connection_pool.py", line 237, in handle_async_request
weather_1  |     response = await connection.handle_async_request(request)
weather_1  |   File "/usr/local/lib/python3.10/site-packages/httpcore/_async/connection.py", line 86, in handle_async_request
weather_1  |     raise exc
weather_1  |   File "/usr/local/lib/python3.10/site-packages/httpcore/_async/connection.py", line 63, in handle_async_request
weather_1  |     stream = await self._connect(request)
weather_1  |   File "/usr/local/lib/python3.10/site-packages/httpcore/_async/connection.py", line 111, in _connect
weather_1  |     stream = await self._network_backend.connect_tcp(**kwargs)
weather_1  |   File "/usr/local/lib/python3.10/site-packages/httpcore/backends/auto.py", line 29, in connect_tcp
weather_1  |     return await self._backend.connect_tcp(
weather_1  |   File "/usr/local/lib/python3.10/site-packages/httpcore/backends/asyncio.py", line 107, in connect_tcp
weather_1  |     with map_exceptions(exc_map):
weather_1  |   File "/usr/local/lib/python3.10/contextlib.py", line 153, in __exit__
weather_1  |     self.gen.throw(typ, value, traceback)
weather_1  |   File "/usr/local/lib/python3.10/site-packages/httpcore/_exceptions.py", line 12, in map_exceptions
weather_1  |     raise to_exc(exc)
weather_1  | httpcore.ConnectTimeout
weather_1  |
weather_1  | The above exception was the direct cause of the following exception:
weather_1  |
weather_1  | Traceback (most recent call last):
weather_1  |   File "/usr/app/weather.py", line 47, in <module>
weather_1  |     block_storage.save("local-storage", overwrite=True)
weather_1  |   File "/usr/local/lib/python3.10/site-packages/prefect/utilities/asyncutils.py", line 212, in wrapper
weather_1  |     return run_async_in_new_loop(async_fn, *args, **kwargs)
weather_1  |   File "/usr/local/lib/python3.10/site-packages/prefect/utilities/asyncutils.py", line 141, in run_async_in_new_loop
weather_1  |     return anyio.run(partial(__fn, *args, **kwargs))
weather_1  |   File "/usr/local/lib/python3.10/site-packages/anyio/_core/_eventloop.py", line 70, in run
weather_1  |     return asynclib.run(func, *args, **backend_options)
weather_1  |   File "/usr/local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 292, in run
weather_1  |     return native_run(wrapper(), debug=debug)
weather_1  |   File "/usr/local/lib/python3.10/asyncio/runners.py", line 44, in run
weather_1  |     return loop.run_until_complete(main)
weather_1  |   File "/usr/local/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
weather_1  |     return future.result()
weather_1  |   File "/usr/local/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 287, in wrapper
weather_1  |     return await func(*args)
weather_1  |   File "/usr/local/lib/python3.10/site-packages/prefect/blocks/core.py", line 812, in save
weather_1  |     document_id = await self._save(name=name, overwrite=overwrite, client=client)
weather_1  |   File "/usr/local/lib/python3.10/site-packages/prefect/client/orion.py", line 82, in with_injected_client
weather_1  |     return await fn(*args, **kwargs)
weather_1  |   File "/usr/local/lib/python3.10/site-packages/prefect/blocks/core.py", line 760, in _save
weather_1  |     await self.register_type_and_schema(client=client)
weather_1  |   File "/usr/local/lib/python3.10/site-packages/prefect/client/orion.py", line 82, in with_injected_client
weather_1  |     return await fn(*args, **kwargs)
weather_1  |   File "/usr/local/lib/python3.10/site-packages/prefect/blocks/core.py", line 695, in register_type_and_schema
weather_1  |     block_type = await client.read_block_type_by_slug(
weather_1  |   File "/usr/local/lib/python3.10/site-packages/prefect/client/orion.py", line 932, in read_block_type_by_slug
weather_1  |     response = await self._client.get(f"/block_types/slug/{slug}")
weather_1  |   File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1751, in get
weather_1  |     return await self.request(
weather_1  |   File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1527, in request
weather_1  |     return await self.send(request, auth=auth, follow_redirects=follow_redirects)
weather_1  |   File "/usr/local/lib/python3.10/site-packages/prefect/client/base.py", line 159, in send
weather_1  |     await super().send(*args, **kwargs)
weather_1  |   File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1614, in send
weather_1  |     response = await self._send_handling_auth(
weather_1  |   File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1642, in _send_handling_auth
weather_1  |     response = await self._send_handling_redirects(
weather_1  |   File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1679, in _send_handling_redirects
weather_1  |     response = await self._send_single_request(request)
weather_1  |   File "/usr/local/lib/python3.10/site-packages/httpx/_client.py", line 1716, in _send_single_request
weather_1  |     response = await transport.handle_async_request(request)
weather_1  |   File "/usr/local/lib/python3.10/site-packages/httpx/_transports/default.py", line 352, in handle_async_request
weather_1  |     with map_httpcore_exceptions():
weather_1  |   File "/usr/local/lib/python3.10/contextlib.py", line 153, in __exit__
weather_1  |     self.gen.throw(typ, value, traceback)
weather_1  |   File "/usr/local/lib/python3.10/site-packages/httpx/_transports/default.py", line 77, in map_httpcore_exceptions
weather_1  |     raise mapped_exc(message) from exc
weather_1  | httpx.ConnectTimeout
client_weather_1 exited with code 1

@flavienbwk
Copy link
Owner

Thank you for using prefect-docker-compose. I don't use M1 computers so I won't be able to answer.

I leave this issue open if someone can replicate the issue and has a solution.

@flavienbwk flavienbwk added the help wanted Extra attention is needed label Feb 22, 2023
@flavienbwk flavienbwk changed the title block_storage.save TimeOut Apple M1 : block_storage.save TimeOut Feb 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants