You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Scheduler always connect to api-server via http and port 8080 #50739
Airflow installed in venv via PyPi (along official guide). When airflow-apiserver started on port other than 8080 and/or HTTPS will not be able to run any tasks. Airflow scheduler is accepting tasks from api-server but than pings back to api server always on http and port 8080 on localhost. I don't see any documentation that will allow to change this behaviour. It looks like this connection is hardcoded.
I'm using local executor.
What you think should happen instead?
Scheduler should sent request to local executor running on api-server within port and protocol on which api server was run along with local executor.
How to reproduce
Start test run via airflow standalone and verify DAGs run correctly.
Reconfigure api-server to port different than 8080 or enable https.
Enable debug log level.
Run airflow apiserver with above configuration.
Run airflow scheduler. Try to execute any example DAG.
Documentation does not include any details how to force airflow scheduler to use proper port/protocol. I suspect it should be read out from database where airflow api-server should register itself when started.
Thanks for opening your first issue here! Be sure to follow the issue template! If you are willing to raise PR to address this issue please do so, no need to wait for approval.
i am interested in this as well. I thought maybe these would do it , by adding in PATCH to that allow methods; but no dice. I can get everything working if i turn the webserver's SSL off by commenting out the Key / Cert; but when I add those in, I have the same issue.
I added in the execution_api_server_url to be the https:///mydomain.com:8080 , and i added it to the origins, but still had issues
At the end it turned out it was misconfiguration on my end. There is no need to set execution_api_server_url.
I will update and close tomorrow with resolution. Generally 3.0.1 documentation need imporvement with examples.
Nothing more. execution_api_server_url should not be touched.
Incorrect or not modified base_url and port is causing method not allowed errors. Also messing with execution_api_server_url parameter bring unpredicted behaviour.
Activity
boring-cyborg commentedon May 17, 2025
Thanks for opening your first issue here! Be sure to follow the issue template! If you are willing to raise PR to address this issue please do so, no need to wait for approval.
tirkarthi commentedon May 18, 2025
Does changing execution_api_server_url value help here?
https://airflow.apache.org/docs/apache-airflow/stable/configurations-ref.html#execution-api-server-url
SzymonZy commentedon May 19, 2025
It gives some progress
below is diff from ariflow.cfg changes done:
and in venv:
After restart of api-server and scheduler I'm getting error: Method not allowed when dag should run.
Scheduler log:
api-server (webserver) log:
Manual
curl -X PATCH https://FQDN.com:7443/task-instances/0196e744-93cc-7275-9aed-a540b238e934/runreturns
{"detail":"Method Not Allowed"}If run on 8080 and http scheduler log shows that PATCH method is accepted:
Patchus commentedon May 20, 2025
i am interested in this as well. I thought maybe these would do it , by adding in PATCH to that allow methods; but no dice. I can get everything working if i turn the webserver's SSL off by commenting out the Key / Cert; but when I add those in, I have the same issue.
I added in the execution_api_server_url to be the https:///mydomain.com:8080 , and i added it to the origins, but still had issues
SzymonZy commentedon May 20, 2025
At the end it turned out it was misconfiguration on my end. There is no need to set execution_api_server_url.
I will update and close tomorrow with resolution. Generally 3.0.1 documentation need imporvement with examples.
SzymonZy commentedon May 21, 2025
Things that are mandatory if you switch to different port and https seems to be:
base_url = https://FQDN.com:8443
port = 8443
ssl_cert = /cert_path
ssl_key = /key_path
Nothing more. execution_api_server_url should not be touched.
Incorrect or not modified base_url and port is causing method not allowed errors. Also messing with execution_api_server_url parameter bring unpredicted behaviour.