Results 1 to 10 of 11

Thread: Loading New Wowza Server Extension Module Not Working

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jun 2012

    Default Loading New Wowza Server Extension Module Not Working


    I have downloaded the Wowza IDE for Eclipse package and installed the JDK and Ant packages on my Windows PC. I have followed the Wowza IDE users guide to build a server side extension, exported the module to a jar file, copied it to the /lib directory on my CentOS system, updated the Application.xml file to include my new module, restarted the Wowza server and I do not see the new module getting loaded. There are no errors in either of the Wowza log files nor any reference to loading my new module. The module contains no new code from me; I wanted to keep things simple since this is my first server side module, so all I wanted to do was start with the example and see if my new module is loaded. The module contains all the standard functions that are created by default when you follow the IDE guide.

    My client side player is jwplayer and I'm using RTMPE with secure token implemented. Everything works when I do not include my new server side module. As soon as I include my module in the Application.xml file and restart the server, my audio files no longer play. It appears that the jwplayer is making a request to the Wowza server, but I don't see any activity in the Wowza logs. The jwplayer is set to automatically play the mp3 file so I see the play button change to the pause button, but nothing happens. After a few seconds the pause button returns to the play button but no audio is played. I remove the new module (that only contains default Wowza code) and everything works perfectly. Below is a copy of the module code that was created and a copy of the module element I added to the Modules section of the Application.xml file. What am I doing wrong? (code that I want to add is commented out - only the default code is active) Thanks for any help.

    java version on CentOS:
    java version "1.6.0_20"
    OpenJDK Runtime Environment (IcedTea6 1.9.10) (rhel-
    OpenJDK Server VM (build 19.0-b09, mixed mode)

    java version on Windows PC using Eclipse and Wowza add-on
    java version "1.7.0_05"
    Java(TM) SE Runtime Envirionment (build 1.7.0_05-b06)
    Java HotSpot(TM) 64-Bit Server VM (build 23.1-b03, mixed mode)

    JAVA_HOME=C:\Program Files\Java\jdk1.7.0_05

    module code from Eclipse IDE

    package com.hotlinesinc.wms.pgp.module;

    import com.wowza.wms.application.*;
    import com.wowza.wms.amf.*;
    import com.wowza.wms.client.*;
    import com.wowza.wms.module.*;
    import com.wowza.wms.request.*;
    import com.wowza.wms.rtp.model.*;
    import com.wowza.wms.httpstreamer.model.*;
    import com.wowza.wms.httpstreamer.cupertinostreaming.httpstreamer.*;
    import com.wowza.wms.httpstreamer.smoothstreaming.httpstreamer.*;

    public class HotlinesPGPModule extends ModuleBase {

    // private IApplicationInstance _appInstance;

    public void doSomething(IClient client, RequestFunction function,
    AMFDataList params) {
    sendResult(client, params, "Hello Wowza");

    public void onAppStart(IApplicationInstance appInstance) {
    // _appInstance = appInstance;

    String fullname = appInstance.getApplication().getName() + "/"
    + appInstance.getName();
    getLogger().info("onAppStart: " + fullname);

    public void onAppStop(IApplicationInstance appInstance) {
    String fullname = appInstance.getApplication().getName() + "/"
    + appInstance.getName();
    getLogger().info("onAppStop: " + fullname);

    public void onConnect(IClient client, RequestFunction function,
    AMFDataList params) {
    getLogger().info("onConnect: " + client.getClientId());

    public void onConnectAccept(IClient client) {
    getLogger().info("onConnectAccept: " + client.getClientId());

    public void onConnectReject(IClient client) {
    getLogger().info("onConnectReject: " + client.getClientId());

    public void onDisconnect(IClient client) {
    getLogger().info("onDisconnect: " + client.getClientId());

    //String fileName = _appInstance.getStreamStoragePath() + client.getStreamFile(null);
    //String fileName = _appInstance.getStreamStoragePath() + "/112105da.mp3";
    //File mediaFile = new File(fileName);
    //Boolean success = mediaFile.delete();
    //getLogger().info("Info: deleting [" + fileName + "] result: " + success);

    Application.xml module entry

    <Description>Hotlines PGP Encyption</Description>

  2. #2


    Are you running another module that implements one of these methods? If your module in your post is listed last in Aplication.xml, you might need invokePrevious() to also run the other method. Check the Wowza API for more info.

  3. #3
    Join Date
    Jun 2012



    I am still unable to load any module that I create. I have dropped my module mentioned in the post and followed the example documentation for creating "MyFirstModule". When I look in the wowzamediaserver_access.log to see if the module loaded I do not see any log entries. I see log entries for the modules listed above my module in the Application.xml file, but I never see anything related to any module I create. I have turned on the debug flag for logging, but I don't see any error messages. It doesn't matter where I place my module entry in Application.xml - it never loads. I'm unable to get past the first step of loading a server extension module, please help.


  4. #4
    Join Date
    Jun 2012


    In addition to the issues mentioned, if I perform the following steps I get web server errors in /var/log/httpd/error_log

    comment out all the module java code and just leave the class definition of my module active
    create a jar file and copy that to my Unix server under the Wowza lib directory,
    restart the Wowza service and attempt to play an mp3 file through the jwplayer in my web page,

    I get the following errors in my web server error log:
    [Tue Sep 11 14:24:19 2012] [error] [client] File does not exist: /var/www/html/mcrpt/fcs
    [Tue Sep 11 14:24:19 2012] [error] [client] File does not exist: /var/www/html/mcrpt/open

    My mp3 file does not play when my module is included in the Application.xml file.

    If I comment out my module and restart the server, my audio file plays through the jwplayer and I do not get any errors in the web server error log. I do not know what fcs or open are - they are not part of my code. (at least not that I'm aware of and the error goes away when I remove my module from Application.xml)

  5. #5
    Join Date
    Dec 2007


    Maybe you overlooked what it is doing. That module logs a comment when the application is started, but it doesn't say anything about the module. It would just say, for example:
    onAppStart: vod
    If the application were named "vod"

    Other logging occurs if a Flash client connects, but is also very generic


  6. #6
    Join Date
    Jun 2012


    this makes no sense to me. My understanding of how modules are loaded is that each one in turn will overlay the previous module if an identical function is found in the module. I have commented out all functions in my module so that I have an empty class definition. I add that module to my server configuration and restart the server and then try to play a mp3 file from a jwplayer embedded in my application. Nothing plays. If I remove the module I added then everything works. This tells me there is something wrong with the module that I created with the Wowza IDE, but I have nothing that tells me what is wrong. I haven't added any functionality other than a module class with nothing in it. Why would the Wowza media server not serve up the requested mp3 file? If the Wowza IDE does not create working modules when I simply create a project with nothing in it what do I have to do to create modules that work??? I have spent days on this without any progress.

Similar Threads

  1. logging in extension module
    By jhjwind in forum Server-side Modules and Code Samples Discussion
    Replies: 1
    Last Post: 04-11-2012, 02:46 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts