Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Loading New Wowza Server Extension Module Not Working

  1. #1
    Join Date
    Jun 2012
    Posts
    5

    Default Loading New Wowza Server Extension Module Not Working

    Hello,

    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-1.23.1.9.10.el5_7-i386)
    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.stream.*;
    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.*;
    //import java.io.File;

    public class HotlinesPGPModule extends ModuleBase {

    // private IApplicationInstance _appInstance;

    public void doSomething(IClient client, RequestFunction function,
    AMFDataList params) {
    getLogger().info("doSomething");
    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

    <Module>
    <Name>HotlinesPGPModule</Name>
    <Description>Hotlines PGP Encyption</Description>
    <Class>com.hotlinesinc.wms.pgp.module.HotlinesPGPModule</Class>
    </Module>

  2. #2

    Default

    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
    Posts
    5

    Default

    Hello,

    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.

    Thanks,
    Mark

  4. #4
    Join Date
    Jun 2012
    Posts
    5

    Default

    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 192.168.0.75] File does not exist: /var/www/html/mcrpt/fcs
    [Tue Sep 11 14:24:19 2012] [error] [client 192.168.0.75] 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
    Posts
    21,962

    Default

    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

    Richard

  6. #6
    Join Date
    Jun 2012
    Posts
    5

    Default

    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.

  7. #7
    Join Date
    Dec 2007
    Posts
    21,962

    Default

    I copied that into my Wowza IDE and there is nothing in it that would cause a problem with streaming. Do you see any error or warn in the error log or IDE console when streaming with this module in place? If the Application.xml is malformed, there will be a message about that, and Wowza will use /conf/Application.xml

    Richard

  8. #8
    Join Date
    Jun 2012
    Posts
    5

    Default

    I'm not able to run the module from the IDE environment. My web application is a PHP app running under apache on a Linux CentOS system. It would take a lot of work for me to set up a test environment on my workstation to invoke this module. What I've been doing is develop code under the IDE and copy the jar to the Linux system to test. The only error/warning messages I see are warnings about unused imports when I build the module. Here is the output from the build:
    Buildfile: C:\development\workspaces\hotlinespgpmodule\build.xml
    jar:
    [jar] Building jar: C:\Program Files (x86)\Wowza Media Systems\Wowza Media Server 3.1.2\lib\hotlinespgpmodule.jar
    BUILD SUCCESSFUL
    Total time: 254 milliseconds

    I copy the hotlinespgpmodule.jar file to my WowzaMediaServer/lib directory on my Linux system and restart the Wowza service. I have deleted the Wowza error and access logs this morning and restarted. Nothing appears in the error log and the access log does not indicate any errors were encountered. When I run my web application that calls jwplayer to request a mp3 file I see entries in the Wowza access log that show each module being loaded and the methods from each module being added in. My module is named HotlinesPGPModule and is the last one in the module list. When module loading reaches my module it is not loaded and no more entries are written to the Wowza access log. Here is my module entry from Application.xml:
    <Module>
    <Name>HotlinesPGPModule</Name>
    <Description>Hotlines PGP Encyption</Description>
    <Class>com.hotlinesinc.wms.pgp.module.HotlinesPGPModule</Class>
    </Module>
    It appears the Wowza Media Server just stops when it reaches my module. Nothing is reported. I don't see anything wrong with my Module definition, but maybe there is - hard to tell because nothing is logged to indicate what the server doesn't like about it.

  9. #9
    Join Date
    Dec 2007
    Posts
    21,962

    Default

    Restart Wowza, test, then zip up conf and logs folders and send to support@wowza.com

    Include the module and the compiled jar.

    Include a link to this thread for reference

    Richard

  10. #10
    Join Date
    Jul 2015
    Posts
    2

    Default

    Hello.

    I know this thread is almost 3 years old, but I was wondering if there are any updates on marksok's issue.

    I have the exact same issue:
    I'm using Eclipse Luna with Wowza IDE 2.0 Plugin on Windows 8.1 64 bits.
    The module generated by the Wowza Plugin as is (no modifications done by me) does not seem to load when I try to connect to my application.
    As marksok, I added my module in the application.xml file and restarted the server.
    I also tried the module on Linux Ubuntu 12.04.1 LTS ... without success (same behavior).
    However, debugging the module in Eclipse works fine.

    Ca you help me on that ?

    Thanks in advance.

Page 1 of 2 12 LastLast

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
  •