Linux

氣流:無法連接到(‘0.0.0.0’,8080)

  • September 9, 2020

我正在嘗試用 Airflow 做一些事情。我已經用 pip 安裝了它(後者是虛擬的),但問題是當我想啟動網路伺服器時。

airflow webserver -p 8080
[2017-07-29 12:20:45,913] [4585] {models.py:167} INFO - Filling up the DagBag from /home/milenko/airflow/dags
Running the Gunicorn Server with:
Workers: 4 sync
Host: 0.0.0.0:8080
Timeout: 120
Logfiles: - -
=================================================================            
[2017-07-29 12:20:46,950] {__init__.py:57} INFO - Using executor SequentialExecutor
[2017-07-29 12:20:47 +0200] [4590] [INFO] Starting gunicorn 19.3.0
[2017-07-29 12:20:47 +0200] [4590] [ERROR] Connection in use: ('0.0.0.0', 8080)
[2017-07-29 12:20:47 +0200] [4590] [ERROR] Retrying in 1 second.
[2017-07-29 12:20:48 +0200] [4590] [ERROR] Connection in use: ('0.0.0.0', 8080)
[2017-07-29 12:20:48 +0200] [4590] [ERROR] Retrying in 1 second.
[2017-07-29 12:20:49 +0200] [4590] [ERROR] Connection in use: ('0.0.0.0', 8080)
[2017-07-29 12:20:49 +0200] [4590] [ERROR] Retrying in 1 second.
[2017-07-29 12:20:50 +0200] [4590] [ERROR] Connection in use: ('0.0.0.0', 8080)
[2017-07-29 12:20:50 +0200] [4590] [ERROR] Retrying in 1 second.
[2017-07-29 12:20:51 +0200] [4590] [ERROR] Connection in use: ('0.0.0.0', 8080)
[2017-07-29 12:20:51 +0200] [4590] [ERROR] Retrying in 1 second.
[2017-07-29 12:20:52 +0200] [4590] [ERROR] Can't connect to ('0.0.0.0', 8080)

使用 netstat 我得到了這個輸出

tcp6       0      0 :::8080                 :::*                    LISTEN      1637/java 

如何解決這個問題?我在某處讀到 Gunicorn Server 不適合 8080 埠,但所有 Airflow 教程都指向它。

要麼停止已經使用埠 8080 的 Java 應用程序,要麼更改 Airflow 的埠。

適合埠 8080是相當模糊的,它根本不重要,但您可能也必須更改客戶端的連接設置。

引用自:https://serverfault.com/questions/865907