# Problem with running startup script package

**URL:** https://community.wowza.com/t/problem-with-running-startup-script-package/48504
**Category:** Hire a Consultant
**Created:** [April 10, 2017, 4:29pm UTC](https://community.wowza.com/t/problem-with-running-startup-script-package/48504 "2017-04-10T16:29:38Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Mark\_Farrington](https://avatars.discourse-cdn.com/v4/letter/m/ba9def/32.png) [@Mark\_Farrington](https://community.wowza.com/u/Mark_Farrington)
#### Post date: [April 10, 2017, 4:29pm UTC](https://community.wowza.com/t/problem-with-running-startup-script-package/48504/1 "2017-04-10T16:29:38Z")

</div>

Hi,

I’m trying to follow the ([EC2 Wowza guide](https://www.wowza.com/resources/WowzaMediaServerForEC2_UsersGuide.pdf)) 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.

```auto
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.

```auto
[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)

```

---

<div class="post-metadata">

### Author: ![Karel\_Boek](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/karel_boek/32/454_2.png) [@Karel\_Boek](https://community.wowza.com/u/Karel_Boek)
#### Post date: [April 10, 2017, 7:40pm UTC](https://community.wowza.com/t/problem-with-running-startup-script-package/48504/2 "2017-04-10T19:40:07Z")

</div>

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](http://wowzamediasystems.s3.amazonaws.com/packagelist.html)

---

<div class="post-metadata">

### Author: ![Mark\_Farrington](https://avatars.discourse-cdn.com/v4/letter/m/ba9def/32.png) [@Mark\_Farrington](https://community.wowza.com/u/Mark_Farrington)
#### Post date: [April 11, 2017, 10:15am UTC](https://community.wowza.com/t/problem-with-running-startup-script-package/48504/3 "2017-04-11T10:15:00Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![Karel\_Boek](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/karel_boek/32/454_2.png) [@Karel\_Boek](https://community.wowza.com/u/Karel_Boek)
#### Post date: [April 11, 2017, 3:51pm UTC](https://community.wowza.com/t/problem-with-running-startup-script-package/48504/4 "2017-04-11T15:51:26Z")

</div>

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:

```auto
WZA_startupPackageURL=http://url_to_your_startup_package.zip

```

---

<div class="post-metadata">

### Author: ![Mark\_Farrington](https://avatars.discourse-cdn.com/v4/letter/m/ba9def/32.png) [@Mark\_Farrington](https://community.wowza.com/u/Mark_Farrington)
#### Post date: [April 12, 2017, 8:26am UTC](https://community.wowza.com/t/problem-with-running-startup-script-package/48504/5 "2017-04-12T08:26:06Z")

</div>

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.
