jitsi / jitsi-videobridge

Jitsi Videobridge is a WebRTC compatible video router or SFU that lets build highly scalable video conferencing infrastructure (i.e., up to hundreds of conferences per server).
https://jitsi.org/jitsi-videobridge
Apache License 2.0
2.91k stars 992 forks source link

Health check fails, missing dependency? #112

Closed markreg closed 8 years ago

markreg commented 8 years ago

When I curl -v "localhost:port/about/health" returns a 500. Is something missing from the dependencies? I installed JRE 8.

2015-12-16 22:21:05.876 INFO: [17] org.jitsi.videobridge.Videobridge.info() Created conference 418de752d03694db. The total number of conferences is now 1, channels 0, video streams 0.
2015-12-16 22:21:05.887 INFO: [17] org.jitsi.videobridge.Conference.info() Created content audio of conference 418de752d03694db. The total number of conferences is now 1, channels 0, video streams 0.
2015-12-16 22:21:07.018 INFO: [17] org.ice4j.ice.Agent.gatherCandidates() Gather candidates for component audio.RTP
2015-12-16 22:21:07.031 INFO: [17] org.ice4j.ice.Agent.createComponent()        192.168.247.128:10001/udp (host)
2015-12-16 22:21:07.031 INFO: [17] org.ice4j.ice.Agent.gatherCandidates() Gather candidates for component audio.RTCP
2015-12-16 22:21:07.033 INFO: [17] org.ice4j.ice.Agent.createComponent()        192.168.247.128:10002/udp (host)
2015-12-16 22:21:07.304 INFO: [17] org.jitsi.impl.libjitsi.LibJitsiImpl.info() Failed to initialize service implementation org.jitsi.impl.neomedia.MediaServiceImpl.
java.lang.NoClassDefFoundError: Could not initialize class java.awt.Toolkit
        at java.awt.Dimension.<clinit>(Dimension.java:88)
        at org.jitsi.impl.neomedia.device.DeviceConfiguration.<clinit>(DeviceConfiguration.java:196)
        at org.jitsi.impl.neomedia.MediaServiceImpl.<init>(MediaServiceImpl.java:159)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
        at java.lang.Class.newInstance(Class.java:442)
        at org.jitsi.impl.libjitsi.LibJitsiImpl$ServiceLock.initializeService(LibJitsiImpl.java:196)
        at org.jitsi.impl.libjitsi.LibJitsiImpl$ServiceLock.getService(LibJitsiImpl.java:131)
        at org.jitsi.impl.libjitsi.LibJitsiImpl.getService(LibJitsiImpl.java:91)
        at org.jitsi.impl.libjitsi.LibJitsiOSGiImpl.getService(LibJitsiOSGiImpl.java:95)
        at org.jitsi.service.libjitsi.LibJitsi.invokeGetServiceOnImpl(LibJitsi.java:172)
        at org.jitsi.service.libjitsi.LibJitsi.getMediaService(LibJitsi.java:124)
        at org.jitsi.videobridge.Conference.getMediaService(Conference.java:955)
        at org.jitsi.videobridge.Content.getMediaService(Content.java:659)
        at org.jitsi.videobridge.RtpChannel.getMediaService(RtpChannel.java:816)
        at org.jitsi.videobridge.RtpChannel.initialize(RtpChannel.java:951)
        at org.jitsi.videobridge.Content.createRtpChannel(Content.java:269)
        at org.jitsi.videobridge.rest.Health.check(Health.java:95)
        at org.jitsi.videobridge.rest.Health.check(Health.java:147)
        at org.jitsi.videobridge.rest.Health.getJSON(Health.java:318)
        at org.jitsi.videobridge.rest.HandlerImpl.doGetHealthJSON(HandlerImpl.java:452)
        at org.jitsi.rest.AbstractJSONHandler.handleHealthJSON(AbstractJSONHandler.java:369)
        at org.jitsi.rest.AbstractJSONHandler.handleJSON(AbstractJSONHandler.java:399)
        at org.jitsi.videobridge.rest.HandlerImpl.handleJSON(HandlerImpl.java:954)
        at org.jitsi.rest.AbstractJSONHandler.handle(AbstractJSONHandler.java:341)
        at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:52)
        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
        at org.eclipse.jetty.server.Server.handle(Server.java:497)
        at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)
        at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
        at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
        at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
        at java.lang.Thread.run(Thread.java:745)
2015-12-16 22:21:07.306 WARNING: [17] org.jitsi.videobridge.Channel.warn() Failed to close the MediaStream/stream of channel 94303cba4d4951f9 of content audio of conference 418de752d03694db!
java.lang.NullPointerException
        at org.jitsi.videobridge.RtpChannel.closeStream(RtpChannel.java:644)
        at org.jitsi.videobridge.Channel.expire(Channel.java:345)
        at org.jitsi.videobridge.RtpChannel.expire(RtpChannel.java:1881)
        at org.jitsi.videobridge.Content.expire(Content.java:377)
        at org.jitsi.videobridge.Conference.expire(Conference.java:615)
        at org.jitsi.videobridge.rest.Health.check(Health.java:151)
        at org.jitsi.videobridge.rest.Health.getJSON(Health.java:318)
        at org.jitsi.videobridge.rest.HandlerImpl.doGetHealthJSON(HandlerImpl.java:452)
        at org.jitsi.rest.AbstractJSONHandler.handleHealthJSON(AbstractJSONHandler.java:369)
        at org.jitsi.rest.AbstractJSONHandler.handleJSON(AbstractJSONHandler.java:399)
        at org.jitsi.videobridge.rest.HandlerImpl.handleJSON(HandlerImpl.java:954)
        at org.jitsi.rest.AbstractJSONHandler.handle(AbstractJSONHandler.java:341)
        at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:52)
        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
        at org.eclipse.jetty.server.Server.handle(Server.java:497)
        at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)
        at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
        at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
        at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
        at java.lang.Thread.run(Thread.java:745)
2015-12-16 22:21:07.308 INFO: [17] org.ice4j.ice.Agent.setState() ICE state changed from Waiting to Terminated
2015-12-16 22:21:07.310 INFO: [17] org.jitsi.videobridge.Channel.info() Expired channel 94303cba4d4951f9 of content audio of conference 418de752d03694db. The total number of conferences is now 0, channels 0, video streams 0.
2015-12-16 22:21:07.310 INFO: [17] org.jitsi.videobridge.Content.info() Expired content audio of conference 418de752d03694db. The total number of conferences is now 0, channels 0, video streams 0.
2015-12-16 22:21:07.310 INFO: [17] org.jitsi.videobridge.Conference.info() Expired conference 418de752d03694db. The total number of conferences is now 0, channels 0, video streams 0.
damencho commented 8 years ago

I tested this in our test deployment with latest versions and I cannot reproduce it. It should be something on your side and the way you are deploying.

markreg commented 8 years ago

java -v outputs:

java version "1.8.0_66"
Java(TM) SE Runtime Environment (build 1.8.0_66-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.66-b17, mixed mode)

I'm not sure what else it could be since this is a fresh VM for JVB with nothing else on it. Is java.awt.toolikit something I need to install separately?

damencho commented 8 years ago

Nope this is standard class, I think its even exists in jre-headless. Not sure what can be the problem ... Is this ubuntu or debian which version? Are you installing and running from deb packages?

markreg commented 8 years ago

Got it to work, I had installed the oracle-java8-installer but not default-jre. For future reference, on ubuntu, should java be installed from apt-get or is there a standalone deb package that is recommended?

damencho commented 8 years ago

As current ubuntu LTS 14.04 doesn't have openjdk-8 we install it from ppa: add-apt-repository -y ppa:openjdk-r/ppa apt-get update apt-get install openjdk-8-jdk