Wowza does not use latest Java version

Hi,

I’m using Wowza 4.5.0 on an AWS Linux machine. I’ve correctly installed Java 1.8.0_91 on the machine.

Here is what I see when I type “java -version”

openjdk version “1.8.0_91”

OpenJDK Runtime Environment (build 1.8.0_91-b14)

OpenJDK 64-Bit Server VM (build 25.91-b14, mixed mode)

However, Wowza keeps seeing my Java as 1.7.0_55. I’ve followed the instructions at Wowza documentation on how to update Java, but still problem persists, even after I reboot the service.

Any ideas on how to solve this?

Thanks in advance!

Helder Conde

I’ve tried if i could reproduce it. I cant update somehow. Can you tell the steps you did? Which OS are you running.

Ive tried this on a ubuntu 16.04 64bit server. Wowza version: 4.5.0

/usr/local/WowzaStreamingEngine/java/bin/java -version
result:
java version "1.8.0_60"
Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)

Next commands:

/usr/local/WowzaStreamingEngine/WowzaStreamingEngine/java/bin/java -version
cat /usr/local/WowzaStreamingEngine/bin/setenv.sh  
result:

#!/bin/bash
if [ -d /usr/local/WowzaStreamingEngine/java ]; then
        WMSJAVA_HOME=/usr/local/WowzaStreamingEngine/java
    _EXECJAVA=$WMSJAVA_HOME/bin/java
else
    _EXECJAVA=java
fi
# Setting of JAVA_OPTS has moved to conf/Tune.xml
WMSAPP_HOME=/usr/local/WowzaStreamingEngine
WMSCONFIG_HOME=/usr/local/WowzaStreamingEngine
WMSCONFIG_URL=
export WMSAPP_HOME WMSCONFIG_HOME JAVA_OPTS _EXECJAVA WMSJAVA_HOME

cd /usr/local/WowzaStreamingEngine/bin 
sudo ./startup.sh

will result in an error at binding. I cant fix this either:

result:

root@vps287055:/usr/local/WowzaStreamingEngine/bin# sudo ./startup.sh
Configure logging: file:///usr/local/WowzaStreamingEngine/conf/log4j.properties
INFO server server-start Wowza Streaming Engine 4 Developer Edition (Expires: Dec 03, 2016) 4.5.0 build18676 -
INFO server comment - Server License Key: EDEV4-XXXXX-XXXXX-XXXXX-XXXXX-9D4c7
INFO server comment - Maximum Connections: 10
INFO server comment - Maximum Incoming Streams: 3
INFO server comment - Transcoder Streams Available: 1
INFO server comment - Transcoder Watermark: Yes
INFO server comment - nDVR Available: Yes
INFO server comment - DRM Available: Yes
INFO server comment - HTTP Origin Available: No
INFO server comment - Push Publish Available: Yes
INFO server comment - REST API Available: Yes
INFO server comment - Hardware Available Processors: 1
INFO server comment - Hardware Physical Memory [free/total]: 49MB/1952MB
INFO server comment - Max File Descriptor Count: 64000
INFO server comment - Open File Descriptor Count: 73
INFO server comment - Linux Networking Parameters
INFO server comment - /proc/sys/net/core/rmem_default: 212992
INFO server comment - /proc/sys/net/core/rmem_max: 212992
INFO server comment - /proc/sys/net/core/wmem_default: 212992
INFO server comment - /proc/sys/net/core/wmem_max: 212992
INFO server comment - /proc/sys/net/core/optmem_max: 20480
INFO server comment - /proc/sys/net/ipv4/tcp_rmem: 4096 87380   6291456
INFO server comment - /proc/sys/net/ipv4/tcp_wmem: 4096 16384   4194304
INFO server comment - /proc/sys/net/ipv4/tcp_sack: 1
INFO server comment - /proc/sys/net/ipv4/tcp_window_scaling: 1
INFO server comment - OS Name: Linux
INFO server comment - OS Version: 4.4.0-22-generic
INFO server comment - OS Architecture: amd64
INFO server comment - Java Name: Java HotSpot(TM) 64-Bit Server VM
INFO server comment - Java Vendor: Oracle Corporation
INFO server comment - Java Version: 1.8.0_60
INFO server comment - Java VM Version: 25.60-b23
INFO server comment - Java Spec Version: 1.8
INFO server comment - Java Home: /usr/local/WowzaStreamingEngine-4.4.1/jre1.8.0_60
INFO server comment - Java Max Heap Size: 780MB
INFO server comment - Java Architecture: 64
INFO server comment - Java Locale[user.language]: en
INFO server comment - Java Locale[user.country]: US
INFO server comment - Java Locale[file.encoding]: UTF-8
INFO server comment - Java Timezone[user.timezone]: Europe/Paris
INFO server comment - Java Args[0]: -Xmx780M
INFO server comment - Java Args[1]: -XX:+UseG1GC
INFO server comment - Java Args[2]: -XX:MaxGCPauseMillis=100
INFO server comment - Java Args[3]: -Djava.net.preferIPv4Stack=true
INFO server comment - Java Args[4]: -Dcom.sun.management.jmxremote=true
INFO server comment - Java Args[5]: -Dcom.wowza.wms.runmode=standalone
INFO server comment - Java Args[6]: -Dcom.wowza.wms.native.base=linux
INFO server comment - Java Args[7]: -Dcom.wowza.wms.AppHome=/usr/local/WowzaStreamingEngine
INFO server comment - Java Args[8]: -Dcom.wowza.wms.ConfigURL=
INFO server comment - Java Args[9]: -Dcom.wowza.wms.ConfigHome=/usr/local/WowzaStreamingEngine
INFO server comment - Server runmode: standalone
INFO server comment - Server native.platform: linux
INFO server comment - Server threads[h/t]: 120/80
INFO server comment - RESTServer: Bind attempt ([any]:8087)
WARN server comment - RESTServer: Bind failed, try again ([any]:8087): java.net.BindException: Address already in use|at sun.nio.ch.Net.bind0(Native Method)|at sun.nio.ch.Net.bind(Net.java:433)|at sun.nio.ch.Net.bind(Net.java:425)|at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)|at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)|

Hi Andrew,

thx. i can confirm this works.

rm -rf /usr/local/WowzaStreamingEngine/java

ln -sf /usr/lib/jvm/java-8-oracle/ /usr/local/WowzaStreamingEngine/java

That worked for me.

Restarted the StreamingEngine and Manager after that and now in the dashboard the java version is updated to 1.8.0_91

From what i see you already updated the documentation page?

Hello,

We are currently looking at updating the article that documents the Java upgrade. Please try the following steps instead using your jdk or jre version info:

rm -rf /usr/local/WowzaStreamingEngine/java

ln -sf /usr/lib/jvm/jdk[version]/ /usr/local/WowzaStreamingEngine/java

Best regards,

Andrew

Hello all,

Thanks for posting in our forum. We do have an article now explaining how to instruct Wowza Streaming Engine to use a specific version of Java: https://www.wowza.com/docs/manually-install-and-troubleshoot-java-on-wowza-streaming-engine#instruct-wowza-streaming-engine-to-use-a-specific-version-of-java

Kind regards,

Alberto Cabaleiro

Wowza Support Engineer