03-24-2025
misul
Fluorite | Level 6
Member since
02-09-2022
- 5 Posts
- 1 Likes Given
- 0 Solutions
- 2 Likes Received
-
Latest posts by misul
Subject Views Posted 470 03-14-2025 03:23 AM 575 03-11-2025 08:26 AM 642 03-10-2025 05:04 AM 811 03-07-2025 02:37 AM 915 03-04-2025 12:09 PM -
Activity Feed for misul
- Posted Re: sas-airflow-provider TCP keep alive on Administration and Deployment. 03-14-2025 03:23 AM
- Posted Re: sas-airflow-provider TCP keep alive on Administration and Deployment. 03-11-2025 08:26 AM
- Posted sas-airflow-provider TCP keep alive on Administration and Deployment. 03-10-2025 05:04 AM
- Got a Like for Re: sas-airflow-provider OAuth. 03-07-2025 10:15 AM
- Posted Re: sas-airflow-provider OAuth on Administration and Deployment. 03-07-2025 02:37 AM
- Liked Re: sas-airflow-provider OAuth for gwootton. 03-07-2025 02:37 AM
- Posted sas-airflow-provider OAuth on Administration and Deployment. 03-04-2025 12:09 PM
-
Posts I Liked
Subject Likes Author Latest Post 2 -
My Liked Posts
Subject Likes Posted 2 03-07-2025 02:37 AM
03-14-2025
03:23 AM
It seems that TCP keep-alive logic in production environments may not be sufficient. Most likely, there will be a WAF and load balancers between the client and the server. TCP keep-alive will only cover the client-WAF connection, but load balancers may still impose restrictions. A better approach would be to initiate the command in the background without waiting for a response, then separately check the status and retrieve the results, ideally in the same Airflow task.
... View more
03-11-2025
08:26 AM
Thank you. I will try adding some TCP keep-alive logic. Something similar was discussed here: https://blog.panagiks.com/2019/05/python-tcp-keepalive-on-http-request.html
... View more
03-10-2025
05:04 AM
Hello, I am experimenting with the sas-airflow-provider (https://github.com/sassoftware/sas-airflow-provider). I am trying to use the SASJobExecutionOperator to launch SAS Job Definition objects from Airflow. Note: I am using SAS Viya 3.5, not 4.0! It seems that any SAS job which lasts more than 10 minutes gets this message on the Airflow side (the SAS job runs as long as needed without any issues): requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer')). Most likely, it is related to a WAF timeout: the connection is terminated after 10 minutes of inactivity. Does the SASJobExecutionOperator or SAS Hook have a TCP keep-alive option, or can I pass this option somehow? If I understand correctly, the SAS Hook under the hood uses Python's requests.Session , which implicitly supports keep-alive for HTTP connections, or is that not the case? Mindaugas
... View more
03-07-2025
02:37 AM
2 Likes
You were right; this was a WAF-related issue. We had an IP filter for access, and after adding the IP to the whitelist, everything works fine!
... View more
03-04-2025
12:09 PM
Hello, I am experimenting with sas-airflow-provider (https://github.com/sassoftware/sas-airflow-provider). I am trying to use the SASJobExecutionOperator to launch SAS Job Definition objects from Airflow. Note: I am using SAS Viya 3.5, not 4.0! Everything worked in the development environment, where we have fewer restrictions, but I am missing something in production. Everything is as straightforward as in the documentation: 1. Task to execute SAS code using a SAS Job: sas_job_1_task = SASJobExecutionOperator(
task_id='airflow-sas-job-example-1',
job_name='/Public/Airflow/airflow-sas-job',
connection_name='sas_default',
job_exec_log=True,
add_airflow_vars=True,
parameters={
**job_parameters,
"code_name": "airflow-sas-code.sas"
},
dag=dag,
) 2. sas_default connection: 3. Airflow log file: {base.py:84} INFO - Retrieving connection 'sas_default'
{sas.py:55} INFO - Using custom TLS CA certificate bundle file
{sas.py:63} INFO - Creating session for connection named sas_default to host https://mycompany.com/
{sas.py:83} INFO - Get oauth token (see README if this crashes)
{taskinstance.py:3311} ERROR - Task failed with exception
<...>
requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer')) 4. No sessions were created on the SAS Viya side. My guess is that something is missing related to OAuth. For the connection, I provide only the SAS Viya user and password, as well as a certificate, but no OAuth token. Among the parameters sent to SAS Viya, I believe there are default values related to authorization, as shown below: Basic {base64(client_id:client_secret)} client_id defaults to "sas.cli" client_secret defaults to an empty string But this shouldn't be a problem, right? I'm not sure how to proceed or resolve this issue, not much expertise in this area. Mindaugas
... View more