Wowza Community

Custom module bricks application

Hello,

I’ve been looking into developing a module to set custom HTTP headers, however I am already running into problems on a very basic level. My module class is currently completely empty because I wanted to rule out any issues arising via my code:

package testpackage;

import com.wowza.wms.module.ModuleBase;

public class CustomHTTPHeader extends ModuleBase {
}

When adding this module to Application.xml, I would assume it should change nothing and affect nothing

<Module>
    <Name>CustomHTTPHeaderPlugin</Name>
    <Description>Custom HTTP header plugin</Description>
    <Class>testpackage.CustomHTTPHeader</Class>
</Module>

After restarting the Application, I cannot stream to the application anymore and any HTTP calls made to the application (for an HLS playlist for example) hang at (pending). Removing the module and restarting the application fixes the issue. There are no errors in the log, neither on engine startup or application startup.

I already wrote a custom HTTP provider that has been running for years with no issues.
I am really baffled by this, am I misunderstanding something fundamentally about plugin development?

Thanks in advance for any pointers!

//edit there’s no difference in compiling in older or newer Java versions either; I assumed Wowza might have an issue there since it uses the packaged Java 9, but unfortunately that’s not it.

Sorry to hear you’re having issues with it. Can you share where exactly you added that in the application.xml? There’s an odd thing thing that can happen if it’s placed at the bottom of the modules, it will affect all the others before it. I’m not sure if that’s what’s going on here though, but it’s odd the other HTTP calls are pending.

Important: The new HTTP provider must be above the last HTTP provider that’s used to resolve all requests that aren’t handled by other providers.

Can you send a support ticket so we can take a closer look at the configuration? These things can be too tricky to troubleshoot without full access to logs and files, Thanks!

Hi,

ok, I will send a support ticket, and update this with any solution found, for further reference, thanks.

For now, this is the full tag in the application.xml:

<Modules>
    <Module>
        <Name>base</Name>
        <Description>Base</Description>
        <Class>com.wowza.wms.module.ModuleCore</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>ModuleCoreSecurity</Name>
        <Description>Core Security Module for Applications</Description>
        <Class>com.wowza.wms.security.ModuleCoreSecurity</Class>
    </Module>
    <Module>
        <Name>ModuleOnTextDataToCEA608</Name>
        <Description>ModuleOnTextDataToCEA608</Description>
        <Class>com.wowza.wms.timedtext.live.module.ModuleOnTextDataToCEA608</Class>
    </Module>
    <Module>
        <Name>CustomHTTPHeaderPlugin</Name>
        <Description>Custom HTTP header plugin</Description>
        <Class>testpackage.CustomHTTPHeader</Class>
    </Module>
</Modules>

Turns out I had just forgotten that Wowza doesn’t use the system’s Java, but the packaged Java 9. Thus it is important to compile your custom modules on an old JDK.

1 Like