Author Topic: Another Media URL exceeded redirect limit of 12 (fopen). post (sorry)  (Read 216 times)

liedra

  • Rookie
  • *
  • Posts: 3
Hi all,
I have been using the wordpress plugin for a couple of years now and up until about 6 months ago it was verifying my MP3 files just fine; it's stopped doing it and is producing the "Media URL exceeded redirect limit of 12 (fopen)." error.
I self-host and have looked through all my apache logs and everything seems to be fine, so I'm not sure what the problem is at all. I have been posting for a while without the verification but I've noticed that this means iTunes doesn't list the length of the podcast episode so while it's not mission critical it's definitely annoying.

A sample URL that it is trying to verify is https://www.notjustagame.eu/podcast/13_Women_Who_Play_Games.mp3

I tried using curl manually and it seems to work:


liedra@liedra:~$ curl -v -0 --output test.mp3 https://www.notjustagame.eu/podcast/13_Women_Who_Play_Games.mp3
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0*   Trying 178.79.143.39...
* TCP_NODELAY set
* Connected to www.notjustagame.eu (178.79.143.39) port 443 (#0)
* ALPN, offering http/1.1
* successfully set certificate verify locations:
*   CAfile: none
  CApath: /etc/ssl/certs
} [5 bytes data]
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
} [214 bytes data]
* TLSv1.2 (IN), TLS handshake, Server hello (2):
{ [112 bytes data]
* TLSv1.2 (IN), TLS handshake, Certificate (11):
{ [2810 bytes data]
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
{ [300 bytes data]
* TLSv1.2 (IN), TLS handshake, Server finished (14):
{ [4 bytes data]
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
} [37 bytes data]
* TLSv1.2 (OUT), TLS change cipher, Client hello (1):
} [1 bytes data]
* TLSv1.2 (OUT), TLS handshake, Finished (20):
} [16 bytes data]
* TLSv1.2 (IN), TLS handshake, Finished (20):
{ [16 bytes data]
* SSL connection using TLSv1.2 / ECDHE-RSA-CHACHA20-POLY1305
* ALPN, server accepted to use http/1.1
* Server certificate:
*  subject: CN=notjustagame.eu
*  start date: Aug 29 05:43:16 2018 GMT
*  expire date: Nov 27 05:43:16 2018 GMT
*  subjectAltName: host "www.notjustagame.eu" matched cert's "www.notjustagame.eu"
*  issuer: C=US; O=Let's Encrypt; CN=Let's Encrypt Authority X3
*  SSL certificate verify ok.
} [5 bytes data]
> GET /podcast/13_Women_Who_Play_Games.mp3 HTTP/1.0
> Host: www.notjustagame.eu
> User-Agent: curl/7.61.0
> Accept: */*
>
{ [5 bytes data]
< HTTP/1.1 200 OK
< Date: Mon, 08 Oct 2018 14:47:07 GMT
< Server: Apache/2.4.34 (Debian)
< Last-Modified: Sat, 29 Sep 2018 15:36:19 GMT
< ETag: "287b6ea-577045564c4a8"
< Accept-Ranges: bytes
< Content-Length: 42448618
< Connection: close
< Content-Type: audio/mpeg
<
{ [5 bytes data]
100 40.4M  100 40.4M    0     0   192M      0 --:--:-- --:--:-- --:--:--  192M
* Closing connection 0
} [5 bytes data]
* TLSv1.2 (OUT), TLS alert, Client hello (1):
} [2 bytes data]
liedra@liedra:~$ file test.mp3
test.mp3: Audio file with ID3 version 2.3.0, contains:MPEG ADTS, layer III, v1, 192 kbps, 44.1 kHz, Monaural

And the associated apache log:

178.79.143.39 - - [08/Oct/2018:14:47:07 +0000] "GET /podcast/13_Women_Who_Play_Games.mp3 HTTP/1.0" 200 42506597 "-" "curl/7.61.0"

Now when I use the verify URL option in the plugin I get the error and the following apache log:

178.79.143.39 - - [08/Oct/2018:14:42:18 +0000] "GET /podcast/13_Women_Who_Play_Games.mp3 HTTP/1.0" 301 619 "-" "Blubrry PowerPress/7.4"
(x12 repeats of the above message)

which indicates it's getting the 301 redirect - is it ignoring the https and going for the http URL instead? it seems to be a slightly different byte count - 619 bytes instead of 356 when I use curl to download the 301 message.

I honestly don't know what else to test, php-curl is up to date on my server.
Thanks for any assistance.

Shawn Thorpe

  • Administrator
  • Hero Member
  • *****
  • Posts: 2060
Re: Another Media URL exceeded redirect limit of 12 (fopen). post (sorry)
« Reply #1 on: October 08, 2018, 12:45:43 pm »
I just tested your media file URL with my own test WordPress site and the media verified successfully. That means the problem may be due to something on your site's server. You may want to contact support for the company hosting your site and see if they can find anything in their logs.

You can also always set the duration and file size manually when you publish your episodes.

liedra

  • Rookie
  • *
  • Posts: 3
Re: Another Media URL exceeded redirect limit of 12 (fopen). post (sorry)
« Reply #2 on: October 08, 2018, 03:44:49 pm »
Thanks! Now I know it's definitely me I'll keep poking things. (Sadly I'm the server admin too, so it's probably something in my php config that isn't happy.)

Cheers!

liedra

  • Rookie
  • *
  • Posts: 3
Re: Another Media URL exceeded redirect limit of 12 (fopen). post (sorry)
« Reply #3 on: October 08, 2018, 04:50:13 pm »
I'm starting to narrow down the problem - there is some issue with some setting somewhere for my virtual host vs. my main host. There seems to be no problems if the MP3 is hosted on my main default server (which doesn't run wordpress), but if I host it from any of my virtual hosts it runs into problems. Now to work out what is going on - is it a wordpress thing, a virtual host thing, or what?

(I'm posting this purely for others who maybe have this problem too!)

Shawn Thorpe

  • Administrator
  • Hero Member
  • *****
  • Posts: 2060
Re: Another Media URL exceeded redirect limit of 12 (fopen). post (sorry)
« Reply #4 on: October 09, 2018, 12:16:53 am »
Thanks for the update. You're digging into stuff that's way beyond me, so best of luck sorting it out! When you determine what the cause of the problem is, please report back and let us know.