Tim-Oliver
08/04/2023, 3:21 PMJake Kaplan
08/04/2023, 4:41 PMTim-Oliver
08/07/2023, 7:48 AMJake Kaplan
08/07/2023, 2:28 PMTim-Oliver
08/07/2023, 3:59 PMprefect.flow_run
and prefect.log
events in cloud UI. I am in a rather restricted environment and your hunch is probably right on point.Jake Kaplan
08/07/2023, 4:35 PM<wss://api.prefect.cloud/.../>
(as opposed to https://...
) you might need to whitelist the url or ip? Unfortunately it's really really dependent on the network setup what is locked down and how it's locked downTim-Oliver
08/30/2023, 9:36 AM"By default the WebSocket protocol uses port 80 for regular WebSocket connections and port 443 for WebSocket connections tunneled over TLS [RFC2818]."
Since you need to use our proxy for outgoing http/https connections, a direct access attempt fails. If prefect does not allow configuring a proxy, you may try defining it via environment variables http_proxy and https_proxy (e.g.: https_proxy=<our-proxy>) for starting the server process.
I have set the environment variables accordingly, but the EventsWorker
Service is still not able to communicate. Is this service respecting the env-vars?
Thank you for helping me figuring this out!
Kind regards,
Tim-OliverJake Kaplan
08/31/2023, 12:54 PMTim-Oliver
08/31/2023, 1:48 PMEventsWorker
has troubles connecting. Is there something I could do to debug this further?
Thanks!16:41:41.688 | ERROR | GlobalEventLoopThread | prefect._internal.concurrency - Service 'EventsWorker' failed with 1 pending items.
That already helps a lot with making the log digestible. Thank you very much!
But I am still wondering how I could get this to run as it is intended. I tried to reproduce the error by opening a websocket outside of prefect:
import asyncio
from websockets.legacy import client
c = client.Connect("<wss://34.111.36.90>", extra_headers={"Authorization": "bearer API-key"})
loop = asyncio.get_event_loop()
task = loop.create_task(c.__aenter__())
loop.run_until_complete(asyncio.wait([task]))
With this I get ConnectionRefusedError: [Errno 111] Connect call failed ('34.111.36.90', 443)
which is not the same error as above. Could you point me in the right direction to get the above error reproduced with a minimal example?
Any help is much appreciated!