sassoftware / sas-airflow-provider

Apache Airflow Provider for creating tasks in Airflow to execute SAS Studio Flows and Jobs.
Apache License 2.0
18 stars 15 forks source link

error: HTTPSConnectionPool - Failed to establish a new connection: [Errno 110] Connection timed out #13

Open jordan-mow opened 1 year ago

jordan-mow commented 1 year ago

SAS Viya information -

Version: Long-Term Support 2023.03 Release: 20230620.1687221111013

Currently trying to execute an example DAG provided in the git repository. Made sure that /Public/Airflow/demo_studio_flow_1.flw exists within the environment, yet am still unable to run the DAG successfully.

Here is the abridged log from the run attempt attached.

20230622-airflow-dag-failure.txt

I've run the command the Airflow Provider is trying to execute via Postman and can see the following - URL - {{protocol}}://{{url}}/studioDevelopment/code Body - { "reference": { "type": "content", "path": "/Public/Airflow/demo_studio_flow_1.flw", "mediaType": "application/vnd.sas.dataflow" }, "initCode": true, "wrapperCode": false }

And I get the appropriate response -

{ "code": "" }

Any guidance on how to navigate this would be appreciated.

AndrewShakinovsky-SAS commented 1 year ago

If you look at the log, you will see this: airflow.exceptions.AirflowException: SASStudioFlowOperator error: HTTPSConnectionPool(host='URL', port=443): Max retries exceeded with url: /studioDevelopment/code (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f31918ca1d0>: Failed to establish a new connection: [Errno 110] Connection timed out'))

Note that it says host="URL" It looks like you are trying to connect to 'URL' instead of to your Viya deployment. You should configure your sas connection in Airflow ui correctly.

jordan-mow commented 1 year ago

Sorry, I should of been more explicit. I've replaced the actual URL with URL just for safety concerns. It is using the correct URL in actuality.

AndrewShakinovsky-SAS commented 1 year ago

In that case, it sounds like it's unable to connect from the airflow worker to your Viya deployment. Since you are able to connect via postman, Viya is accessible, but it sounds like it's not accessible from the airflow worker. You might need to consult airflow docs. You could also try running Airflow standalone on your local machine to see if its able to connect.