Page MenuHomePhabricator

404 error for SVG image thumbnail in UploadWizard on Beta Cluster
Open, Needs TriagePublic

Description

Steps to reproduce:

  1. Firefox 81
  2. Go to https://commons.wikimedia.beta.wmflabs.org/wiki/Special:UploadWizard?debug=true
  3. Upload an SVG image

Expected outcome:

A preview of the uploaded image

Actual outcome:

No preview of the uploaded image; 404 error for the thumbnail URL

ScreenshotUW20201015-X.png (991×1 px, 380 KB)

ScreenshotUW20201015-X.png (991×1 px, 131 KB)
(Width of text is already covered in T265560)

Event Timeline

GET https://commons.wikimedia.beta.wmflabs.org/wiki/Special:UploadStash/thumb/17u5na7o73s0.tjfqsy.7675.svg/120px-17u5na7o73s0.tjfqsy.7675.svg.png?0.3363587637054679=

404 response headers
HTTP/2 404 Not Found
date: Thu, 15 Oct 2020 15:23:55 GMT
server: deployment-mediawiki-07.deployment-prep.eqiad.wmflabs
x-content-type-options: nosniff
vary: Accept-Encoding
x-request-id: X4hpi6wQBHcAAHCkB1wAAABR
content-type: text/html; charset=utf-8
content-encoding: gzip
age: 0
x-cache: deployment-cache-text06 miss, deployment-cache-text06 pass
x-cache-status: pass
server-timing: cache;desc="pass"
report-to: { "group": "wm_nel", "max_age": 86400, "endpoints": [{ "url": "https://intake-logging.wikimedia.org/v1/events?stream=w3c.reportingapi.network_error&schema_uri=/w3c/reportingapi/network_error/1.0.0" }] }
nel: { "report_to": "wm_nel", "max_age": 86400, "failure_fraction": 0.05, "success_fraction": 0.0}
x-client-ip: ****
cache-control: private, s-maxage=0, max-age=0, must-revalidate
content-length: 316
X-Firefox-Spdy: h2
404 response content
<!DOCTYPE html>
<html><head><title>Not Found</title></head>
<body><h1>Not Found</h1><p>Fetching thumbnail failed: Array ( [0] =&gt; Array ( [0] =&gt; http-curl-error [1] =&gt; Could not resolve host: deployment-imagescaler01.deployment-prep.eqiad.wmflabs ) [1] =&gt; Array ( [0] =&gt; http-bad-status [1] =&gt; 0 [2] =&gt; Error ) ) URL = http://deployment-imagescaler01.deployment-prep.eqiad.wmflabs:8800/wikipedia/commons/thumb/temp/c/c9/20201015152337%21phpkkjpvE.svg/120px-20201015152337%21phpkkjpvE.svg.png</p></body></html>

The same thing happens in Special:UploadStash. The SVG file itself is intact in the upload stash.

According to https://wikitech.wikimedia.org/wiki/Release_Engineering/SAL#2020-10-05, deployment-imagescaler01 was deleted on 2020-10-05 due to T257118: Beta cluster has reached its quota.

I think that URL is being set as the thumbProxyUrl in wmf-config/filebackend.php:

'thumbProxyUrl' => $wmfSwiftConfig[$wmfDatacenter]['thumborUrl'] . '/' . $site . '/' . $lang . '/thumb/',

That URL is then used by outputRemoteScaledThumb instead of using UploadStashScalerBaseUrl.

The configuration values used for thumbProxyUrl are stored in PrivateSettings.php, so I can't see them to investigate further. It doesn't look like this is a Thumbor issue.

After AntiComposite told me which mistake I did (not using uploadwizzard), I was able to reproduce. I fixed the specification of the imagescaler in PS.php:

urbanecm@deployment-deploy01:/srv/mediawiki-staging/private$ git diff HEAD~ HEAD
diff --git a/PrivateSettings.php b/PrivateSettings.php
index 671c49d..8b3ec5e 100644
--- a/PrivateSettings.php
+++ b/PrivateSettings.php
@@ -46,7 +46,7 @@ $wmfSwiftConfig = array( 'eqiad' => array(
         'key'                => 'REDACTED',
         'cirrusKey'          => 'REDACTED',
         'tempUrlKey'         => 'REDACTED',
-        'thumborUrl'         => 'http://deployment-imagescaler01.deployment-prep.eqiad.wmflabs:8800',
+        'thumborUrl'         => 'http://deployment-imagescaler03.deployment-prep.eqiad.wmflabs:8800',
        'thumborSecret'      => 'REDACTED',
 ) );

urbanecm@deployment-deploy01:/srv/mediawiki-staging/private$

and the error changed to Fetching thumbnail failed: Array ( [0] => Array ( [0] => http-bad-status [1] => 404 [2] => Not Found ) ) URL = http://deployment-imagescaler03.deployment-prep.eqiad.wmflabs:8800/wikipedia/commons/thumb/temp/f/fe/20201016160354%21phpXVvs65.svg/120px-20201016160354%21phpXVvs65.svg.png.