Problem with running startup script package

Hi,

I’m trying to follow the (EC2 Wowza guide) on page 23. I want to try and automate my install with startup packages. However, I get the following in the wowzastreamingengine_startup.log. I’m just using the regular unmodified startup packages at the moment. I’ve tried default_3.6.0 and vods3 packages.

0    [main] INFO  com.wowza.amazon.ec2.install.InstallCommands  - Installer.doAmazonInstall
4    [main] INFO  com.wowza.amazon.ec2.install.InstallCommands  -   userdata-url: http://169.254.169.254/2007-08-29/user-data
8    [main] INFO  com.wowza.amazon.ec2.install.InstallCommands  -   userdata-destination: /opt/working/userdata.zip
156  [main] INFO  com.wowza.amazon.ec2.install.InstallCommands  -   userdata-isbase64: false
158  [main] INFO  com.wowza.amazon.ec2.install.InstallCommands  -   unzip: /opt/working/userdata.zip
161  [main] ERROR com.wowza.util.ZipUtils  - ZipUtils.unzipFile: java.util.zip.ZipException: error in opening zip file
163  [main] INFO  com.wowza.amazon.ec2.install.InstallCommands  -   result: /opt/working
223  [main] ERROR com.wowza.amazon.ec2.install.Installer  - Installer.install: startup.xml file cannot be found at root of startup package. Check to be sure your startup package is properly zipped. It could contain too deep a directory structure.

So I tried to unzip the file myself at /opt/working and get the error below. Any idea what is going wrong? The package zip file is 4.4kb in size so should be within limits.

[ec2-user@ip-172-31-16-124 working]$ unzip userdata.zip
Archive:  userdata.zip
error [userdata.zip]:  missing 227764324 bytes in zipfile
  (attempting to process anyway)
error [userdata.zip]:  attempt to seek before beginning of zipfile
  (please check that you have transferred or created the zipfile in the
  appropriate BINARY mode and that you have compiled UnZip properly)

The URL to the package is unusual; that type of IP addresses is usually assigned to Windows machines that have a problem with connecting to the network. So check first if the URL is correct. Then, check if you can download the package yourself and open it with an unzipper.

Have you used the startup packages for Wowza 4? See http://wowzamediasystems.s3.amazonaws.com/packagelist.html

Thanks Karel,

The url is what EC2 use to distribute meta data I believe. I could successfully download from this but when I tried to unzip I got the same error message. If I upload the startup package directly to s3, download it and unzip all works fine.

Seems to be the problem is with the process of setting the userdata file from the AWS console. Every time I do that it doesn’t seem to work.

So, I’ve just tried it from the AWS CLI instead and then everything worked. I can’t explain what the difference is but at least the startup packages seem to be working now.

Hi @Mark Farrington

How are you supplying the UserData? It should be as text, NOT base64 encoded and the data itself must be like this:

WZA_startupPackageURL=http://url_to_your_startup_package.zip

I followed the WowzaMediaServerForEC2_UsersGuide.pdf on page 23 by using the AWS web console and made sure that the Base 64 checkbox was not checked but this didn’t work. To be honest running it from the CLI makes the process easier for me anyway. So I used the AWS CLI run-instances command and passed in the file by using the --user-data param (–user-data fileb://wowza.zip). This worked great.