Wowza Community

LiveMediaStreamReceiver.doWatchdog NullPointerException after sessionClosed

Wowza 3.6.4; in a 3-tier configuration:

  1. An origin server with an incoming RTMP stream

  2. An edge server

  3. A CDN

Server #2 pulls the stream from #1 using a custom module and MediaCaster, then uses Push Publishing to relay the stream to the CDN. When the signal into #1 is interrupted, server #2 notifies the breach, and is programmed to shut down (1) the Push Publisher, and (2) the Media Caster. I see the following processes in the log (in specified order):

  • PushPublisher.disconnect

  • PushPublisher.sessionClosed

  • LiveMediaStreamReceiver.shutdown

  • PushPublisher.sessionClosed

  • LiveMediaStreamReceiver.disconnect

  • unpublish stream

  • destroy stream

  • LiveMediaStreamReceiver.sessionClosed

  • LiveMediaStreamReceiver.sessionClosed[applicationname/definst/streamname]: reconnect: isCurrentSession:false tryConnect:false

Right after that, there’s a NullPointerException as follows

LiveMediaStreamReceiver.doWatchdog[applicationname/_definst_/streamname]: java.lang.NullPointerException: java.lang.NullPointerException|at com.wowza.wms.mediacaster.wowza.LiveMediaStreamReceiver.doWatchdogInternal(LiveMediaStreamReceiver.java:1294)|at com.wowza.wms.mediacaster.wowza.LiveMediaStreamReceiver.doWatchdog(LiveMediaStreamReceiver.java:1118)|at com.wowza.wms.mediacaster.MediaCasterStreamItem.doWatchdog(MediaCasterStreamItem.java:184)|at com.wowza.wms.mediacaster.MediaCasterStreamMap.doWatchdog(MediaCasterStreamMap.java:116)|	-	-	-	838.697	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-
java.lang.NullPointerException
	at com.wowza.wms.mediacaster.wowza.LiveMediaStreamReceiver.doWatchdogInternal(LiveMediaStreamReceiver.java:1294)
	at com.wowza.wms.mediacaster.wowza.LiveMediaStreamReceiver.doWatchdog(LiveMediaStreamReceiver.java:1118)
	at com.wowza.wms.mediacaster.MediaCasterStreamItem.doWatchdog(MediaCasterStreamItem.java:184)
	at com.wowza.wms.mediacaster.MediaCasterStreamMap.doWatchdog(MediaCasterStreamMap.java:116)
	at com.wowza.wms.application.ApplicationInstance.doWatchdog(ApplicationInstance.java:2132)
	at com.wowza.wms.application.Application.doWatchdog(Application.java:486)
	at com.wowza.wms.vhost.VHost.d(VHost.java:1167)
	at com.wowza.wms.vhost.VHost.doWatchdog(VHost.java:1208)
	at com.wowza.wms.vhost.VHostWatchdog.run(VHostWatchdog.java:47)

Now I know that since there’s a custom module controlling the Push Publisher and the MediaCaster, there’s probably something in there that causes this. But I have not the faintest idea why the WatchDog is still trying to access the stream after it has been destroyed. Since the LiveStreamReceived reports disconnected and session closed, I expected the WatchDog no longer to check on this.

Can anyone give me a hint as why this may occur?

@Karel Boek, do you found the solution?

That was 2,5 years ago … I honestly don’t remember

@Karel Boek oh, expected answer :slight_smile: