簡體   English   中英

無法遠程訪問 Prefect 服務器

[英]Cant Access Prefect Server Remotely

我使用命令prefect server start --postgres-port=5433 --server-port=5001 --hasura-port=5002 --graphql-port=5003 --expose在我的 azure 網絡中的允許端口啟動完美服務器. 當我做docker ps我得到

CONTAINER ID   IMAGE                          COMMAND                  CREATED          STATUS                    PORTS                                   NAMES
873bfa5bd6bc   prefecthq/ui:core-0.15.7       "/docker-entrypoint.…"   23 minutes ago   Up 23 minutes (healthy)   80/tcp, 0.0.0.0:8080->8080/tcp          tmp_ui_1
9ca79a768265   prefecthq/apollo:core-0.15.7   "tini -g -- bash -c …"   23 minutes ago   Up 23 minutes (healthy)   0.0.0.0:5003->4200/tcp                  tmp_apollo_1
ab7c87ddbabb   prefecthq/server:core-0.15.7   "tini -g -- python s…"   23 minutes ago   Up 23 minutes                                                     tmp_towel_1
ef230baeddb5   prefecthq/server:core-0.15.7   "tini -g -- bash -c …"   23 minutes ago   Up 23 minutes (healthy)   127.0.0.1:5001->4201/tcp                tmp_graphql_1
410c38f08f83   hasura/graphql-engine:v1.3.3   "graphql-engine serve"   23 minutes ago   Up 23 minutes (healthy)   127.0.0.1:5002->3000/tcp                tmp_hasura_1
82748fbc9f4d   postgres:11                    "docker-entrypoint.s…"   23 minutes ago   Up 23 minutes (healthy)   127.0.0.1:5433->5432/tcp                tmp_postgres_1

我的~/.prefect/config.toml

[server]
  endpoint = "http://ipaddress:5003/graphql"

  [server.ui]
  apollo_url = "http://ipaddress:5003/graphql"

然后當我啟動服務器時,狀態如圖所示並重定向到 ipaddress:8080/getting-started 頁面在此處輸入圖像描述

我使用docker logs ab7c87ddbabb tmp_towel_1了 tmp_towel_1 的日志,因為它沒有顯示健康狀態,我發現了一些錯誤

[Errno 111] Connect call failed ('some_ipaddress_which_i_dont_know_about', 3000)"}

我想它是 docker 網絡 ip 什么的。 沒有線索。 誰能建議我可能錯在哪里?

同樣的問題是通過社區 Slack 發布的,根據那里的討論,我們認為解決方案是使用--server-port設置端口而不公開其他端口,因為這些端口僅在各個組件之間內部使用。 所以下面的命令應該可以工作:

prefect server start --server-port=5003 --no-postgres-port --no-hasura-port --expose

然后在 config.toml 中,使用:

[server]
endpoint = "http://YOUR_MACHINES_PUBLIC_IP:5003/graphql"

  [server.ui]
    apollo_url = "http://YOUR_MACHINES_PUBLIC_IP:5003/graphql"

在這里分享給后代。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM