Manuel Mourato
05/22/2020, 1:51 PMprefect agent start docker -l docker-execs-test
If I try to set the network to host however, like bellow, the flow is permanently in "Submitted" state.
prefect agent start docker -l docker-execs-test --network host
Any ideas on why this might be?josh
05/22/2020, 1:55 PMThe host networking driver only works on Linux hosts, and is not supported on Docker Desktop for Mac, Docker Desktop for Windows, or Docker EE for Windows Server.
Manuel Mourato
05/22/2020, 1:58 PMjosh
05/22/2020, 1:58 PM--show-flow-logs
and sometime after the container eventually exits it should spit out an error message back to the agent logsManuel Mourato
05/22/2020, 2:01 PMjosh
05/22/2020, 2:10 PMif sys.platform.startswith("linux") and self.docker_interface:
docker_internal_ip = get_docker_ip()
host_config.update(extra_hosts={"host.docker.internal": docker_internal_ip})
Manuel Mourato
05/22/2020, 2:35 PMjosh
05/22/2020, 3:04 PM127.0.0.1
you try host.docker.internal
(without attaching the network host) does it still get an error?Manuel Mourato
05/22/2020, 3:40 PM'Could not connect to Application: JVM exception occurred: Connection refused to host: 127.0.0.1
josh
05/22/2020, 3:43 PMManuel Mourato
05/22/2020, 4:57 PMprefect agent start docker -l docker-execs-test --show-flow-logs --network test-network
OR
prefect agent start docker -l docker-execs-test --show-flow-logs --network prefect-server
OR
prefect agent start docker -l docker-execs-test --show-flow-logs --network host
The flows get stuck in submitted state with this error:
File "/usr/local/lib/python3.6/site-packages/urllib3/connection.py", line 160, in _new_conn
(self._dns_host, self.port), self.timeout, **extra_kw
File "/usr/local/lib/python3.6/site-packages/urllib3/util/connection.py", line 84, in create_connection
raise err
File "/usr/local/lib/python3.6/site-packages/urllib3/util/connection.py", line 74, in create_connection
sock.connect(sa)
socket.timeout: timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 677, in urlopen
chunked=chunked,
File "/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 392, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/usr/local/lib/python3.6/http/client.py", line 1262, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/local/lib/python3.6/http/client.py", line 1308, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/usr/local/lib/python3.6/http/client.py", line 1257, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/local/lib/python3.6/http/client.py", line 1036, in _send_output
self.send(msg)
File "/usr/local/lib/python3.6/http/client.py", line 974, in send
self.connect()
File "/usr/local/lib/python3.6/site-packages/urllib3/connection.py", line 187, in connect
conn = self._new_conn()
File "/usr/local/lib/python3.6/site-packages/urllib3/connection.py", line 167, in _new_conn
% (self.host, self.timeout),
urllib3.exceptions.ConnectTimeoutError: (<urllib3.connection.HTTPConnection object at 0x7fb645a37cf8>, 'Connection to host.docker.internal timed out. (connect timeout=30)')
josh
05/22/2020, 5:00 PMManuel Mourato
05/22/2020, 5:13 PMjosh
05/22/2020, 5:17 PM