how to create httpprovider for wowza server

182 views Asked by At

I Created a HTTP Provider and compiled it in eclipse and put the jar in /lib/ folder.

And added the HTTPProvider in VHost.xml

                <HTTPProvider>
                    <BaseClass>com.domain.appname.CreateApp</BaseClass>
                    <RequestFilters>CreateProducerApp*</RequestFilters>
                    <AuthenticationMethod>none</AuthenticationMethod>
                </HTTPProvider>
                <HTTPProvider>
                    <BaseClass>com.wowza.wms.http.HTTPConnectionInfo</BaseClass>
                    <RequestFilters>connectioninfo*</RequestFilters>
                    <AuthenticationMethod>admin-digest</AuthenticationMethod>
                </HTTPProvider>

I restarted wowza and i get this error

WARN server comment 2020-11-02 16:13:06 - - - - - 138.305 - - - - - - - - REST API: Server request (GET): Not Found (404) - The server has not found anything matching the request URI : http://localhost:8087/v2/machine/monitoring/historic?start=2020-11-02T20%3A13&end=2020-11-02T21%3A12 WARN server comment 2020-11-02 16:13:06 - - - - - 138.744 - - - - - - - - StatsDatabaseManager instance not available

Does anyone have any idea? Please help.

2

There are 2 answers

1
jabal On

Your custom provider is linked to requests that have a pattern http://yourserver.com:port/CreateProducerApp but in the log snippet you were sharing with us, we can see a completely different URL mentioned http://localhost:8087/v2/machine/monitoring/historic. What is the URL that you are using to hit your custom http provider?

0
Aak On

You mentioned in the comments that your server is not starting. This might be due to JAVA version. I faced the same issue. By Default, Wowza comes with Java 9. When I developed an HTTP Provider for my use-case, Wowza server didn't use to start after adding the jar file for the HTTP Provider. I was using openjdk11 to build the source code in Wowza IDE.

I would recommend to check your JAVA Version which you are using to build the source code for provider. If the version in different than what Wowza is using that change the JAVA version in Wowza. Steps to change JAVA version in Wowza are mentioned here