Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: Close references to file so it can be moved

  1. #1
    Join Date
    May 2013
    Posts
    13

    Default Close references to file so it can be moved

    My VOD interface allows the user to move a file to another directory. In order to do this, it signals Wowza to close all references to the stream so the underlying file can be moved. This works correctly on my Windows 7 development machine, but does not work on the Server 2008 production machine. On the Server 2008 install, the player gets notified of the error correctly, but Wowza keeps a handle open to the file, preventing the file move from working. Both installs are 4.1.0 with identical configuration except for the StorageDirs.

    Do I need to do something else to get Wowza to relinquish its file handle?

    Relevant module code:
    	public void endWithError(IMediaStream stream, String code, String desc) {
    		sendStreamOnStatusError(stream, code, desc);
    		Timer t = new Timer();
    		t.schedule(new StreamKiller(stream), 500);
    	}
    	
    	class StreamKiller extends TimerTask {
    		private final IMediaStream stream;
    		StreamKiller (IMediaStream stream) {
    			this.stream = stream;
    		}
    		public void run() {
    			stream.getClient().rejectConnection();
    			stream.getClient().shutdownClient();
    		}
    	}
    
    // the matched streams are terminated like so:
    streamModule.endWithError(stream, "NetStream.Play.StreamNotFound", "Video was moved or renamed");

  2. #2

    Default

    Hello there,

    Are you seeing any indication of the issue in the logs? You could compare the logs from the development machine with the logs from the production machine and maybe narrow done the problem.

    Troubleshooting custom code is a bit out of scope for the forum, although it does happen on occasion. You might consider posting to the find a consultant forum.

    Kind regards,

    Salvadore

  3. #3
    Join Date
    May 2013
    Posts
    13

    Default

    Working (Windows 7):

    INFO stream play sample.mp4 -
    INFO server comment - APIServer: terminating matched VOD stream: /sample.mp4 from 127.0.0.1
    INFO stream stop sample.mp4 -
    INFO stream destroy sample.mp4 -
    INFO session disconnect 305586820 -

    Not working (Server 2008):

    INFO stream play sample.mp4 -
    INFO server comment - APIServer: terminating matched VOD stream: /sample.mp4 from 127.0.0.1

    In other words, the stream never gets destroyed. So what's the correct way to force a stream closed?

  4. #4

    Default

    For Flash clients try with IClient.setShutdownClient(true);
    For example:
    stream.getClient().setShutdownClient(true);
    For HTTP take a look at this example:
    How to control access to an HTTP stream (cupertinostreaming, smoothstreaming, sanjosestreaming, mpegdashstreaming)
    httpSession.rejectSession();
    Salvadore

  5. #5
    Join Date
    May 2013
    Posts
    13

    Default

    Same result with setShutdownClient(true). It looks like the stream gets closed by the "watchdog" after about 90 seconds, but this is much too slow for my purposes. Note the timestamps:

    2014-10-15 12:20:51 INFO server comment - APIServer: terminating matched VOD stream: /2014/Group 2014-10-10.mp4 from 127.0.0.1
    2014-10-15 12:20:52 INFO server comment - StreamModule: running setShutdownClient(true) for 2014/Group 2014-10-10.mp4
    2014-10-15 12:22:21 INFO session comment 624980120 client connectionClosed [624980120] watchdog
    2014-10-15 12:22:21 INFO stream stop 2014/Group 2014-10-10.mp4 -
    2014-10-15 12:22:21 INFO stream destroy 2014/Group 2014-10-10.mp4 -
    2014-10-15 12:22:21 INFO session disconnect 624980120 -

  6. #6

    Default

    I think the best bet here would be to open a ticket.

    Please zip up your /conf and /logs folders and send them to support@wowza.com. In the email please also include a link to this thread as a reference.

    Thank you,

    Salvadore

  7. #7
    Join Date
    Sep 2011
    Posts
    1,931

    Default

    Hi,
    This will now be handled via the ticket you have created (106291).

    Thanks,
    Jason

  8. #8
    Join Date
    May 2013
    Posts
    13

    Default

    When can I expect to see an update on this support case? I have e-mailed support@wowza.com with no response.

  9. #9
    Join Date
    May 2013
    Posts
    13

    Default

    Bump. I would like to see an update on ticket 106291 either here or by e-mail.

  10. #10

    Default

    Hello, the Wowza support team usually responds within a few days. It is possible the email reply has landed in your spam folder.

    Salvadore

Page 1 of 2 12 LastLast

Similar Threads

  1. cupertino stream close does not close connection
    By urgentkettle in forum Server-side Modules and Code Samples Discussion
    Replies: 5
    Last Post: 03-18-2012, 03:04 PM
  2. Recording has stopped having moved to 3.0.3 from 2.2.4
    By maxbrooks in forum General Forum
    Replies: 3
    Last Post: 12-02-2011, 09:39 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •