NullPointerException while streaming via RTMP

jruiz

New Member
Hello.
I'm getting a NullPointerException while steaming via RTMP with OBS Studio. The streaming starts correctly, but when is running for a few minutes the NullPointerException appears in the flashphoner_manager.log and the embedded player stops. In OBS Studio the streaming continues as if the connection is not lost.

The exception trace from flashphoner_manager.log is this:
Code:
12:56:50,534 WARN    RmiNodeStatService - RMI TCP Connection(582)-127.0.0.1 Exception at stream info service, StreamStatusEvent obsStudio
java.lang.NullPointerException
    at org.primefaces.model.TreeNodeChildren.remove(TreeNodeChildren.java:177)
    at com.flashphoner.server.manager.service.stream.StreamInfoService.streamStatusEvent(StreamInfoService.java:148)
    at com.flashphoner.server.manager.rmi.RmiNodeStatService.StreamStatusEvent(RmiNodeStatService.java:262)
    at sun.reflect.GeneratedMethodAccessor113.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:357)
    at sun.rmi.transport.Transport$1.run(Transport.java:200)
    at sun.rmi.transport.Transport$1.run(Transport.java:197)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.rmi.transport.Transport.serviceCall(Transport.java:196)
    at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:573)
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:834)
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:688)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:687)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
The server is CentOS 7 with opejdk 1.8.0.
The Web Call Server is the 5.1 version.
In flashphoner.properties I have keep_alive.algorithm=NONE to deactivate keepAlive for OBS Studio.

Why is this error ocurring and stopping the embedded player?
 

Max

Administrator
Staff member
Hello.
The server is CentOS 7 with opejdk 1.8.0.
You should install Oracle JDK for WCS to work, OpenJDK is not enough. Install OracleJDK, then, if problem persists, prepare the report as described here and send it to support@flashphoner.com.
In flashphoner.properties I have keep_alive.algorithm=NONE to deactivate keepAlive for OBS Studio
We recommend to disable KeepAlive for RTMP only with this setting
Code:
keep_alive.enabled=websocket,rtmfp
rather then disable it form all the protocols like you did.
 

Max

Administrator
Staff member
We reproduced the problem and will work on it (internal case WCS-1490). We will let you know when fix it.
 

jruiz

New Member
Good news that you reproduced the problem.

I uninstalled openjdk and installed the oracle java jdk version.
I used the setting
Code:
keep_alive.enabled=websocket,rtmfp
to disabled keepAlive for RTMP. But OBS Studio keeps disconnecting and reconnecting. If I use
Code:
keep_alive.algorithm=NONE
I'm not having the disconnection problem in OBS Studio.

Independiently of the keepAlive configuration, the embedded player is disconnecting sometimes. In the in flashphoner_manager.log I've seen this line:
Code:
12:36:15,470 INFO               EchoApp - http-nio-9091-exec-9 handleRequest method: StreamStatusEvent params:{nodeId=6ZpOELnxIU0sBr47fI5Kpk7bdTC2EDRa@SERVER_IP, appKey=flashStreamingApp, sessionId=/LOCAL_IP:33670/SERVER_IP:1935, mediaSessionId=216dbc79-da6c-4094-9d57-34c6b1be518c, name=obsStudio, published=true, hasVideo=false, hasAudio=true, status=FAILED, audioCodec=mpeg4-generic, videoCodec=H264, info=Stopped by session disconnect, record=false, width=1280, height=720, bitrate=0, minBitrate=0, maxBitrate=0, quality=0, createDate=1537439722739, mediaProvider=Flash, history=false}
The info property of the log says "Stopped by session disconnect", could this be related with the NullPointerException?
 

Max

Administrator
Staff member
We reproduced both keep alive issue and playback issue, and work on them.
About NullPointerException, it is consequence of stream playback stopping, not a cause. But we work on it too.
 

Max

Administrator
Staff member
We fixed keep_alive.enabled issue and NPE in build 5.1.3560.
About playback issue: option
Code:
keep_alive.algorithm=NONE
disables Keep Alive for all the protocols, including WebSocket. Steam playback in browser stops when WebSocket read timeout expires (120 seconds by default. So, if you disable Keep Alive with this option, you should set
Code:
keep_alive.algorithm=NONE
ws_read_socket_timeout=false
 
Top