Configuration headaches for a custom module

Hi all,

I’m handling a long-overdue upgrade of a Wowza Media Server Pro instance for our product to WSE. I’ve ported our vods3 app config over without too much trouble, but we have a recording app with a custom recording module that’s giving me an enormous headache. AFAICT, the module is loaded in the server, but the application never responds to rtmp requests from our Flash client. Strangely, the client tries to connect but apparently blocks without a response to the RTMP connection… and eventually the server shows just the disconnect in the logs. Likewise, our custom module’s onAppStart logging never shows up my development instance’s logs. The app does show up correctly in the WSE Manager.

I’ve also tried configuring ServerListenerLoadAndLockAppInstances to force the load of our application, as a means of debugging the app load itself separate from any possible application configuration/routing issues. That provided little help, except to verify that WSE would indeed complain if, for example, our module couldn’t be loaded due to a configuration issue.

Our WMS Pro app configuration follows. I’m relatively new to Wowza, but AFAICT this is a fairly boring recording app that loads our custom module to do the heavy lifting. This whole thing has the smell of One Key Misconfiguration that’s preventing WSE from correctly invoking our app.

<Root>
  <Application>
    <!-- Uncomment to set application level timeout values
    <ApplicationTimeout>60000</ApplicationTimeout>
    <PingTimeout>12000</PingTimeout>
    <ValidationFrequency>8000</ValidationFrequency>
    <MaximumPendingWriteBytes>0</MaximumPendingWriteBytes>
    <MaximumSetBufferTime>60000</MaximumSetBufferTime>
    -->
    <Connections>
      <AutoAccept>false</AutoAccept>
      <AllowDomains></AllowDomains>
    </Connections>
    <!--
    StorageDir path variables
    ${com.wowza.wms.AppHome} - Application home directory
    ${com.wowza.wms.ConfigHome} - Configuration home directory
    ${com.wowza.wms.context.VHost} - Virtual host name
    ${com.wowza.wms.context.VHostConfigHome} - Virtual host config directory
    ${com.wowza.wms.context.Application} - Application name
    ${com.wowza.wms.context.ApplicationInstance} - Application instance name
    -->
    <Streams>
      <StreamType>record</StreamType>
      <StorageDir>/mnt/recordings</StorageDir>
      <Properties>
        <Property>
          <Name>seekTarget</Name>
          <!-- valid values are: videoKeyFrame, audio, enhanced //DEFAULT = videoKeyFrame -->
          <Value>audio</Value>
        </Property>
        <!-- Properties defined here will override any properties defined in conf/Streams.xml for any streams types loaded by this application -->
        <!--
                    <Property>
                            <Name></Name>
                            <Value></Value>
                    </Property>
                    -->
            </Properties>
          </Streams>
          <SharedObjects>
            <StorageDir></StorageDir>
          </SharedObjects>
          <Client>
            <IdleFrequency>-1</IdleFrequency>
            <Access>
              <StreamReadAccess>*</StreamReadAccess>
              <StreamWriteAccess>*</StreamWriteAccess>
              <StreamAudioSampleAccess></StreamAudioSampleAccess>
              <StreamVideoSampleAccess></StreamVideoSampleAccess>
              <SharedObjectReadAccess>*</SharedObjectReadAccess>
              <SharedObjectWriteAccess>*</SharedObjectWriteAccess>
            </Access>
          </Client>
          <RTP>
            <!-- RTP/Authentication/Methods defined in Authentication.xml. Default setup includes; none, basic, digest -->
            <Authentication>
              <Method>digest</Method>
            </Authentication>
            <!-- RTP/AVSyncMethod. Valid values are: senderreport, systemclock, rtptimecode -->
            <AVSyncMethod>senderreport</AVSyncMethod>
            <MaxRTCPWaitTime>12000</MaxRTCPWaitTime>
            <Properties>
              <!-- Properties defined here will override any properties defined in conf/RTP.xml for any depacketizers loaded by this application -->
              <!--
                    <Property>
                            <Name></Name>
                            <Value></Value>
                    </Property>
                    -->
            </Properties>
          </RTP>
          <MediaCaster>
            <Properties>
              <!-- Properties defined here will override any properties defined in conf/MediaCasters.xml for any MediaCasters loaded by this applications -->
              <!--
                    <Property>
                            <Name></Name>
                            <Value></Value>
                    </Property>
                    -->
            </Properties>
          </MediaCaster>
          <MediaReader>
            <Properties>
              <!-- Properties defined here will override any properties defined in conf/MediaReaders.xml for any MediaReaders loaded by this applications -->
              <!--
                    <Property>
                            <Name></Name>
                            <Value></Value>
                    </Property>
                    -->
            </Properties>
          </MediaReader>
          <!-- 
    <Repeater>
            <OriginURL></OriginURL>
    </Repeater> 
    -->
    <Modules>
      <Module>
        <Name>base</Name>
        <Description>Base</Description>
        <Class>com.wowza.wms.module.ModuleCore</Class>
      </Module>
      <Module>
        <Name>properties</Name>
        <Description>Properties</Description>
        <Class>com.wowza.wms.module.ModuleProperties</Class>
      </Module>
      <Module>
        <Name>logging</Name>
        <Description>Client Logging</Description>
        <Class>com.wowza.wms.module.ModuleClientLogging</Class>
      </Module>
      <Module>
        <Name>flvplayback</Name>
        <Description>FLVPlayback</Description>
        <Class>com.wowza.wms.module.ModuleFLVPlayback</Class>
      </Module> 
      <Module>
        <Name>story</Name>
        <Description>Story Module</Description>
        <Class>jfm.StoryModule</Class>
      </Module> 
    </Modules>
    <Properties>
      <!-- Properties defined here will be added to the IApplication.getProperties() and IApplicationInstance.getProperties() collections -->
      <Property>
        <Name>recordingStore</Name>
        <Value>jfm.S3Recording</Value>
      </Property>
    </Properties>
  </Application>
</Root>

Adding a bit more context here: the module in question has been rebuilt using the current WSE dev tools.

The big thing I’m blocked on is that I have no idea how to debug this any further. Normally, I’d turn a server up to “DEBUG ALL THE THINGS” log level and work from there, but I haven’t yet found any configuration that will produce more informative logs, etc.

Any pointers on getting this unstuck would be greatly appreciated!

Hi,

In order to have your Wowza Streaming Engine configured for live streaming, you shoudl follow the instructions from the “How to set up live streaming using an RTMP-based encoder” forum article.

Now, in order to record the incoming streams there are several options available. Here are some of them:

How to record live streams (Wowza Streaming Engine)

How to record live streams (HTTPLiveStreamRecord)

How to set up live video recording

Also, you can develop your custom Wowza module by using the sample code and examples described here:

How to start and stop live stream recordings programmatically (IMediaStreamActionNotify3)

How to start and stop live stream recordings programmatically (LiveStreamRecordAutoRecord example)

Zoran

I rebuilt the config above using the upgrade guide, adding the Name, AppType (LiveEdge ??), and Transcoder (required, even if empty config; app failed to start without it) elements under Application. Still no dice.

I also tried streaming a test .flv to this application via ffmpeg to see if that revealed anything, but that was of no help either.