# Wowza on AWS linux won't start at boot

**URL:** <https://community.wowza.com/t/wowza-on-aws-linux-wont-start-at-boot/42974>\
**Category:** Wowza Streaming Engine\
**Tags:** server-administration\
**Created:** [May 21, 2014, 10:14am UTC](https://community.wowza.com/t/wowza-on-aws-linux-wont-start-at-boot/42974 "2014-05-21T10:14:37Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Graham\_White](https://avatars.discourse-cdn.com/v4/letter/g/ec9cab/32.png) [@Graham\_White](https://community.wowza.com/u/Graham_White)\
**Post date:** [May 21, 2014, 10:14am UTC](https://community.wowza.com/t/wowza-on-aws-linux-wont-start-at-boot/42974/1 "2014-05-21T10:14:37Z")

</div>

Howdy - running Wowza on a cloud based Ubuntu instance. We take the server down when we don’t need it, but Wowza won’t start when we bring the instance back up. To start it, i can ssh in, switch to root and enter

```auto
/etc/init.d/WowzaStreamingEngine start
/etc/init.d/WowzaStreamingEngineManager start

```

and the server will start without any problems.

In the boot.log file, i see this:

```auto
ERROR: The Java command (java) could not be found.
Search path: /sbin:/usr/sbin:/bin:/usr/bin
In most cases this problem can be fixed by adding a symbolic
link to the Java command in the /usr/bin directory.
To do this first execute the command "which java" to identify
the full path to the Java executable. Next, create a symbolic
link to this file with the command
"ln -sf [path-to-java] /usr/bin/java" where [path-to-java] is
the path returned by the "which" command.

```

I have java downloaded and unpacked in

```auto
/use/jre/jdk1.8.0_05/

```

and i altered my /etc/enviroment file to look like this:

```auto
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/jre/jdk1.8.0_05/bin"
JAVA_HOME="/usr/jre/jdk1.8.0_05/"

```

It’s barebones Ubuntu 13.10 and other than that, there are no issues. Not sure what i am missing to get Wowza to find java at boot time.

thx, gw

---

<div class="post-metadata">

**Author:** ![Paul\_Shields](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/paul_shields/32/390_2.png) [@Paul\_Shields](https://community.wowza.com/u/Paul_Shields)\
**Post date:** [May 21, 2014, 6:33pm UTC](https://community.wowza.com/t/wowza-on-aws-linux-wont-start-at-boot/42974/2 "2014-05-21T18:33:05Z")

</div>

Hi

Can you run the following command as root to see how your java environment is currently set up:

```auto
# update-alternatives --display java

```

This should show the current path to the java binary.

An alternative command on some distros (which should show the same result) is:

```auto
# update-java-alternatives -l

```

It may also be useful to see how the java binary is currently set

```auto
# which java
  /usr/bin/java

```

If it does not return with a path then there is likely a problem with your Java environment.

Generally with Ubuntu distros you should find a symbolic link in /usr/bin/java to /etc/alternatives/java

```auto
# cd /usr/bin
# ls -l java
   java -> /etc/alternatives/java
# cd /etc/alternatives
# ls -l java
    java -> /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java (example for openjdk java install)

```

If you are not finding any link to the physical java binary then this is likely to be your problem. Using the Ubuntu package management tools you should be able to manage this environment.

Try running

```auto
# apt-get install openjdk-7-jdk

```

to install the OpenJDK environment.

---

<div class="post-metadata">

**Author:** ![Paul\_Shields](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/paul_shields/32/390_2.png) [@Paul\_Shields](https://community.wowza.com/u/Paul_Shields)\
**Post date:** [May 21, 2014, 7:34pm UTC](https://community.wowza.com/t/wowza-on-aws-linux-wont-start-at-boot/42974/3 "2014-05-21T19:34:43Z")

</div>

hi

Generally the way to keep it as simple (and sometimes as thin) as possible is to just use the built in package manager. Pretty much all major distros these days have very robust package management tools and it makes for an easier to manage and easily supportable environment. Personally I would look at installing the java open jdk (openjdk-7-jdk) and possibly java-common if that’s not incorporated with the jdk install.

Paul

---

<div class="post-metadata">

**Author:** ![Paul\_Shields](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/paul_shields/32/390_2.png) [@Paul\_Shields](https://community.wowza.com/u/Paul_Shields)\
**Post date:** [May 21, 2014, 8:16pm UTC](https://community.wowza.com/t/wowza-on-aws-linux-wont-start-at-boot/42974/4 "2014-05-21T20:16:28Z")

</div>

> PS -
> 
> ```auto
> # cd /usr/bin
> # ls -l java
> java -> /usr/jre/jdk1.8.0_05/bin
> 
> ```

In this case it is showing java is found (as a symlink) in /usr/bin/ which conflicts with your first post which shows that java can not be found in your search path of “sbin:/usr/sbin:/bin:/usr/bin”. Has anything changed?

---

<div class="post-metadata">

**Author:** ![Graham\_White](https://avatars.discourse-cdn.com/v4/letter/g/ec9cab/32.png) [@Graham\_White](https://community.wowza.com/u/Graham_White)\
**Post date:** [May 21, 2014, 2:15pm UTC](https://community.wowza.com/t/wowza-on-aws-linux-wont-start-at-boot/42974/5 "2014-05-21T14:15:48Z")

</div>

Hi Paul - i downloaded and unpacked java from the oracle website. i didn’t actually install it, so here are the results of those commands:

```auto
# update-alternatives --display java
update-alternatives: error: no alternatives for java

```

```auto
# update-java-alternatives -l
The program 'update-java-alternatives' is currently not installed. You can install it by typing:
apt-get install java-common

```

```auto
# which java
/usr/jre/jdk1.8.0_05/bin/java

```

should i just undo everything and install open jdk? trying to keep this server as thin as possible…

thanks again, gw

---

<div class="post-metadata">

**Author:** ![Graham\_White](https://avatars.discourse-cdn.com/v4/letter/g/ec9cab/32.png) [@Graham\_White](https://community.wowza.com/u/Graham_White)\
**Post date:** [May 21, 2014, 2:19pm UTC](https://community.wowza.com/t/wowza-on-aws-linux-wont-start-at-boot/42974/6 "2014-05-21T14:19:09Z")

</div>

PS -

```auto
# cd /usr/bin
# ls -l java
java -> /usr/jre/jdk1.8.0_05/bin

```

---

<div class="post-metadata">

**Author:** ![Graham\_White](https://avatars.discourse-cdn.com/v4/letter/g/ec9cab/32.png) [@Graham\_White](https://community.wowza.com/u/Graham_White)\
**Post date:** [May 21, 2014, 3:12pm UTC](https://community.wowza.com/t/wowza-on-aws-linux-wont-start-at-boot/42974/7 "2014-05-21T15:12:09Z")

</div>

ok i will undo all of my actions so far - shouldn’t be a big deal - and install the open jdk instead. thanks for your help.

gw
