Vlad Tudor
09/01/2022, 2:09 PMdocker-compose
that runs on a remote VM.
However, I cannot configure the correct URL for the graphql
(when opening the UI, I get the error Couldn't connect to Prefect Server at <http://localhost:4200/graphql>
)
I tried to configure it from the config.toml
file with the URL of my machine:
[server]
[server.ui]
graphql_url = "http://<<MACHINE_PUBLIC_IP>>:4200/graphql"
but it still tries the access localhost.
Any help will be thoroughly appreciated. It's been 12 hours..Ryan Peden
09/01/2022, 2:16 PMdocker-compose.yml
file?Jeff Hale
09/01/2022, 2:16 PMVlad Tudor
09/01/2022, 2:18 PMdocker-compose
service:
ui:
command: /intercept.sh
depends_on:
apollo:
condition: service_healthy
volumes:
- type: bind
source: ./config.toml
target: /root/.prefect/config.toml
read_only: true
healthcheck:
interval: 30s
retries: 3
test: curl --fail --silent --head "<http://ui:4001/>" &> /dev/null || exit 1
timeout: 5s
image: prefecthq/ui:core-1.2.2
ports:
- 4001:8080
restart: always
networks:
- prefect-server
Now I question wether it's the correct wai to pass the config.toml
I'd prefer using environment variables but resources online are conflicting on the names of the variablesPREFECT__SERVER__UI__GRAPHQL_URL
(but also PREFECT_SERVER__UI__GRAPHQL_URL
) as env variables but still the UI check localhostRyan Peden
09/01/2022, 2:24 PMapollo
service in the Docker Compose yaml still have:
ports:
- 4200:4200/tcp
Vlad Tudor
09/01/2022, 2:26 PMRyan Peden
09/01/2022, 2:26 PMlocalhost
?Vlad Tudor
09/01/2022, 2:27 PM[server]
[server.ui]
apollo_url = "<http://YOUR_MACHINES_PUBLIC_IP:4200/graphql>"
In others:
[server]
[server.ui]
graphql_url = "<http://YOUR_MACHINES_PUBLIC_IP:4200/graphql>"
Ryan Peden
09/01/2022, 2:39 PMPREFECT_SERVER__APOLLO_URL
environment variable. You may need to run localStorage.clear()
in your browser's console afterward because it might have the old URL cachedVlad Tudor
09/01/2022, 2:45 PMPREFECT_SERVER__APOLLO_URL
woks but indeed, it's crucial to clear the cache of the browser. Gee that was a headache π
Thank you so much kind sirPREFECT__SERVER__HOST: <http://apollo>
PREFECT__SERVER__PORT: 4200
In the environment variables I should also replace apollo with my machine IP?Ryan Peden
09/01/2022, 3:14 PM<http://apollo>
will only work if the client container is connected to the same Docker network as the server containerVlad Tudor
09/01/2022, 3:20 PMPREFECT__SERVER__HOST: http://<<MACHINE_IP>>
PREFECT__SERVER__PORT: 4200
I get ConnectionTimedOut
π₯²Ryan Peden
09/01/2022, 4:01 PMhost
in config.toml
? When I set the host there, it works whether I use apollo
or the server IP as the hostVlad Tudor
09/01/2022, 4:07 PM<http://44.205.14.8:4001/>
errorurllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='3.205.14.8', port=4200): Max retries exceeded with url: / (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x7f98064740d0>
Ryan Peden
09/01/2022, 4:15 PM3.205.14.8
the IP of the server where you used docker compose to run the server?Vlad Tudor
09/01/2022, 4:16 PM<http://172.17.0.1>
but neither does it workPREFECT__API__URL=<http://postgres:5432>
?<http://localhost:8080/default/flow/5957343a-9867-430d-b2f9-053cf764d57d>
, so this is not good, right?Ryan Peden
09/01/2022, 4:45 PMVlad Tudor
09/01/2022, 4:47 PMRyan Peden
09/01/2022, 4:55 PMVlad Tudor
09/01/2022, 5:07 PMRyan Peden
09/01/2022, 5:11 PMVlad Tudor
09/02/2022, 7:04 AMdocker-compose
I set:
- PREFECT__SERVER__ENDPOINT=<http://apollo:4200>
- PREFECT__SERVER__UI__ENDPOINT=<http://ui:8080>
and when the flow is registred it's registred at:
<http://ui:8080/default/flow/1dbc36f7-4302-458c-a8cd-e436a93142cb>
but from the UI I cannot access it.
My question is, what URL should I set. Should I set the IP of the remote machine?
@Ryan Peden What do you think?