Wowza Community

Getting the hostname for the request in the Random Access Reader class

Hi,

We’re using a customized version of the Random Access Reader class and would like to use the hostname of the incoming request to determine what HTTP server to proxy from. Is there a way to get this information in the init() method?

public void init(IApplicationInstance appInstance, IMediaStream stream, String basePath, String mediaName, String mediaExtension) {}

Thanks,

Vijay

Hi

You can’t do it like that you would need to use a prior method that is called first.

Try this as a starting point,

https://www.wowza.com/docs/how-to-select-audio-data-and-or-video-channel-from-a-multi-channel-mp4-file-by-using-imediareaderactionnotify

The code here may suit your needs better.

Jason

The only way would be through stream.getHTTPStreamerSession(). There is a chance that is populated at that point in time and you can get the domain through the HTTP session.

Charlie

Are you only see this when the RandomAccessReader is used to open a SMIL file? I can see that we use a disconnected IMediaStream to open SMIL files. this stream is not populated with the HTTP session information.

Charlie

I don’t think it is a good idea to rely on this behavior. We can’t guarentee that it will continue to work that way. What exactly are you trying to accomplish. Maybe there is a better way to do it.

Charlie

A more realiable way to do this might be to use the alias system. You can intercept and re-write any stream names using the alias system. The alias system also has access to full HTTPSession in all states of processing.

https://www.wowza.com/docs/how-to-use-the-imediastreamnamealiasprovider2-interface

Be sure you are running the latest version of Wowza Server since there were changes later in 3.x cycle to fix a few small problems with HTTPsessions relating to aliases. It should be a much more reliable way to do it.

Charlie

I did make a small change here that will populate the HTTP session value of the stream when reading a smil file where HTTP session is available.

WowzaMediaServer3.1.1-patch1.zip

Charlie

It looks like you are getting socket errors in the http reader which is leading to the problem. I can send you a copy of the most recent http byte reader code to help you debug. Please let me know if you need this. Better to send email to support@wowza.com.

Charlie

It should work. Make sure you have the latest version of Wowza

https://www.wowza.com/docs/wowza-streaming-engine-software-updates

Richard

Referring to this example:

https://www.wowza.com/docs/how-to-control-access-to-http-streams-cupertinostreaming-sanjosestreaming-smoothstreaming-mpegdashstreaming

Try:

httpSession.getHTTPHeader("host");

Richard

We’re already using a custom module that overrides play(), onHTTPCupertinoStreamingSessionCreate(), onHTTPSmoothStreamingSessionCreate() and onRTPSessionCreate() for RTMP, HLS, Silverlight and RTSP respectively. In the case of RTMP and RTSP, the play() and onRTPSessionCreate() methods are called first. The problem we’re facing is with HLS. Wowza calls the init() method in the RandomAccessReader class first before it gets to onHTTPCupertinoStreamingSessionCreate(). And when we’re dealing with SMIL files, every time there’s a bitrate switch, it’s the init() method that’s called.

Here is a snippet of our wowza logs for an HLS request. I added the MediaReaderListener to our custom module as well. As you can see, after the application starts, only the onMediaReaderCreate method is called after which it jumps to the init() method in our custom Random Access Reader class.

2012-04-25 14:18:57 INFO application app-start _definst_ vod/_definst_
2012-04-25 14:18:57 INFO server comment - MediaReaderListener onMediaReaderCreate
2012-04-25 14:18:57 INFO server comment - CustomRandomAccessReader.init: basePath:/vol1/ mediaName:test.mp4 extension:mp4 

Vijay

Unfortunately, it’s not. I am able to get stream.getContextStr() however but that only spits out the path starting with the application name. Was hoping there’s an API for the domain as well.

Vijay

What we’re trying to do is use the hostname to identify the customer so we can pick the appropriate origin server to proxy from. stream.getContextStr() gets us the application name but using that to identify the customer is not going to scale since it would mean creating a custom application for every customer.

The init() method in the RandomAccessReader class is always called first for an HLS request regardless of whether it’s a SMIL file or not. However, for a regular HLS stream, onHTTPCupertinoStreamingSessionCreate() is called at a later point. But for SMIL files, whenever there’s a shift to a different bitrate, only the init method is called. And you’re right, I’m unable to even get the sessionId for it.

We’re tying to pick the appropriate customer origin to proxy content from and serve via our wowza servers. We’d like to identify the customer based on the hostname in the request.

For example, customer foo makes the following HLS request to our wowza servers (where foo.cdn.com is a CNAME to our wowza server):

http://foo.cdn.com:1935/vod/_definst_/Extremists.m4v/playlist.m3u8

We’d like to use the hostname ‘foo.cdn.com’ to determine that this is the customer ‘foo’ and proxy Extremists.m4v from their origin.

Thanks Charlie, I’ll take a look. The stream alias option wouldn’t have worked for us since that would require us to include some sort of identifier in the file path for the customer which is exactly what we want to avoid.

I upgraded to 3.1.1 patch 1 to try out the change but I’m now having problems serving HLS via a proxy server. Seeing multiple MediaReaderH264Cupertino.fillChunk: java.lang.NullPointerException errors in the logs. No such issues with 3.0.3 patch 12, which is what we’re currently using.

To make sure it’s not something in our customer Random Access Reader class, I compiled the stock HTTPRandomAccessReaderDirect class that’s part of the HTTPRandomAccessReader module and set up a new application to use it.

wowza log snippet when using Wowza 3.0.3 patch 12. HLS playback is successful:

2012-05-09 15:30:47 INFO application app-start _definst_ vod/_definst_
2012-05-09 15:30:48 INFO server comment - HTTPRandomAccessReaderDirect.init: basePath:/vol1 mediaName:http://xxx.xxx.com/big_buck.mp4 extension:mp4
2012-05-09 15:30:48 INFO server comment - HTTPRandomAccessReaderDirect.init: status:200 length:18165376 lastModified:1336592412000
2012-05-09 15:30:48 INFO server comment - HTTPRandomAccessReaderDirect.init: basePath:/vol1 mediaName:http://xxx.xxx.com/big_buck.mp4 extension:mp4
2012-05-09 15:30:48 INFO server comment - HTTPRandomAccessReaderDirect.init: status:200 length:18165376 lastModified:1336592412000
2012-05-09 15:30:48 INFO server comment - HTTPRandomAccessReaderDirect.open[http://xxx.xxx.com/big_buck.mp4]
2012-05-09 15:30:48 INFO server comment - HTTPRandomAccessReaderDirect.open[http://xxx.xxx.com/big_buck.mp4]
2012-05-09 15:31:07 INFO server comment - HTTPRandomAccessReaderDirect.close[http://xxx.xxx.com/big_buck.mp4]
2012-05-09 15:31:07 INFO server comment - HTTPRandomAccessReaderDirect.close[http://xxx.xxx.com/big_buck.mp4]
2012-05-09 15:31:07 INFO cupertino connect 1855729957 -
2012-05-09 15:31:07 INFO stream create /xxx.xxx.com/big_buck.mp4 -
2012-05-09 15:31:07 INFO server comment - HTTPRandomAccessReaderDirect.init: basePath:/vol1 mediaName:http://xxx.xxx.com/big_buck.mp4 extension:mp4
2012-05-09 15:31:07 INFO server comment - HTTPRandomAccessReaderDirect.init: status:200 length:18165376 lastModified:1336592412000
2012-05-09 15:31:07 INFO server comment - HTTPRandomAccessReaderDirect.init: basePath:/vol1 mediaName:http://xxx.xxx.com/big_buck.mp4 extension:mp4
2012-05-09 15:31:07 INFO server comment - HTTPRandomAccessReaderDirect.init: status:200 length:18165376 lastModified:1336592412000
2012-05-09 15:31:07 INFO server comment - HTTPRandomAccessReaderDirect.open[http://xxx.xxx.com/big_buck.mp4]
2012-05-09 15:31:07 INFO server comment - HTTPRandomAccessReaderDirect.open[http://xxx.xxx.com/big_buck.mp4]
2012-05-09 15:31:26 INFO server comment - HTTPRandomAccessReaderDirect.close[http://xxx.xxx.com/big_buck.mp4]
2012-05-09 15:31:26 INFO server comment - MediaReaderH264Cupertino.indexFile[vod/_definst_/http:/xxx.xxx.com/big_buck.mp4][mp4a.40.2]: AAC Audio info: {MediaCodecInfoAudio: codec:AAC, channels:2, frequency:22050, samplesPerFrame:1024, objectType:LC}
2012-05-09 15:31:26 INFO server comment - MediaReaderH264Cupertino.indexFile[vod/_definst_/http:/xxx.xxx.com/big_buck.mp4][avc1.66.13]: H.264 Video info: {MediaCodecInfoVideo: codec:H264, profile:Baseline, level:1.3, frameSize:320x240, displaySize:320x240, frameRate:15.000000}
2012-05-09 15:31:27 INFO stream play /xxx.xxx.com/big_buck.mp4 -

wowza log snippet when using Wowza 3.1.1 patch 1:

2012-05-09 15:33:44 INFO application app-start _definst_ vod/_definst_
2012-05-09 15:33:44 INFO server comment - HTTPRandomAccessReaderDirect.init: basePath:/vol1 mediaName:http://xxx.xxx.com/big_buck.mp4 extension:mp4
2012-05-09 15:33:44 INFO server comment - HTTPRandomAccessReaderDirect.init: status:200 length:18165376 lastModified:1336592412000
2012-05-09 15:33:44 INFO server comment - HTTPRandomAccessReaderDirect.init: basePath:/vol1 mediaName:http://xxx.xxx.com/big_buck.mp4 extension:mp4
2012-05-09 15:33:44 INFO server comment - HTTPRandomAccessReaderDirect.init: status:200 length:18165376 lastModified:1336592412000
2012-05-09 15:33:44 INFO server comment - HTTPRandomAccessReaderDirect.open[http://xxx.xxx.com/big_buck.mp4]
2012-05-09 15:33:44 INFO server comment - HTTPRandomAccessReaderDirect.open[http://xxx.xxx.com/big_buck.mp4]
2012-05-09 15:33:44 INFO server comment - HTTPRandomAccessReaderDirect.close[http://xxx.xxx.com/big_buck.mp4]
2012-05-09 15:33:44 INFO server comment - HTTPRandomAccessReaderDirect.close[http://xxx.xxx.com/big_buck.mp4]
2012-05-09 15:33:44 INFO cupertino connect 1439261437 -
2012-05-09 15:33:44 INFO stream create /xxx.xxx.com/big_buck.mp4 -
2012-05-09 15:33:44 INFO server comment - HTTPRandomAccessReaderDirect.init: basePath:/vol1 mediaName:http://xxx.xxx.com/big_buck.mp4 extension:mp4
2012-05-09 15:33:44 INFO server comment - HTTPRandomAccessReaderDirect.init: status:200 length:18165376 lastModified:1336592412000
2012-05-09 15:33:44 INFO server comment - HTTPRandomAccessReaderDirect.init: basePath:/vol1 mediaName:http://xxx.xxx.com/big_buck.mp4 extension:mp4
2012-05-09 15:33:44 INFO server comment - HTTPRandomAccessReaderDirect.init: status:200 length:18165376 lastModified:1336592412000
2012-05-09 15:33:44 INFO server comment - HTTPRandomAccessReaderDirect.open[http://xxx.xxx.com/big_buck.mp4]
2012-05-09 15:33:44 INFO server comment - HTTPRandomAccessReaderDirect.open[http://xxx.xxx.com/big_buck.mp4]
2012-05-09 15:33:45 INFO server comment - MediaReaderH264Cupertino.indexFile[vod/_definst_/http:/xxx.xxx.com/big_buck.mp4][mp4a.40.2]: AAC Audio info: {MediaCodecInfoAudio: codec:AAC, channels:2, frequency:22050, samplesPerFrame:1024, objectType:LC}
2012-05-09 15:33:45 INFO server comment - MediaReaderH264Cupertino.indexFile[vod/_definst_/http:/xxx.xxx.com/big_buck.mp4][avc1.66.13]: H.264 Video info: {MediaCodecInfoVideo: codec:H264, profile:Baseline, level:1.3, frameSize:320x240, displaySize:320x240, frameRate:15.000000}
2012-05-09 15:34:19 INFO server comment - HTTPRandomAccessReaderDirect.close[http://xxx.xxx.com/big_buck.mp4]
2012-05-09 15:34:19 INFO server comment - HTTPRandomAccessReaderDirect.close[http://xxx.xxx.com/big_buck.mp4]
2012-05-09 15:34:19 ERROR server comment - HTTPByteReader.sendRequest[http://xxx.xxx.com:80/big_buck.mp4]: java.net.SocketException: Socket closed
2012-05-09 15:34:19 INFO stream destroy /xxx.xxx.com/big_buck.mp4 -
2012-05-09 15:34:19 INFO cupertino disconnect 1439261437 -
2012-05-09 15:34:20 ERROR server comment - MediaReaderH264Cupertino.fillChunk: java.lang.NullPointerException
java.lang.NullPointerException
	at com.wowza.wms.httpstreamer.cupertinostreaming.file.MediaReaderH264Cupertino.fillChunk(Unknown Source)
	at com.wowza.wms.httpstreamer.cupertinostreaming.file.HTTPStreamerCupertinoIndexFile.fillChunk(Unknown Source)
	at com.wowza.wms.httpstreamer.cupertinostreaming.file.HTTPStreamerCupertinoIndexBase.getChunk(Unknown Source)
	at com.wowza.wms.httpstreamer.cupertinostreaming.httpstreamer.HTTPStreamerAdapterCupertinoStreamer.onMediaFile(Unknown Source)
	at com.wowza.wms.httpstreamer.cupertinostreaming.httpstreamer.HTTPStreamerAdapterCupertinoStreamer.serviceMsg(Unknown Source)
	at com.wowza.wms.httpstreamer.cupertinostreaming.httpstreamer.HTTPStreamerAdapterCupertinoStreamer.service(Unknown Source)
	at com.wowza.wms.server.ServerHandler.a(Unknown Source)
	at com.wowza.wms.server.ServerHandler.a(Unknown Source)
	at com.wowza.wms.server.ServerHandler.messageReceived(Unknown Source)
	at com.wowza.wms.server.ServerHandlerThreaded.messageReceived(Unknown Source)
	at org.apache.mina.common.support.AbstractIoFilterChain$2.messageReceived(Unknown Source)
	at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(Unknown Source)
	at org.apache.mina.common.support.AbstractIoFilterChain.access$900(Unknown Source)
	at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceived(Unknown Source)
	at org.apache.mina.filter.codec.support.SimpleProtocolDecoderOutput.flush(Unknown Source)
	at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(Unknown Source)
	at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(Unknown Source)
	at org.apache.mina.common.support.AbstractIoFilterChain.access$900(Unknown Source)
	at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceived(Unknown Source)
	at org.apache.mina.filter.executor.ExecutorFilter.processEvent(Unknown Source)
	at org.apache.mina.filter.executor.ExecutorFilter$ProcessEventsRunnable.run(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
	at java.lang.Thread.run(Thread.java:619)
2012-05-09 15:34:20 INFO stream play http:/xxx.xxx.com/big_buck.mp4 -
2012-05-09 15:34:20 INFO cupertino connect 1439261437 -
2012-05-09 15:34:20 INFO stream create /xxx.xxx.com/big_buck.mp4 -
2012-05-09 15:34:20 INFO server comment - HTTPRandomAccessReaderDirect.init: basePath:/vol1 mediaName:http://xxx.xxx.com/big_buck.mp4 extension:mp4
2012-05-09 15:34:20 INFO server comment - HTTPRandomAccessReaderDirect.init: status:200 length:18165376 lastModified:1336592412000
2012-05-09 15:34:20 INFO server comment - HTTPRandomAccessReaderDirect.init: basePath:/vol1 mediaName:http://xxx.xxx.com/big_buck.mp4 extension:mp4
2012-05-09 15:34:20 INFO server comment - HTTPRandomAccessReaderDirect.init: status:200 length:18165376 lastModified:1336592412000
2012-05-09 15:34:20 INFO server comment - HTTPRandomAccessReaderDirect.open[http://xxx.xxx.com/big_buck.mp4]
2012-05-09 15:34:20 INFO server comment - HTTPRandomAccessReaderDirect.open[http://xxx.xxx.com/big_buck.mp4]
2012-05-09 15:34:20 INFO server comment - MediaReaderH264Cupertino.indexFile[vod/_definst_/http:/xxx.xxx.com/big_buck.mp4][mp4a.40.2]: AAC Audio info: {MediaCodecInfoAudio: codec:AAC, channels:2, frequency:22050, samplesPerFrame:1024, objectType:LC}
2012-05-09 15:34:20 INFO server comment - MediaReaderH264Cupertino.indexFile[vod/_definst_/http:/xxx.xxx.com/big_buck.mp4][avc1.66.13]: H.264 Video info: {MediaCodecInfoVideo: codec:H264, profile:Baseline, level:1.3, frameSize:320x240, displaySize:320x240, frameRate:15.000000}
2012-05-09 15:34:45 INFO server comment - HTTPRandomAccessReaderDirect.close[http://xxx.xxx.com/big_buck.mp4]
2012-05-09 15:34:45 INFO server comment - HTTPRandomAccessReaderDirect.close[http://xxx.xxx.com/big_buck.mp4]
2012-05-09 15:34:45 ERROR server comment - HTTPByteReader.sendRequest[http://xxx.xxx.com:80/big_buck.mp4]: java.net.SocketException: Socket closed
2012-05-09 15:34:45 INFO stream destroy /xxx.xxx.com/big_buck.mp4 -
2012-05-09 15:34:45 INFO cupertino disconnect 1439261437 -
2012-05-09 15:34:45 ERROR server comment - MediaReaderH264Cupertino.fillChunk: java.lang.NullPointerException
java.lang.NullPointerException
	at com.wowza.wms.httpstreamer.cupertinostreaming.file.MediaReaderH264Cupertino.fillChunk(Unknown Source)
	at com.wowza.wms.httpstreamer.cupertinostreaming.file.HTTPStreamerCupertinoIndexFile.fillChunk(Unknown Source)
	at com.wowza.wms.httpstreamer.cupertinostreaming.file.HTTPStreamerCupertinoIndexBase.getChunk(Unknown Source)
	at com.wowza.wms.httpstreamer.cupertinostreaming.httpstreamer.HTTPStreamerAdapterCupertinoStreamer.onMediaFile(Unknown Source)
	at com.wowza.wms.httpstreamer.cupertinostreaming.httpstreamer.HTTPStreamerAdapterCupertinoStreamer.serviceMsg(Unknown Source)
	at com.wowza.wms.httpstreamer.cupertinostreaming.httpstreamer.HTTPStreamerAdapterCupertinoStreamer.service(Unknown Source)
	at com.wowza.wms.server.ServerHandler.a(Unknown Source)
	at com.wowza.wms.server.ServerHandler.a(Unknown Source)
	at com.wowza.wms.server.ServerHandler.messageReceived(Unknown Source)
	at com.wowza.wms.server.ServerHandlerThreaded.messageReceived(Unknown Source)
	at org.apache.mina.common.support.AbstractIoFilterChain$2.messageReceived(Unknown Source)
	at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(Unknown Source)
	at org.apache.mina.common.support.AbstractIoFilterChain.access$900(Unknown Source)
	at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceived(Unknown Source)
	at org.apache.mina.filter.codec.support.SimpleProtocolDecoderOutput.flush(Unknown Source)
	at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(Unknown Source)
	at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(Unknown Source)
	at org.apache.mina.common.support.AbstractIoFilterChain.access$900(Unknown Source)
	at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceived(Unknown Source)
	at org.apache.mina.filter.executor.ExecutorFilter.processEvent(Unknown Source)
	at org.apache.mina.filter.executor.ExecutorFilter$ProcessEventsRunnable.run(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
	at java.lang.Thread.run(Thread.java:619)
2012-05-09 15:34:45 INFO stream play http:/xxx.xxx.com/big_buck.mp4 -
2012-05-09 15:34:45 INFO cupertino connect 1439261437 -
2012-05-09 15:34:45 INFO stream create /xxx.xxx.com/big_buck.mp4 -
2012-05-09 15:34:45 INFO server comment - HTTPRandomAccessReaderDirect.init: basePath:/vol1 mediaName:http://xxx.xxx.com/big_buck.mp4 extension:mp4
2012-05-09 15:34:45 INFO server comment - HTTPRandomAccessReaderDirect.init: status:200 length:18165376 lastModified:1336592412000
2012-05-09 15:34:45 INFO server comment - HTTPRandomAccessReaderDirect.init: basePath:/vol1 mediaName:http://xxx.xxx.com/big_buck.mp4 extension:mp4
2012-05-09 15:34:45 INFO server comment - HTTPRandomAccessReaderDirect.init: status:200 length:18165376 lastModified:1336592412000
2012-05-09 15:34:45 INFO server comment - HTTPRandomAccessReaderDirect.open[http://xxx.xxx.com/big_buck.mp4]
2012-05-09 15:34:45 INFO server comment - HTTPRandomAccessReaderDirect.open[http://xxx.xxx.com/big_buck.mp4]
2012-05-09 15:34:46 INFO server comment - MediaReaderH264Cupertino.indexFile[vod/_definst_/http:/xxx.xxx.com/big_buck.mp4][mp4a.40.2]: AAC Audio info: {MediaCodecInfoAudio: codec:AAC, channels:2, frequency:22050, samplesPerFrame:1024, objectType:LC}
2012-05-09 15:34:46 INFO server comment - MediaReaderH264Cupertino.indexFile[vod/_definst_/http:/xxx.xxx.com/big_buck.mp4][avc1.66.13]: H.264 Video info: {MediaCodecInfoVideo: codec:H264, profile:Baseline, level:1.3, frameSize:320x240, displaySize:320x240, frameRate:15.000000}
2012-05-09 15:35:11 INFO server comment - HTTPRandomAccessReaderDirect.close[http://xxx.xxx.com/big_buck.mp4]
2012-05-09 15:35:11 INFO server comment - HTTPRandomAccessReaderDirect.close[http://xxx.xxx.com/big_buck.mp4]
2012-05-09 15:35:11 ERROR server comment - HTTPByteReader.sendRequest[http://xxx.xxx.com:80/big_buck.mp4]: java.net.SocketException: Socket closed
2012-05-09 15:35:11 INFO stream destroy /xxx.xxx.com/big_buck.mp4 -
2012-05-09 15:35:11 INFO cupertino disconnect 1439261437 -
2012-05-09 15:35:11 ERROR server comment - MediaReaderH264Cupertino.fillChunk: java.lang.NullPointerException
java.lang.NullPointerException
	at com.wowza.wms.httpstreamer.cupertinostreaming.file.MediaReaderH264Cupertino.fillChunk(Unknown Source)
	at com.wowza.wms.httpstreamer.cupertinostreaming.file.HTTPStreamerCupertinoIndexFile.fillChunk(Unknown Source)
	at com.wowza.wms.httpstreamer.cupertinostreaming.file.HTTPStreamerCupertinoIndexBase.getChunk(Unknown Source)
	at com.wowza.wms.httpstreamer.cupertinostreaming.httpstreamer.HTTPStreamerAdapterCupertinoStreamer.onMediaFile(Unknown Source)
	at com.wowza.wms.httpstreamer.cupertinostreaming.httpstreamer.HTTPStreamerAdapterCupertinoStreamer.serviceMsg(Unknown Source)
	at com.wowza.wms.httpstreamer.cupertinostreaming.httpstreamer.HTTPStreamerAdapterCupertinoStreamer.service(Unknown Source)
	at com.wowza.wms.server.ServerHandler.a(Unknown Source)
	at com.wowza.wms.server.ServerHandler.a(Unknown Source)
	at com.wowza.wms.server.ServerHandler.messageReceived(Unknown Source)
	at com.wowza.wms.server.ServerHandlerThreaded.messageReceived(Unknown Source)
	at org.apache.mina.common.support.AbstractIoFilterChain$2.messageReceived(Unknown Source)
	at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(Unknown Source)
	at org.apache.mina.common.support.AbstractIoFilterChain.access$900(Unknown Source)
	at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceived(Unknown Source)
	at org.apache.mina.filter.codec.support.SimpleProtocolDecoderOutput.flush(Unknown Source)
	at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(Unknown Source)
	at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(Unknown Source)
	at org.apache.mina.common.support.AbstractIoFilterChain.access$900(Unknown Source)
	at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceived(Unknown Source)
	at org.apache.mina.filter.executor.ExecutorFilter.processEvent(Unknown Source)
	at org.apache.mina.filter.executor.ExecutorFilter$ProcessEventsRunnable.run(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
	at java.lang.Thread.run(Thread.java:619)
2012-05-09 15:35:11 INFO stream play http:/xxx.xxx.com/big_buck.mp4 -
2012-05-09 15:35:11 INFO cupertino connect 1439261437 -
2012-05-09 15:35:11 INFO stream create /xxx.xxx.com/big_buck.mp4 -
2012-05-09 15:35:11 INFO server comment - HTTPRandomAccessReaderDirect.init: basePath:/vol1 mediaName:http://xxx.xxx.com/big_buck.mp4 extension:mp4
2012-05-09 15:35:11 INFO server comment - HTTPRandomAccessReaderDirect.init: status:200 length:18165376 lastModified:1336592412000
2012-05-09 15:35:11 INFO server comment - HTTPRandomAccessReaderDirect.init: basePath:/vol1 mediaName:http://xxx.xxx.com/big_buck.mp4 extension:mp4
2012-05-09 15:35:11 INFO server comment - HTTPRandomAccessReaderDirect.init: status:200 length:18165376 lastModified:1336592412000
2012-05-09 15:35:11 INFO server comment - HTTPRandomAccessReaderDirect.open[http://xxx.xxx.com/big_buck.mp4]
2012-05-09 15:35:11 INFO server comment - HTTPRandomAccessReaderDirect.open[http://xxx.xxx.com/big_buck.mp4]
2012-05-09 15:35:11 INFO server comment - MediaReaderH264Cupertino.indexFile[vod/_definst_/http:/xxx.xxx.com/big_buck.mp4][mp4a.40.2]: AAC Audio info: {MediaCodecInfoAudio: codec:AAC, channels:2, frequency:22050, samplesPerFrame:1024, objectType:LC}
2012-05-09 15:35:11 INFO server comment - MediaReaderH264Cupertino.indexFile[vod/_definst_/http:/xxx.xxx.com/big_buck.mp4][avc1.66.13]: H.264 Video info: {MediaCodecInfoVideo: codec:H264, profile:Baseline, level:1.3, frameSize:320x240, displaySize:320x240, frameRate:15.000000}
2012-05-09 15:35:36 INFO server comment - HTTPRandomAccessReaderDirect.close[http://xxx.xxx.com/big_buck.mp4]
2012-05-09 15:35:36 INFO server comment - HTTPRandomAccessReaderDirect.close[http://xxx.xxx.com/big_buck.mp4]
2012-05-09 15:35:36 ERROR server comment - HTTPByteReader.sendRequest[http://xxx.xxx.com:80/big_buck.mp4]: java.net.SocketException: Socket closed
2012-05-09 15:35:36 INFO stream destroy /xxx.xxx.com/big_buck.mp4 -
2012-05-09 15:35:36 INFO cupertino disconnect 1439261437 -
2012-05-09 15:35:36 ERROR server comment - MediaReaderH264Cupertino.fillChunk: java.lang.NullPointerException
java.lang.NullPointerException
	at com.wowza.wms.httpstreamer.cupertinostreaming.file.MediaReaderH264Cupertino.fillChunk(Unknown Source)
	at com.wowza.wms.httpstreamer.cupertinostreaming.file.HTTPStreamerCupertinoIndexFile.fillChunk(Unknown Source)
	at com.wowza.wms.httpstreamer.cupertinostreaming.file.HTTPStreamerCupertinoIndexBase.getChunk(Unknown Source)
	at com.wowza.wms.httpstreamer.cupertinostreaming.httpstreamer.HTTPStreamerAdapterCupertinoStreamer.onMediaFile(Unknown Source)
	at com.wowza.wms.httpstreamer.cupertinostreaming.httpstreamer.HTTPStreamerAdapterCupertinoStreamer.serviceMsg(Unknown Source)
	at com.wowza.wms.httpstreamer.cupertinostreaming.httpstreamer.HTTPStreamerAdapterCupertinoStreamer.service(Unknown Source)
	at com.wowza.wms.server.ServerHandler.a(Unknown Source)
	at com.wowza.wms.server.ServerHandler.a(Unknown Source)
	at com.wowza.wms.server.ServerHandler.messageReceived(Unknown Source)
	at com.wowza.wms.server.ServerHandlerThreaded.messageReceived(Unknown Source)
	at org.apache.mina.common.support.AbstractIoFilterChain$2.messageReceived(Unknown Source)
	at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(Unknown Source)
	at org.apache.mina.common.support.AbstractIoFilterChain.access$900(Unknown Source)
	at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceived(Unknown Source)
	at org.apache.mina.filter.codec.support.SimpleProtocolDecoderOutput.flush(Unknown Source)
	at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(Unknown Source)
	at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(Unknown Source)
	at org.apache.mina.common.support.AbstractIoFilterChain.access$900(Unknown Source)
	at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceived(Unknown Source)
	at org.apache.mina.filter.executor.ExecutorFilter.processEvent(Unknown Source)
	at org.apache.mina.filter.executor.ExecutorFilter$ProcessEventsRunnable.run(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
	at java.lang.Thread.run(Thread.java:619)

I noticed the same issue when we were evaluating Wowza 3.0.5 if that helps.

Hello, I have the exact same scenario as vjagannathan. I need to know the fully qualified URL of the request, including the domain name (not IP), in order to identifiy the customer. Was this ever verified to work?

Hi Richard,

I upgraded to the latest version, but I’m not sure where to get that hostname from. I re-read the above posts, but I don’t understand this: “I did make a small change here that will populate the HTTP session value of the stream when reading a smil file where HTTP session is available.”. Where/how do I get the hostname used in the request? I wish there was a way to just get the raw request (uri) issued by the client…

Thanks Richard.