This project is read-only.

MediaEncoderService.exe Error[fileSystemWatcher_Created]

Jun 15, 2009 at 10:00 PM

Hello,

After fighting with the MediaEncoderService for awhile, I finally got it to run (and not stop immediately). However, now I am having the following error show up in the Event Viewer:

Error loading and running event receiver Microsoft.MSIT.NetworkFileStore.Global.ItemEventReceiver in Microsoft.MSIT.NetworkFileStore, Version=1.0.0.0, Culture=neutral, PublicKeyToken=039e36666027bfc6. Additional information is below.

: Requested registry access is not allowed.

 

I am also seeing the following in the encoder.log:

 [6/15/2009 4:54:23 PM] Error[fileSystemWatcher_Created]: Object reference not set to an instance of an object.
StackTrace:
   at MediaEncoderService.MediaEncoderService.ActOnNewFile(String fullPath)

The encoder is creating thumbnails properly, but it appears as though its not creating the audio/video.

Any thoughts?

Jun 16, 2009 at 3:21 PM
Edited Jun 16, 2009 at 3:47 PM

After debugging the MediaEncoder service, I have found the source of my issue... however, I'm not sure how I should resolve it... I don't want to change the code, but I'm not sure how this particular section of code could ever work... Below I have pasted the constructor that is causing the problem...

public PKSListItem(string path, MEConfig meConfig, Recode Recoder)
        {
            filepath = path;
            config = meConfig;
            recoder = Recoder;
           
            fields = new Hashtable();

            outputPath = filepath.Substring(0, filepath.LastIndexOf('\\'));
            string[] part = OutputPath.Split('\\');

            fileExt = string.Empty;

            int idx = filepath.LastIndexOf('.');
            if (idx != -1)
            {
                fileExt = filepath.Substring(idx + 1);
            }

            serverRelativeBaseUrl = outputPath;
            serverRelativeBaseUrl = serverRelativeBaseUrl.Replace(config.ConfigurationList.GetValueByKey(Constants.MediaEncoderMonitorPath), string.Empty).Replace(Path.DirectorySeparatorChar, '/');

            if (!serverRelativeBaseUrl.StartsWith("/"))
            {
                serverRelativeBaseUrl = string.Format("/{0}", serverRelativeBaseUrl);
            }

            serverRelativeBaseUrl = string.Format("/_layouts/NetworkFileStore/UploadFolder{0}", serverRelativeBaseUrl);
 
            extConfig = config.ExternalStores.GetValueByKey(MEConfig.GetKey(part[part.Length - 3], part[part.Length - 2]));

            if (extConfig == null)
            {
                return;
            }

            lws = new ListWebService(extConfig.WebUrl);

            csId = string.Format("%7b{0}%7d%40%7b{1}%7d", part[part.Length - 3], part[part.Length - 2]);
            item = lws.GetListItem(part[part.Length - 1], extConfig.ListName);
            listFields = lws.GetListColumnNames(extConfig.ListName);
            addListFields();
        }

What happens is, when it gets to: extConfig = config.ExternalStores.GetValueByKey(MEConfig.GetKey(part[part.Length - 3], part[part.Length - 2]));
part[part.Length - 3] returns "UploadFolder", and part[part.Length - 2] returns the 2nd GUID. I assume that part[part.Length - 3] should return the first GUID. What this does in effect is create a key that cannot be retrieved from the ExternalStores object - then, since extConfig is null, the constructor is exited without setting up csId and item, which throws an error when the next line of MediaEncoderService.cs is executed:
Logger.WriteLine(Constants.MainLog, "Item created: {0}@{1}", item.CsId, item.GetField(Constants.IDFieldName).FieldValue);

 

If anyone could give me some insight into how I should go about fixing this, I would appreciate it!

Jun 18, 2009 at 8:41 PM

I created a brand new MOSS2007 SP1 environment on W2K3SP2 64 bit and SQL2K5. Installed it, this time without errors. Followed the documentation very carefully, but it is still not working. This time, I don't even get the thumbnails to display once I upload a podcast. The errors I receive in the encoder.log are:

 

[6/18/2009 3:35:44 PM] Error[fileSystemWatcher_Created]: Object reference not set to an instance of an object.
StackTrace:
   at MediaEncoderService.MediaEncoderService.ActOnNewFile(String fullPath)

[6/18/2009 3:35:44 PM] GetListItem entered
[6/18/2009 3:35:44 PM] Error[GetListColumnNames]: Exception of type 'Microsoft.SharePoint.SoapServer.SoapServerException' was thrown.
StackTrace:
   at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
   at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
   at MediaEncoderService.Lists.Lists.GetList(String listName)
   at MediaEncoderService.ListWebService.GetListColumnNames(String listName)

[6/18/2009 3:35:44 PM] Error[fileSystemWatcher_Created]: Exception of type 'Microsoft.SharePoint.SoapServer.SoapServerException' was thrown.
StackTrace:
   at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
   at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
   at MediaEncoderService.Lists.Lists.GetListItems(String listName, String viewName, XmlNode query, XmlNode viewFields, String rowLimit, XmlNode queryOptions, String webID)
   at MediaEncoderService.ListWebService.GetListItem(String itemId, String listName)
   at MediaEncoderService.PKSListItem..ctor(String path, MEConfig meConfig, Recode Recoder)
   at MediaEncoderService.MediaEncoderService.ActOnNewFile(String fullPath)

 

If anyone can offer me some help or point me in the right direction, I would appreciate it.

Jun 19, 2009 at 7:16 AM

Hi, I've been having the same problem and basically the file system watcher is fired for every item that is created in your uploadfolder. So what you are seeing here is the event firing for the folder creation. I'm adding in some logic to avoid processing unless the outpath has an extension on it. That should prevent these erroneous errors from being logged.

Jul 16, 2009 at 2:58 PM

Hi,

This seems to be a Media Encoder Service configuration issue.

1. Verify that C:\Program Files\PKS\Media Encoder Service\MediaEncoderService.exe.config has proper value for <add key="configWeb" value="http://<site name>" />

2. Verify that list PKS Media Encoder Monitor Loactions has proper entries:

Title                                    <title>  
WebID                                <web id>
ListID                                  <listid>  
WebURL                              http://<sitename>  
BaseURL                              http://<sitename>/UploadFolder  
ListName                             PKS Podcasts  
DurationField                       Duration  
DurationSecondsField           DurationSecondsField  
EfsField                               NFS Xml Blob 

3. Also go to the PKS Configuration Settings list on the site and verify that the following are proper:
a. Verify the entries for MediaEncoder.MonitorPath .(It should point to your location of External File Store. Example: C:\UploadFiles)
b. Verify the entries for MediaEncoder.MonitorWeb (It should point to root of your PKS site collection. Example: http://pksdemo3 )

Hope this helps.

-Parag

 

Jul 29, 2009 at 11:52 AM

bikoenig,

            Did you find a solution?? Please let me know since I'm facing the same problem.

Jul 29, 2009 at 12:13 PM

parag,

        All those in your verifications are correct but still it doesnt work.

Jul 29, 2009 at 1:25 PM

Hi scvinod,

I put some logic in the file system watcher to only do the processing when the file that triggered it has an extension on it.

The problem I was seeing was that when the output folder was created it triggered the watcher which fell over as it wasn't a file.

Hope that helps,

fatalfrenchy