Wowza Community

When I start Wowza Pro I get the error "java.lang.reflect.InvocationTargetException"

Problem

When I attempt to start Wowza Pro on Linux I get an error message that looks like this:

Error starting: java.lang.reflect.InvocationTargetException
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknow n Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Un known Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.wowza.wms.bootstrap.Bootstrap.startServer(Unkn own Source)
at com.wowza.wms.bootstrap.Bootstrap.main(Unknown Source)
Caused by: java.lang.InternalError: unable to get address of epoll functions, pre-2.6 kernel?
at sun.nio.ch.EPollArrayWrapper.init(Native Method)
at sun.nio.ch.EPollArrayWrapper.<clinit>(Unknown Source)
at sun.nio.ch.EPollSelectorImpl.<init>(Unknown Source)
at sun.nio.ch.EPollSelectorProvider.openSelector(Unkn own Source)
at java.nio.channels.Selector.open(Unknown Source)
at org.apache.mina.transport.socket.nio.SocketAccepto r.startupWorker(Unknown Source)
at org.apache.mina.transport.socket.nio.SocketAccepto r.bind(Unknown Source)
at com.wowza.wms.server.Server.startCommandInterface( Unknown Source)
at com.wowza.wms.server.Server.start(Unknown Source)

This is a know issue with certain versions of the Linux kernel.

Solution

To fix this problem, edit the following two files:

/usr/local/WowzaMediaServerPro/bin/setenv.sh

and change the following line in both files:

from:
JAVA_OPTS="-Xmx768M"
to:
JAVA_OPTS="-Xmx768M -Djava.nio.channels.spi.SelectorProvider=sun.nio.ch.PollSelectorProvider"

Charlie

We’re getting the same problem, even after making the change.

Also, the message says “2 files”, but then there’s only one listed. Is there another file we need to change as well?

Thx,

Tac

Please post the exact error message you are getting when trying to run Wowza Pro.

Charlie

It looks like you are running the GNU Java which does not work with Wowza Pro. I suggest you install the most recent Sun Java JDK from http://java.sun.com.

Charlie

I think I’m getting the same error with 1.3.1 (not sure because I can’t tell if the symlink is getting files from elsewhere). Anyway, here’s the message from the 1.5 preview directory:

BTW, we’re using Fedore Core 7, Java 1.5 from the repository.

[auser@tdo bin]$ sudo ./startup.sh

Configure logging: file:///usr/local/WowzaMediaServerPro/conf/log4j.properties

Error starting: java.lang.reflect.InvocationTargetException

java.lang.reflect.InvocationTargetException

at java.lang.reflect.Method.invoke(libgcj.so.8rh)

at com.wowza.wms.bootstrap.Bootstrap.startServer(Bootstrap.java:246)

at com.wowza.wms.bootstrap.Bootstrap.main(Bootstrap.java:47)

Caused by: java.lang.ExceptionInInitializerError

at org.apache.mina.transport.socket.nio.SocketSessionConfigImpl.initialize(Unknown Source)

at org.apache.mina.transport.socket.nio.SocketSessionConfigImpl.(Unknown Source)

at java.lang.Class.initializeClass(libgcj.so.8rh)

at java.lang.Class.initializeClass(libgcj.so.8rh)

at com.wowza.wms.vhost.HostPort.(Unknown Source)

at com.wowza.wms.util.VHostUtils.loadHostPort(Unknown Source)

at com.wowza.wms.util.VHostUtils.loadHostPort(Unknown Source)

at com.wowza.wms.util.ServerUtils.loadConfigFile(Unknown Source)

at com.wowza.wms.server.Server.loadConfig(Unknown Source)

at com.wowza.wms.server.Server.start(Unknown Source)

at java.lang.reflect.Method.invoke(libgcj.so.8rh)

…2 more

Caused by: java.net.SocketException: Bad file descriptor

at gnu.java.net.PlainSocketImpl.getOption(libgcj.so.8rh)

at java.net.Socket.getReuseAddress(libgcj.so.8rh)

at org.apache.mina.transport.socket.nio.SocketSessionConfigImpl.initialize(Unknown Source)

…12 more