pk13055
10/30/2022, 10:29 AMorion
+ agent
) on a remote server. However, I get an error message in the orion logs after changing PREFECT_ORION_API_HOST
from 0.0.0.0
to SERVER_IP
. The particular error is:
ERROR: [Errno 99] error while attempting to bind on address ('SERVER_IP', 4200): cannot assign requested address
This does not make sense, since I can specifically access the same SERVER_IP
through the browser and the particular port has been allowed through the firewall as well.
(PS - orion appears to connect for a brief second, and then immediately throws this error and attempts to restart).
Additionally, attached below is the relevant section of my `docker-compose.yml`:
version: "3.9"
services:
db:
image: timescale/timescaledb:latest-pg14
volumes:
- $PWD/data/db:/var/lib/postgresql/data
- $PWD/config/db:/docker-entrypoint-initdb.d/
healthcheck:
test: [ "CMD-SHELL", "pg_isready" ]
interval: 10s
timeout: 5s
retries: 5
environment:
- POSTGRES_DB=$POSTGRES_DB
- POSTGRES_USER=$POSTGRES_USER
- POSTGRES_PASSWORD=$POSTGRES_PASSWORD
networks:
- db_network
orion:
image: prefecthq/prefect:2.6.3-python3.10
restart: always
volumes:
- $PWD/prefect:/root/.prefect
entrypoint: [ "prefect", "orion", "start" ]
environment:
- PREFECT_ORION_API_HOST=$SERVER_IP
- PREFECT_ORION_DATABASE_CONNECTION_URL=$PREFECT_DB_URL
ports:
- 4200:4200
depends_on:
- db
networks:
- prefect_network
- db_network
agent:
build: ./prefect
restart: always
entrypoint: [ "prefect", "agent", "start", "-q", "main_queue" ]
environment:
- PREFECT_API_URL=<http://orion:4200/api>
networks:
- prefect_network
- db_network
cli:
build: ./prefect
entrypoint: "bash"
working_dir: "/root/flows"
volumes:
- "$PWD/prefect/flows:/root/flows"
environment:
- PREFECT_API_URL=<http://orion:4200/api>
networks:
- prefect_network
- db_network
networks:
db_network:
prefect_network:
PREFECT_ORION_UI_API_URL
to the appropriate value, and keeping PREFECT_ORION_API_HOST
as 0.0.0.0
solved the issue!Ryan Peden
10/30/2022, 10:06 PM