Newbie Help regarding saving to S3/Startup Packages/ and other general questions.

Hello forum. Super new here but managed to drive myself insane getting the where I am at now.

I think I am just starting to get the hang of this, laughably so my comfort is still tenuous.

Project is a live streaming radio show…happens only a couple hours a day on weekdays. The show is a live-record stream so that the audio is available on demand afterwards in perpetuity on the website.

General suggestions on going about this? Should we just have the instance always running? Or start and terminate it for each show? If content is stored in our s3 bucket and we deliver through cloudfront, does an instance have to be running for that?

So I’ve managed to create a startup package for the instance containing what I hoped to be working script from this tutorial: https://www.wowza.com/docs/how-to-use-the-fuse-based-file-system-backed-by-amazon-s3

Below is the init.sh script

#!/bin/sh
mkdir /mnt/s3
echo “XXXXX:YYYYY” > /etc/passwd-s3fs
chmod 640 /etc/passwd-s3fs
/usr/local/bin/s3fs bucket.name -o default_acl=public-read /mnt/s3
/etc/rc.local silencio-archive -o default_acl=public-read /mnt/s3

I get these errors in the wowzastreamingengin_error.log:

HTTPUtils.HTTPRequestToByteArray : java.io.FileNotFoundException: http://169.254.169.254/latest/meta-data/product-codes|at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1834)|at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1439)|at com.wowza.util.HTTPUtils.HTTPRequestToByteArray(HTTPUtils.java:182)|at com.wowza.util.HTTPUtils.HTTPRequestToByteArray(HTTPUtils.java:131)|at com.wowza.wms.plugin.amazonaws.ec2.env.ServerListenerEC2Variables.populateEnvironment(ServerListenerEC2Variables.java:98)|

ERROR server comment 2015-03-04 22:40:21 - - - - - 678.81 - - - - - - - - FileUtils.copyFile2 : java.io.FileNotFoundException: /mnt/s3/myStream_01.mp4 (Transport endpoint is not connected)|at java.io.FileOutputStream.open(Native Method)|at java.io.FileOutputStream.(FileOutputStream.java:213)|at java.io.FileOutputStream.(FileOutputStream.java:162)|at com.wowza.util.FileUtils.copyFile2(FileUtils.java:150)|at com.wowza.wms.module.ModuleMediaWriterFileMover$CopyWorker.run(ModuleMediaWriterFileMover.java:84)|

and this when I try to navigate to the mnt/s3 folder in terminal:

cannot access s3: Transport endpoint is not connected

I feel like I am so close :wink:

Thanks for helping out guys. This has been pretty sobering.

Also, real quick…I keep reading a lot of warnings against saving directly to s3. Is that what this is doing? I think its saving locally and then the ModuleMediaWriterFileMover to move it to the amazon bucket right?

Thanks

J

Hi groovmuffn,

Have you tried unmounting and re-mounting /mnt/s3? You may have to kill the sshfs processes first (or try rebooting your instance, and trying the commands from the console instead of using the shell script).

Michelle

Hi,

Glad it worked out for you! Thanks for updating us.

Michelle

Yeah…I had to run the remount script I think because it became unmounted when I restarted. So then I had to find the place where I placed the mount script so that whenever I rebooted the instance the s3 was remounted. Thanks.