Riley Hun
11/18/2020, 10:40 PMhost.docker.internal
to /etc/hosts
via --add-host
? Is this something we add to the running agent or the config.toml?Jim Crist-Harif
11/18/2020, 10:50 PMhost.docker.internal
?Riley Hun
11/18/2020, 11:17 PMJim Crist-Harif
11/18/2020, 11:18 PMRiley Hun
11/18/2020, 11:23 PM{
"config_overrides": {
"server": {
"ui": {
"apollo_url": true
}
}
},
"env_vars": [],
"system_information": {
"platform": "Linux-5.4.0-1029-gcp-x86_64-with-glibc2.29",
"prefect_backend": "server",
"prefect_version": "0.13.16",
"python_version": "3.8.5"
}
}
Full Error Log:[2020-11-18 22:28:12+0000] ERROR - prefect.CloudTaskRunner | Failed to set task state with error: ConnectionError(MaxRetryError("HTTPConnectionPool(host='host.docker.internal', port=4200): Max retries exceeded with url: /graphql (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f4a34b2eb50>: Failed to establish a new connection: [Errno -2] Name or service not known'))"))
Traceback (most recent call last):
File "/opt/conda/lib/python3.7/site-packages/urllib3/connection.py", line 160, in _new_conn
(self._dns_host, self.port), self.timeout, **extra_kw
File "/opt/conda/lib/python3.7/site-packages/urllib3/util/connection.py", line 61, in create_connection
for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
File "/opt/conda/lib/python3.7/socket.py", line 752, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -2] Name or service not known
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/conda/lib/python3.7/site-packages/urllib3/connectionpool.py", line 677, in urlopen
chunked=chunked,
File "/opt/conda/lib/python3.7/site-packages/urllib3/connectionpool.py", line 392, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/opt/conda/lib/python3.7/http/client.py", line 1252, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/opt/conda/lib/python3.7/http/client.py", line 1298, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/opt/conda/lib/python3.7/http/client.py", line 1247, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/opt/conda/lib/python3.7/http/client.py", line 1026, in _send_output
self.send(msg)
File "/opt/conda/lib/python3.7/http/client.py", line 966, in send
self.connect()
File "/opt/conda/lib/python3.7/site-packages/urllib3/connection.py", line 187, in connect
conn = self._new_conn()
File "/opt/conda/lib/python3.7/site-packages/urllib3/connection.py", line 172, in _new_conn
self, "Failed to establish a new connection: %s" % e
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7f4a34b2eb50>: Failed to establish a new connection: [Errno -2] Name or service not known
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/conda/lib/python3.7/site-packages/requests/adapters.py", line 449, in send
timeout=timeout
File "/opt/conda/lib/python3.7/site-packages/urllib3/connectionpool.py", line 727, in urlopen
method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
File "/opt/conda/lib/python3.7/site-packages/urllib3/util/retry.py", line 439, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='host.docker.internal', port=4200): Max retries exceeded with url: /graphql (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f4a34b2eb50>: Failed to establish a new connection: [Errno -2] Name or service not known'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/conda/lib/python3.7/site-packages/prefect/engine/cloud/task_runner.py", line 128, in call_runner_target_handlers
cache_for=self.task.cache_for,
File "/opt/conda/lib/python3.7/site-packages/prefect/client/client.py", line 1461, in set_task_run_state
version=version,
File "/opt/conda/lib/python3.7/site-packages/prefect/client/client.py", line 302, in graphql
retry_on_api_error=retry_on_api_error,
File "/opt/conda/lib/python3.7/site-packages/prefect/client/client.py", line 218, in post
retry_on_api_error=retry_on_api_error,
File "/opt/conda/lib/python3.7/site-packages/prefect/client/client.py", line 434, in _request
session=session, method=method, url=url, params=params, headers=headers
File "/opt/conda/lib/python3.7/site-packages/prefect/client/client.py", line 340, in _send_request
response = <http://session.post|session.post>(url, headers=headers, json=params, timeout=30)
File "/opt/conda/lib/python3.7/site-packages/requests/sessions.py", line 578, in post
return self.request('POST', url, data=data, json=json, **kwargs)
File "/opt/conda/lib/python3.7/site-packages/requests/sessions.py", line 530, in request
resp = self.send(prep, **send_kwargs)
File "/opt/conda/lib/python3.7/site-packages/requests/sessions.py", line 643, in send
r = adapter.send(request, **kwargs)
File "/opt/conda/lib/python3.7/site-packages/requests/adapters.py", line 516, in send
raise ConnectionError(e, request=request)
# new 20.04.1 LTS
sudo apt update
sudo apt install python3-pip
pip3 install prefect
sudo apt install docker docker-compose
sudo systemctl start docker
sudo usermod -aG docker $USER
# logged out to refresh my user groups
docker container run hello-world
# add firewall rule in GCP to allow ingress on port 8080
# changed config.toml to reference apollo url
prefect backend server
prefect server start
[1] https://github.com/PrefectHQ/server/issues/25Jim Crist-Harif
11/18/2020, 11:28 PMRiley Hun
11/18/2020, 11:28 PMprefect agent start docker --show-flow-logs
Jim Crist-Harif
11/18/2020, 11:30 PMRiley Hun
11/18/2020, 11:30 PMDylan
Riley Hun
11/19/2020, 9:49 PMDylan
prefect agent docker start --api <http://localhost:4200>
Riley Hun
11/19/2020, 9:59 PMDylan
Riley Hun
11/19/2020, 10:14 PMDylan
localhost:4200
Riley Hun
11/19/2020, 10:40 PMDylan
Riley Hun
11/19/2020, 10:45 PMDylan
Riley Hun
11/19/2020, 10:47 PMprefect agent docker start --api <http://localhost:4200>
[2020-11-19 22:40:55,824] INFO - agent | Starting DockerAgent with labels []
[2020-11-19 22:40:55,824] INFO - agent | Agent documentation can be found at <https://docs.prefect.io/orchestration/>
[2020-11-19 22:40:55,824] INFO - agent | Agent connecting to the Prefect API at <http://localhost:4200>
[2020-11-19 22:40:55,852] INFO - agent | Waiting for flow runs...
[2020-11-19 22:43:13,018] INFO - agent | Found 1 flow run(s) to submit for execution.
[2020-11-19 22:43:13,119] INFO - agent | Deploying flow run ce49e7a2-e8f6-4103-88c4-cfe371225d03
[2020-11-19 22:43:13,120] INFO - agent | Pulling image <http://gcr.io/aa-mlops-dev-inm5/prefect-etl-storage:0.1.0|gcr.io/aa-mlops-dev-inm5/prefect-etl-storage:0.1.0>...
[2020-11-19 22:43:17,278] INFO - agent | Successfully pulled image <http://gcr.io/aa-mlops-dev-inm5/prefect-etl-storage:0.1.0|gcr.io/aa-mlops-dev-inm5/prefect-etl-storage:0.1.0>...
Kubernetes Pods Logs:
[2020-11-19 22:43:21+0000] ERROR - prefect.CloudTaskRunner | Failed to set task state with error: ConnectionError(MaxRetryError("HTTPConnectionPool(host='host.docker.internal', port=4200): Max retries exceeded with url: /graphql (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f223bdd7b70>: Failed to establish a new connection: [Errno -2] Name or service not known'))"))
Dylan
Riley Hun
11/19/2020, 10:54 PMfrom prefect.utilities.docker_util import get_docker_ip
print(get_docker_ip())
Dylan
Riley Hun
11/19/2020, 10:58 PMDylan
Riley Hun
11/19/2020, 11:00 PMDylan
Riley Hun
11/19/2020, 11:07 PMDylan