Page MenuHomePhabricator

Unresolved failures from url-downloader
Closed, ResolvedPublic

Description

On September 24th and 25th we observed a period of ~24h where all our requests going through url-downloader were failing, at least for one particular DAG (pageview_wme_transfer, find link below).

It stopped working at 2026-09-24, 12:19:28 UTC, and started working again at 2026-09-25, 12:24:50 UTC. The DAG would fail at the beginning, trying to authenticate with AWS, so we don't know if other URLs could have succeeded.

Logs from one run: https://airflow-platform-eng.wikimedia.org/dags/pageview_wme_transfer/grid?base_date=2026-09-25T07%3A00%3A00Z&dag_run_id=scheduled__2026-09-25T07%3A00%3A00%2B00%3A00&task_id=transfer_partition_0&tab=logs

[2026-09-25, 10:54:51 UTC] {pod_manager.py:358} INFO - [base] botocore.exceptions.CredentialRetrievalError: Error when retrieving credentials from custom-process: 2026/09/25 10:54:50 operation error RolesAnywhere: CreateSession, exceeded maximum number of attempts, 3, https response error StatusCode: 0, RequestID: , request send failed, Post "https://rolesanywhere.us-east-1.amazonaws.com/sessions?profileArn=arn%3Aaws%3Arolesanywhere%3Aus-east-1%3A457151943714%3Aprofile%2F67756a02-cac8-49a3-955b-250b3478eeba&roleArn=arn%3Aaws%3Aiam%3A%3A457151943714%3Arole%2Fwme-pageviews-airflow-role&trustAnchorArn=arn%3Aaws%3Arolesanywhere%3Aus-east-1%3A457151943714%3Atrust-anchor%2F7946f004-a4c5-48e4-b2dd-2a905ec3900d": Forbidden

StatusCode: 0 in particular seems indicative of this failure coming from connecting to url-downloader itself, rather than a downstream error.

Event Timeline

Thanks for the task @KMontalva-WMF.

Looking at the overall usage of the urldownloder hosts throughout that time they were still doing a lot of traffic and making connections, so it doesn't seem there was any general issue with the service.

Specifically in terms of these requests looking at the logs I can see a lot of sucessfull requests to rolesanywhere.us-east-1.amazonaws.com, from the DSE Kubernetes cluster. Unfortunately however I'm not having any luck finding them in Kibana/OpenSearch, just on the box itself, and there they only go back to Sept 26th (all are status 200). Let me keep digging and see if I can turn up the logs for last week.

Thanks Cathal! I think those logs will be valuable to investigate this issue.

To clarify a few things from what was visible in the AWS infrastructure:

All the failed tasks logs clearly showed this pattern --> request send failed

StatusCode: 0
RequestID:
request send failed
...
Forbidden

Hence, this suggests the request may be rejected by the proxy --> urldownloader before reaching AWS. If AWS rejects a call, boto3 will log the return code 4xx or 5xx depending on the error and not a StatusCode: 0
In the Cloutrail events log, the last successful CreateSession event was seen at 11:29 UTC on 24 September 2026. There are no CreateSession events corresponding to the failed task attempts. The timestamps for the initial failed task attempts are listed below:
Attempt 1: 12:19 UTC
Attempt 6: 12:46 UTC

Hence, this suggests the request may be rejected by the proxy --> urldownloader before reaching AWS. If AWS rejects a call, boto3 will log the return code 4xx or 5xx depending on the error and not a StatusCode: 0

Thanks. I suspect the logs may indicate an error at even a lower layer than that. Squid if it rejects a connection will normally return a valid HTTP error code too, I wonder if the zero represents something at a lower level, i.e. the packet could not be transmitted, or did not receive any response.

In the Cloutrail events log, the last successful CreateSession event was seen at 11:29 UTC on 24 September 2026. There are no CreateSession events corresponding to the failed task attempts. The timestamps for the initial failed task attempts are listed below:
Attempt 1: 12:19 UTC
Attempt 6: 12:46 UTC

Thanks I'll focus attention on that time and see if there is anything in the logs.

With fresh eyes the logs are there I was filtering incorrectly. I can see the connection at 12:19 on Sept 24th was rejected with a 403 code by the proxy:

{
  "http.response.bytes": 3533,
  "event.category": [
    "network",
    "web"
  ],
  "labels.hierarchy_status": "HIER_NONE",
  "type": "syslog",
  "facility": "local0",
  "program": "squid",
  "rsyslog.hostname": "urldownloader1004",
  "rsyslog.facility": "local0",
  "host.domain": "wikimedia.org",
  "host.hostname": "urldownloader1004.wikimedia.org",
  "http.request.method": "CONNECT",
  "event.outcome": "unknown",
  "url.domain": "rolesanywhere.us-east-1.amazonaws.com",
  "rsyslog.timereported": "2026-09-24T12:19:40.727649+00:00",
  "url.path": "-",
  "source.ip": "10.68.118.192",
  "@timestamp": "2026-09-24T12:19:40.783Z",
  "host.name": "urldownloader1004",
  "ecs.version": "1.7.0",
  "@version": "1",
  "http.request.referrer": "-",
  "event.type": [
    "access",
    "connection"
  ],
  "severity": "info",
  "event.dataset": "squid.access",
  "rsyslog.severity": "info",
  "rsyslog.programname": "squid",
  "host.ip": "208.80.155.118",
  "service.type": "squid",
  "tags": [
    "input-kafka-rsyslog-shipper",
    "rsyslog-shipper",
    "kafka",
    "es"
  ],
  "logsource": "urldownloader1004",
  "http.version": "1.1",
  "event.duration": "-",
  "url.full": "rolesanywhere.us-east-1.amazonaws.com:443",
  "host": "urldownloader1004",
  "client.ip": "10.68.118.192",
  "event.kind": "event",
  "labels.request_status": "TCP_DENIED",
  "timestamp": "2026-09-24T12:19:40+0000",
  "http.response.status_code": 403,
  "user_agent.original": "Go-http-client/1.1"
}

I need to get to the bottom of why though. I can see the source IP was from the new range for the Kubernetes DSE cluster (10.68.0.0/17), however this range was added to our network constants on September 21st, which should have added it to the Squid proxy ACL at that stage. I'll dig a little further to see if I can work out the reason for this rejection.

Ok I see what happened here. The patch I linked in the above message was merged on the 21st, however due to how the network names are mapped it wasn't added to the Squid ACL until a second patch was made on Sept 25th.

So TL;DR at some point on Sept 24th your jobs were scheduled on K8s hosts using the new IP range for the dse cluster. But due to an mistake in how the new range was named it was not on the Squid ACL of allowed clients at that time. On the 25th the error was spotted and corrected, after which the proxy began allowing the connections again.

Apologies for the mixup here. In terms of actions this is a very rare thing to occur, we almost never have to change IP ranges. The new range for the dse cluster is sufficiently large we do not ever expect to have to revisit, so this should be a one-off that won't happen again.

Thanks very much Cathal for the analysis. AFAIK Enterprise is one of the few airflow DAGs (I am aware of 2 at the least) dependent on the urldownloader, Hence, it would be great to know the following:

  1. How to reach the on-call in case of an emergency?
  2. Do you know the timeline to address this open request: T429175?
  1. Do you know the timeline to address this open request: T429175?

The work there is basically done, the service is now behind our load-balancer layer and we will scale it out that way to meet usage requirements. We have some tidy-up bits like updating docs and upgrading the back-end OS version but that should all be transparent to you guys.

The one thing that is important is to make sure your apps are targeting the HA hostname for the proxy - urldownloader.discovery.wmnet, see here for more info.

  1. How to reach the on-call in case of an emergency?

Tbh I'm not sure what is expeced/agreed on that so I will see if someone in SRE mgmt can engage to iron out those bits.

Ok thanks for sharing the details. We will follow-up with the on-call expectations separately.

cmooney claimed this task.

I'm going to close this one for now as we know the cause.