latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Podcast Audio File Streaming Error

Home Forums Community Forum Podcast Audio File Streaming Error

This topic contains 46 replies, has 4 voices. Last updated by  Cristián Lávaque 3 years, 8 months ago.

Page 2 Of Topic Replies

Viewing 21 replies - 26 through 46 (of 46 total)
Author Replies
Author Replies
Posted: Monday Apr 15th, 2013 at 7:26 am #47481

Thank you Cristian,

I get a 404 error if I use that link with our domain and our file name.

Posted: Tuesday Apr 16th, 2013 at 4:09 am #47588

I see. Well, keep tryingyuntil you can make the file URL work, then take it from there, using it in the player or adding more variables. Did you try this?

http://ourdomain.com/wp-content/plugins/s2member-files/filename.mp3

By the way, just in case, remember to use the www or not, just as you have it in your site. Knowledge Base » Don't Mix www, — and Without!

Posted: Tuesday Apr 16th, 2013 at 7:11 am #47601

Thank you Cristian,

On our live site we’ve made the S3 bucket public so that our podcast will continue to serve–it should be member only.

On our staging site we have the default bucket setup, with default s2Member S# and CloudFront distributions.

On our staging site we have a subdomain so we do not use the www there, as we do on live.

This link format:

http://ourdomain.com/wp-content/plugins/s2member-files/filename.mp3

…also fails with a 404 error.

I really, really need to get the URL signing working with s2Member and these files from the Amazon S3 bucket using CloudFront streaming.

They download but will not stream.

Please help me figure out what’s going on here–we’re into week number three with s2Member generated URLs not working for streaming.

I’m at the point where we may need to abandon s2Member for authenticating links and move to a signed URL generator. I don’t want to do that because s2Member should work.

Can we escalate this and get it resolved? I’d like to give you our live site and our staging site logins and see what you guys discover.

We pay for s2Member Pro. And we’d love to pay for s2Member Premium Support.

We have a paying membership over 10,000 and the podcasts are now unauthenticated for three weeks becuase s2Member cannot make a signed URL for streaming.

Thank you for your continued support.

Chris

Posted: Tuesday Apr 16th, 2013 at 7:36 am #47603

We don’t have premium support, but I’ll be glad to help you resolve this.

s2Member file protection works, but there’s obviously something wrong in your installation that needs to be found.

You can send the login info using the contact form. Send it twice, once for each site, but if only one, make it the tests one, please. If you’re okay with it, also include the Amazon info, so I can see what’s up on that side of the integration. s2Member® » Private Contact Form

By the way, have you tried resetting the integration and configuring it again? Knowledge Base » Reset the Amazon S3/CloudFront integration

Posted: Wednesday Apr 17th, 2013 at 7:54 am #47657

Hello Cristian,

The above link also gives a 404:

http://ourdomain.com/?s2member_file_storage=s3&s2member_skip_confirmation=yes&s2member_file_download=/filename.mp3

I’m sending the info you requested via the private contact form.

Thank you,

Chris

Posted: Thursday Apr 18th, 2013 at 7:04 am #47768

Thanks, got the email and spent some time reviewing your installation.

It has so many things that I’m not sure if it’s the live or the tests installation, so I wasn’t sure I could just change things to test freely. Could you confirm?

Also, with so many things it’s hard to test. It’s better to start with a clean installation, which is what I thougth the tests one would be to eliminate the possibility of conflicts. But this has lots of plugins and even must-use plugins active.

Even if it’s the tests installation, I can’t deactivate them. Seems to be a child blog in a network and I’m not shown the plugins list.

When I tried loading a file from the Amazon bucket you chose for the s2Member protection, using the mod-rewrite I got a 404, but it was a different 404 than the one I got when trying to load a made-up filename from another directory. The s2member-files one gave a WP Engine message, but the other one didn’t. If I used the test.txt filename which you uploaded to the actual s2member-files folder, the file was served just fine, when it should have given a 404 because it isn’t in the bucket. It seems the mod-rewrite is not working, although the .htaccess in s2member-files seems fine. I’m guessing that WP Engine may have something to do with this.

When I tried the address with the querystring, the integration with Amazon worked. Your URL above is wrong, you have a slash before the filename, try just the filename.

http://ourdomain.com/?s2member_file_download=filename.mp3

Anyway, it went to Amazon alright, but I was getting an “Access Denied” message, so I took a look at your Amazon integration. The S3 credentials seemed fine, but the CloudFront private key had different line lengths from the one you sent in the email, so I tried entering it again, ticking the box to auto-configure and saved. s2Member gives me this message, though:

Unable to auto-configure Amazon® CloudFront Distributions.
Error code: -95. Error Message: Unable to delete existing Amazon® CloudFront Streaming Distro. Existing Amazon® CloudFront Distro cannot be deleted at this time. Still in a `pending` state after having been disabled by s2Member. Please wait 15 minutes, then try again. There is a certain process that s2Member must strictly adhere to when re-configuring your Amazon® CloudFront Distros. You may have to tick the auto-configure checkbox again, and re-run s2Member’s auto-configuration routine many times, because s2Member will likely run into several `pending` challenges, as it works to completely re-configure your Amazon® CloudFront Distros for you. Thanks for your patience. Please wait 15 minutes, then try again.

I already tried it a second time after 15 minutes and got the message again. So I removed the CF credentials and left only the S3 integration to test the file download with that. It worked fine and I could get the MP3 file I tried. So the problem seems to be in the CF integration configuration you had.

Could you please reset the CF integration and then reconfigure it all making sure you use the correct credentials? Remember that from the pair you have to enter the contents of your pk-[***].pem file, the private key, not the public key. Knowledge Base » Reset the Amazon S3/CloudFront integration

Posted: Thursday Apr 18th, 2013 at 1:43 pm #47795

Thank you for the help Cristian,

1. It is the staging install. The live site is completely separate.

2. I added you as an admin to the site, but I forgot to add you as a network admin–I’ll do that now. Done (“Important: This user has super admin privileges.”).

3. I’ll ping WPEngine about this:

” It seems the mod-rewrite is not working, although the .htaccess in s2member-files seems fine. I’m guessing that WP Engine may have something to do with this.”

4. Thanks for the catch on the URL with the slash before the file name–that was a typo. The real URL works for the download.

5. The CF distribution worked fine and setup fine.

6. I include the full contents of the .pem files (including the —–BEGIN RSA PRIVATE KEY—– and —–END RSA PRIVATE KEY—–).

7. I’m also testing the account, bucket and s2Member created distributions on a bare bones site install on WPEngine. This will eliminate any issues with theme or plugins. It’s the default 2012 WP theme with only s2Member installed.

8. When I set up this S3 bucket I went with the default settings. Then I entered the correct security credentials and s2Member successfully configured the two CloudFront distributions. So I don’t understand the errors with the distributions you mentioned. ANd I don’t understand the need to redo it–it was working, both Download and Streaming distributions were set up and enabled on the AWS side. And the download worked–only streaming fails.

Is it possible for you to give me an example of a perfect streaming URL format? Is this the correct URL to use when s2Member has our bucket, keys and has created the CloudFront distributions:

http://ourdomainname.com/wp-content/plugins/s2member-files/s2member-file-remote/s2member-file-inline/ourfilename.mp3

…or did any part of this change recently?

/wp-content/plugins/s2member-files/s2member-file-remote/s2member-file-inline/

…or is there a more preferred URL?

E.g.

http://www.domainname.com/s2member-this/s2member-that?andfilename=filename.mp3

That way I can stop trying all the different examples and use one that is known by s2Member to work.

And again, we’ve only got a streaming issue on our live and staging sites–download works.

I’ll update with what I discover on the bare bones site.

Thanks,

Chris

Posted: Thursday Apr 18th, 2013 at 2:19 pm #47797

Hello Cristian,

I finished setting up s2Member and AWS on the new bare bones site.

Everything set up correctly (s2Member, S3 credentials and bucket, as well as the CloudFront credentials and the s2Member created download distribution and streaming distributions).

On the AWS side both of these distributions are created and enabled.

Download works:

http://www.ourdomain.com/?s2member_file_storage=s3&s2member_skip_confirmation=yes&s2member_file_download=filename.mp3

…and streaming fails:

http://www.ourdomain.com/wp-content/plugins/s2member-files/s2member-file-remote/s2member-file-inline/filename.mp3

This is using the same AWS account and S3 bucket as mentioned and tested above. The bucket was created and left as default–which Amazon AWS recommends. And it is secured.

The download and streaming distributions are new and created by s2Member. They are enabled.

So a bare bones site with s2Member and AWS info–no other plugins–fails to stream.

Streaming worked three weeks ago, before I started this ticket. Something changed between WPEngine, s2Member and AMazon AWS–and it also affects this bare bones site. I now see that the theme and plugins are not part of the problem.

Chris

Posted: Friday Apr 19th, 2013 at 7:44 am #47864
Cristian
Username: clavaque

Streaming worked three weeks ago, before I started this ticket. Something changed between WPEngine, s2Member and AMazon AWS–and it also affects this bare bones site. I now see that the theme and plugins are not part of the problem.

Thanks for your tests without the other plugins and theme.

Yes, something seems to have changed with one of those three, and I’m guessing it’s WP Engine. I just tested the mod-rewrite format with a file in my own test installation with Amazon S3+CF integration, and I could download the files just fine using the same URL format you’re having trouble with:

http://www.ourdomain.com/wp-content/plugins/s2member-files/s2member-file-remote/s2member-file-inline/filename.mp3

I just tested again and there’s definitely something wrong with your mod-rewrite.

Now, I don’t know if it’s a requisite to use that format for your streaming, maybe the querystring one is good enough for your use? But it’d still be good to have your hosting solve the mod-rewrite issue.

If you try /wp-content/plugins/s2member-files/filename.mp3 (a file you have in your S3 bucket), you’ll see a 404 that mentions WP Engine in the footer, but if you try /wp-content/plugins/lkjdfsjlkdlfs.html you’ll get a different 404 without the WP Engine mention. I find this odd, but is what made me thing the problem may be with their configuration.

Posted: Friday Apr 19th, 2013 at 11:22 am #47878

Hey Cristian,

Thank you for the help.

I’m now monkey-in-the-middle.

I posted this at WPEngine support:

“…we gave s2Member Admin access to our site on WPEngine as well as admin access to our AWS Amazon account. They logged in and did testing and came back with many things. They also mentioned:

“‘It seems the mod-rewrite is not working, although the .htaccess in s2member-files seems fine. I’m guessing that WP Engine may have something to do with this.’

They responded:

Thanks for your message! I would be happy to look into it further. Can you please elaborate on how the mod-rewrite may not be working? Can you explain to me how to replicate the error?

I don’t know what to tell them about the mod-rewrite.

I’ll copy and paste some of the info you’ve shared above.

Lastly, can I please get you logins to the bare bones site we made that also fails?

Thank you,

Chris

Posted: Friday Apr 19th, 2013 at 11:25 am #47879

Cristian,

An important clarification…

You mention, ” I just tested the mod-rewrite format with a file in my own test installation with Amazon S3+CF integration, and I could download the files just fine…”

We can also download without any problems.

This is a streaming only issue.

All of our video files download and stream.
All of our audio files download.
None of our audio files stream.

This was not the case three weeks ago.

Thanks,

Chris

Posted: Friday Apr 19th, 2013 at 3:51 pm #47891

Hey Cristian,

I setup everything again on a completely different offsite server (at another host).

This is a bare bones install on a multisite also.

All the “s2Member loves Amazon AWS S3 and CloudFront” setups worked perfectly.

Here are the link structures I’m testing with:

STREAMING

/wp-content/plugins/s2member-files/s2member-file-remote/s2member-file-inline/

DOWNLOAD

/?s2member_file_storage=s3&s2member_skip_confirmation=yes&s2member_file_download=

– – –

Logged in results

Download = works perfectly.

Streaming = this error:

This XML file does not appear to have any style information associated with it. The document tree is shown below.

<Error>
<Code>NoSuchKey

The specified key does not exist.
tyt-20130322B.mp3
8B77A5EA33C73999
59Fx4zPHCcWRzTDme/mOHb1OfazWIfOWHUOOa8UJGQuUwki/hPjqNuSMDmObWZLM

– – –

Logged out results

Download = Taken to Member Options page.

Streaming = Authentication requested!!!!!! So that is working again–however (but), after authenticating correctly I get a 404 error (I tested with two unique user accounts).

– – –

So I’m getting different results on a non-WPEngine server.

That’s all there is and there is no more.

Your thoughts?

Chris

Posted: Friday Apr 19th, 2013 at 5:07 pm #47894

Thanks for your new tests and updates. I’ll ask Jason about the stream error you quoted. Did you ask Amazon support about it?

What software are you opening the mp3 with to stream it? Could you tell me step by step how to reproduce the error? Does it happen with other similar software too?

Sure, you can send the info for the new installation you tried last. s2Member® » Private Contact Form

Posted: Monday Apr 22nd, 2013 at 10:21 pm #48141

Jason reviewed your site and he agrees that you have a problem with mod-rewrite in that directory. This is what he said:

Yes, Mod-Rewrite on this site is broken in some way. It appears to be a compatibility problem. I am investigating that. However, you are correct. A standard link with a query string will suffice if rewrite is broken.

It appears that his web server has disabled Mod-Rewrite in this directory for some reason. I don’t see this as an s2Member compatibility issue really, more of a web hosting compatibility issue in my opinion.

It appears that one of the following could be causing the issue with Mod-Rewrite.

His Apache configuration does not FollowSymLinks
This line inside /s2member-files/.htaccess is failing for some reason:

Options +FollowSymLinks -MultiViews -Indexes

See also: http://httpd.apache.org/docs/2.2/mod/core.html#options

The underlying problem is not that s2Member’s .htaccess file is not working, it’s that his web server is not even reading that file. It pretends like it’s not even there. Which also means that any files in that directory (/s2member-files/) are NOT being protected in any way.

He should stick with query string format for his links, and stick with S3 as his storage engine for s2Member.

Or contact the hosting company to resolve this issue with s2Member’s .htaccess file not working.

Or switch hosting providers.


/wp-content/plugins/s2member-files/s2member-file-remote/s2member-file-inline/

That uses the mod-rewrite rules, so it won’t work for you until its resolved. You can use the normal querystring format, though:

http://yoursite.com/?s2member_file_inline=yes&s2member_file_remote=yes&s2member_file_download=pg-20130321.mp3

Posted: Tuesday Apr 23rd, 2013 at 9:35 am #48191

Hello my friends,

Thank you for the updates and solution.

I copied the info to WPEngine so that they can take a look at resolving this on their servers.

Meantime…

I tested the normal query string on our live, staging, and sandbox sites, as well as on the bare bones install I did on WPEngine, and another bare bones install I did on a separate premium shared host.

Most interesting was that our live site, which has the buckets set to full public access–required authentication using this link. Then the streaming worked.

Our Staging, Sandbox, Bare bones and the Bare bones unique host site all use the same test Amazon AWS account, same S3 bucket, but of course each use their own unique s2Member generated CloudFront distributions.

I tested in logged in browsers and in logged out browsers. The result was the same each time.

Our Staging installation and my non-WPEngine hosted installation asked for authentication, and then began streaming!

However the Sandbox and the Bare bones installs on WPEngine, which use the same account info–asked for authentication and then gave this error:

<code>
This XML file does not appear to have any style information associated with it. 
The document tree is shown below.
<Error>
<Code>AccessDenied</Code>
<Message>Access Denied</Message>
<RequestId>F7F28F82C235FF66</RequestId>
<HostId>
AKwX4CxJcViNOs7xK0JL+Anee2M9tUoyzdSFGoEotXlK2vNBZ0AhV8itB83Ff2kM
</HostId>
</Error>
</code>

That seems crazy because all four use the same AWS info and have the same settings in s2Member.

When I set up each of the sites, I diligently flushed the AWS info using the s2-hack PHP file method, then entered only the S3 info and saved. Then I entered the CloudFront info and saved. In all four instances the CloudFront distributions set up perfectly when I saved the s2Member settings.

– – –

The only reason this is a concern is because now my next step is to go to the Live site and do two things:

A. Set the S3 bucket back to default settings so that it always authenticates for all files, and
B. Begin using the standard query string for all audio streaming files.

…the concern comes in that two of four sites don’t work. And while the main goal is to reestablish authenticaiton on our live site, it would also be nice to set up our Staging and Sandbox sites to use the same AWS account and S3 bucket as we do on the live site.

Any thoughts on how that will work or fail? …and advice?

Thank you,

Chris

Posted: Tuesday Apr 23rd, 2013 at 12:56 pm #48200

Hey good people,

Another item…

We use BluBrry PowerPress, and in the podcast posts, Podcast Episode meta box, the Media URL field has a “Verify Media” button. We can click this after we enter the URL and it will check the file and give a message (E.g. “Media verified successfully. “).

However, when I use the above query string URL:

http://www.domain.com/?s2member_file_inline=yes&s2member_file_remote=yes&s2member_file_download=filename.mp3

…we know the media file is there, but the Verify Media message says, “Media URL contains characters that may cause problems for some clients. For maximum compatibility, only use letters, numbers, dash – and underscore _ characters only.”

While I need media authentication back again, I don’t want to create a trickle down problem where our site is working as it should but now some media players cannot access the files.

Do you have some insight into this issue where the s2Member query string may not work on some devices?

Thank you,

Chris

Posted: Tuesday Apr 23rd, 2013 at 7:48 pm #48232

…we know the media file is there, but the Verify Media message says, “Media URL contains characters that may cause problems for some clients. For maximum compatibility, only use letters, numbers, dash – and underscore _ characters only.”

We made the mod-rewrite format available, to avoid the problem with some video players that don’t like a querystring, so it doesn’t surprise me that you get that warning for the podcast players.

Our Staging installation and my non-WPEngine hosted installation asked for authentication, and then began streaming!

However the Sandbox and the Bare bones installs on WPEngine, which use the same account info–asked for authentication and then gave this error:

Seems to be a problem with WP Engine too, although I’m not sure what. Did you use the mod-rewrite format in that test too?

The best solution will be to have WP Engine work correctly, I guess. It was working until a few weeks ago, from you said, so it’s not impossible.

Posted: Wednesday Apr 24th, 2013 at 3:40 am #48264

Hello Cristian,

I tested the query string format on two podcast posts from last Friday, April 19, 2013.

And when I saved the posts it gave this error at the top of the page (above where it said the post was updated):

Error [http://www.domain.com/?s2member_file_inline=yes&s2member_file_remote=yes&s2member_file_download=file.mp3]: Unable to determine content type of media (e.g. audio/mpeg). Verify file extension is correct and try again.

And then I tested the link by checking our podcast in itunes for that day–and it worked.

However I’ve since discovered that the two podcast posts didn’t save that new query string URL–they reverted to the old URL. So BluBrry PowerPress stripped out the query string URL.

That leaves us with the option to get WPEngine to repair the mod rewrite URL.

I’ll keep this thread updated with our progress for others to reference.

Thank you,

Chris

Posted: Wednesday Apr 24th, 2013 at 6:20 am #48266

Okay, thanks for the update. I hope they help you solve it soon. :)

Posted: Friday Apr 26th, 2013 at 10:13 am #48490

Hello Cristian,

Here’s what WPEngine has done:

"...setup an Nginx rule which should allow .htaccess rules to properly apply to files in your /wp-content/plugins/s2member-files/ directory."

So I’m testing with the mod rewrite URL from above:

/wp-content/plugins/s2member-files/s2member-file-remote/s2member-file-inline/

I’ll let you know what happens.

Chris

Posted: Saturday Apr 27th, 2013 at 7:04 am #48547

Great! Looking forward to good news. :)

Viewing 21 replies - 26 through 46 (of 46 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.