WEBRTC stream publish failed with custom module

Hi,

I am facing problem with custom module and WebRTC stream with Wowza server and I am using JDK-14.0.1 for Java and I am unable to publish WebRTC Stream.

I created a Java module and it doesn’t have any logic and it contains only logging. I create a app in wowza with name bienapp and add custom module in bienapp as below:

When I try publish WebRTC Stream then i get "Publish failed. Unable to connect."

Custom module code

package com.bientechnologies.wowza;

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.transcoder.util.TranscoderStreamUtils;
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 BienApplication extends ModuleBase {
    // private BienStreamListener bienStreamListener;
    
    public void doSomething(IClient client, RequestFunction function, AMFDataList params) {
        getLogger().info("doSomething");
        sendResult(client, params, "Bien-Hello Wowza");
    }

    public void onAppStart(IApplicationInstance appInstance) {
        String fullname = appInstance.getApplication().getName() + "/" + appInstance.getName();
        getLogger().info("Bien-onAppStart: " + fullname);
        
        // this.bienStreamListener = new BienStreamListener(appInstance);
    }

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

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

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

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

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

    public void onStreamCreate(IMediaStream stream) {
        getLogger().info("Bien-onStreamCreate: " + stream.getSrc());
        
        //AMFPacket keyFrame = stream.getLastKeyFrame();
        //fitmode: Fit mode (how video frame is fit to frame size). Valid values are letterbox, stretch, fit-height, fit-width, match-source, crop (default is letterbox).
        //int fitmode = TranscoderStreamUtils.frameSizeFitModeToId("letterbox");
    }

    public void onStreamDestroy(IMediaStream stream) {
        getLogger().info("Bien-onStreamDestroy: " + stream.getSrc());
    }

    public void onHTTPSessionCreate(IHTTPStreamerSession httpSession) {
        getLogger().info("Bien-onHTTPSessionCreate: " + httpSession.getSessionId());
    }

    public void onHTTPSessionDestroy(IHTTPStreamerSession httpSession) {
        getLogger().info("Bien-onHTTPSessionDestroy: " + httpSession.getSessionId());
    }

    public void onHTTPCupertinoStreamingSessionCreate(HTTPStreamerSessionCupertino httpSession) {
        getLogger().info("Bien-onHTTPCupertinoStreamingSessionCreate: " + httpSession.getSessionId());
    }

    public void onHTTPCupertinoStreamingSessionDestroy(HTTPStreamerSessionCupertino httpSession) {
        getLogger().info("Bien-onHTTPCupertinoStreamingSessionDestroy: " + httpSession.getSessionId());
    }

    public void onHTTPSmoothStreamingSessionCreate(HTTPStreamerSessionSmoothStreamer httpSession) {
        getLogger().info("Bien-onHTTPSmoothStreamingSessionCreate: " + httpSession.getSessionId());
    }

    public void onHTTPSmoothStreamingSessionDestroy(HTTPStreamerSessionSmoothStreamer httpSession) {
        getLogger().info("Bien-onHTTPSmoothStreamingSessionDestroy: " + httpSession.getSessionId());
    }

    public void onRTPSessionCreate(RTPSession rtpSession) {
        getLogger().info("Bien-onRTPSessionCreate: " + rtpSession.getSessionId());
    }

    public void onRTPSessionDestroy(RTPSession rtpSession) {
        getLogger().info("Bien-onRTPSessionDestroy: " + rtpSession.getSessionId());
    }

    public void onCall(String handlerName, IClient client, RequestFunction function, AMFDataList params) {
        getLogger().info("Bien-onCall: " + handlerName);
    }

}

Kindly suggest on above.

Thanks

I did remove the one image you posted that showed your private SSL certificate. I would suggest that you request a new SSL cert and configure it as your security may now be compromised for your Engine applications.

At this time, Wowza Streaming Engine (version 4.7.8 and later) is built on Java 9 (OpenJDK Java SE JRE 9.0.4) and supports Java 9 - Java 12. Are you able to test with a Java version that we support?

https://www.wowza.com/docs/how-to-install-and-configure-wowza-streaming-engine

I have removed installed JDK and intsalled SE JDK11 on my machine, removed existing JAR file from wowza installation folder and built new JAR file but no luck. I am still facing same problem and I can see below message in logs:

Please suggest.

Thanks

I created new Project and no custom code and it has only class definition. I found a error/warning in Logs and it seems that module is not loaded.

BienWebRTCModule.java code

package com.bientechnologies;

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.*;

public class BienWebRTCModule extends ModuleBase {

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

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

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

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

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

    public void onStreamCreate(IMediaStream stream) {
        getLogger().info("Bien-onStreamCreate: " + stream.getSrc());
    }

    public void onStreamDestroy(IMediaStream stream) {
        getLogger().info("Bien-onStreamDestroy: " + stream.getSrc());
    }

}

Registered module in Wowza App:

Before including the custom module, have you tried running the basic WebRTC workflow?

When including your custom module, did you restart Engine? You will need to restart engine after adding or editing your module.