What's the return value when streamNameAlias runing?

Hello…

I have some problem that using addon of streamNameAlias .

[1] Problem

When i need to reject session, return null of name or wrong string of it.

Client protocol is HLS.

I have many null point exception, it has accumulated so long time died wowza server.

[2] My module code is…

[PHP]

public void onAppStart(IApplicationInstance appInstance) {

String fullname = appInstance.getApplication().getName() + “/”+ appInstance.getName();

appInstance.setStreamNameAliasProvider(this);

}

public String resolvePlayAlias(IApplicationInstance appInstance,

String name, IHTTPStreamerSession httpSession) {

getLogger().debug("[ModuleTimeLimitedURL] Resolve Play HTTPSession: " + name);

String streamName = StreamNameAlias(name);

if (streamName == null || “”.equals(streamName)){

httpSession.rejectSession();

getLogger().info(" [ModuleTimeLimitedURL] Reject HTTPSession Session");

}

return streamName;

}

[/PHP]

[3] Logs when it was occurred

[PHP]

[ModuleTimeLimitedURL] Resolve Play HTTPSession: mp4:7df25851-29bb-48ce-b3ed-12d715903294/2014/08/18/82c407e4-1499-4e4a-8908-393b4652296c/7685eb48-35b0-49d7-89d9-abceb6b88e77.mp4 - - - 0.046 - - - - - - - - - - - - - - - - - - - - - - - - -

com.weandsoft.wenmedia.security.module.ModuleTimeLimitedURL.resolvePlayAlias(ModuleTimeLimitedURL.java:154)|at com.wowza.wms.application.ApplicationInstance.internalResolvePlayAlias(ApplicationInstance.java:4121)|at com.wowza.wms.httpstreamer.model.HTTPStreamerAdapterBase.resolveStreamName(HTTPStreamerAdapterBase.java:1075)|at com.wowza.wms.httpstreamer.cupertinostreaming.httpstreamer.HTTPStreamerAdapterCupertinoStreamer.onPlaylist(HTTPStreamerAdapterCupertinoStreamer.java:695)| - - - 0.049 - - - - - - - - - - - - - - - - - - - - - - - - -

2014-09-30 20:52:45 KST comment server INFO 200 - [ModuleTimeLimitedURL] Reject HTTPSession Session - - - 0.049 - - - - - - - - - - - - - - - - - - - - - - - - -

2014-09-30 20:52:45 KST comment server ERROR 500 - HTTPStreamerAdapterCupertinoStreamer.onPlaylist: java.lang.NullPointerException|at com.wowza.wms.util.ModuleUtils.decodeStreamExtension(ModuleUtils.java:205)|at com.wowza.wms.httpstreamer.model.HTTPStreamerAdapterBase.resolveStreamName(HTTPStreamerAdapterBase.java:1076)|at com.wowza.wms.httpstreamer.cupertinostreaming.httpstreamer.HTTPStreamerAdapterCupertinoStreamer.onPlaylist(HTTPStreamerAdapterCupertinoStreamer.java:695)|at com.wowza.wms.httpstreamer.cupertinostreaming.httpstreamer.HTTPStreamerAdapterCupertinoStreamer.serviceMsg(HTTPStreamerAdapterCupertinoStreamer.java:465)|at com.wowza.wms.httpstreamer.cupertinostreaming.httpstreamer.HTTPStreamerAdapterCupertinoStreamer.service(HTTPStreamerAdapterCupertinoStreamer.java:422)| - - - 0.049 - - - - - - - - - - - - - - - - - - - - - - - - -

2014-09-30 20:52:46 KST comment server DEBUG 200 - RTPMediaCaster#Reconnector.run: reconnectDelay: 100 - - - 187.239 - - - - - - - - - - - - - - - - - - - - - - - - -

2014-09-30 20:52:46 KST comment server DEBUG 200 - RTPMediaCaster#Reconnector.run: reconnectDelay: 100 - - - 187.345 - - - - - - - - - - - - - - - - - - - - - - - - -

2014-09-30 20:52:46 KST comment server DEBUG 200 - RTPMediaCaster#Reconnector.run: reconnectDelay: 2999 - - - 187.446 - - - - - - - - - - - - - - - - - - - - - - - - -

2014-09-30 20:52:49 KST comment server DEBUG 200 - RTPMediaCaster#Reconnector.run: reconnectDelay: 100 - - - 190.446 - - - - - - - - - - - - - - - - - - - - - - - - -

2014-09-30 20:52:49 KST comment server DEBUG 200 - RTPMediaCaster#Reconnector.run: reconnectDelay: 2999 - - - 190.547 - - - - - - - - - - - - - - - - - - - - - - - - -

2014-09-30 20:52:52 KST comment server DEBUG 200 - RTPMediaCaster#Reconnector.run: reconnectDelay: 100 - - - 193.548 - - - - - - - - - - - - - - - - - - - - - - - - -

2014-09-30 20:52:52 KST comment server DEBUG 200 - RTPMediaCaster#Reconnector.run: reconnectDelay: 100 - - - 193.649 - - - - - - - - - - - - - - - - - - - - - - - - -

2014-09-30 20:52:52 KST comment server DEBUG 200 - RTPMediaCaster#Reconnector.run: reconnectDelay: 2999 - - - 193.751 - - - - - - - - - - - - - - - - - - - - - - - - -

2014-09-30 20:52:53 KST comment server DEBUG 200 - [ModuleTimeLimitedURL] onHTTPSessionDestroy and shut down: 314285551 - - - 8.066 - - - - - - - - - - - - - - - - - - - - - - - - -

2014-09-30 20:52:53 KST comment server DEBUG 200 - [ModuleTimeLimitedURL] onHTTPCupertinoStreamingSessionDestroy and shut down: 314285551 - - - 8.068 - - - - - - - - - - - - - - - - - - - - - - - - -

2014-09-30 20:52:55 KST comment server DEBUG 200 - RTPMediaCaster#Reconnector.run: reconnectDelay: 100 - - - 196.751 -

[/PHP]

How can i fix it?

Thanks regard.

Hello there.

Are you using the IMediaStreamNameAliasProvider2 interface or the StreamNameAlias AddOn? Or are you using both together?

You cannot use the interface in the same application with the StreamNameAlias AddOn, and you cannot use .stream files if you are using this interface.

Can you please provide some more detail about your implementation?

Thank you.

Salvadore

Hello,

Troubleshooting custom code is beyond the scope of this forum. Can you please test the IMediaStreamNameAliasProvider2 API without the custom code and verify that it does work?

Thank you.

Salvadore

Also please confirm that the stream exists at that point of the resolvePlayAlias event.

If everything checks out without the custom code you can send a zip file of the /lib, /conf and /logs folders to support@wowza.com to open a ticket. And someone will look at this closer.

Thanks again.

Salvadore

Hello…

I used "IMediaStreamNameAliasProvider2 " API for streamNameAlias.

Don’t used duplicate it.

thanks…