+1-888-365-2779
Try Now
More in this section

Forums / Bugs & Issues / Search Index perms and "already exists"

Search Index perms and "already exists"

7 posts, 0 answered
  1. Scott Rozman
    Scott Rozman avatar
    93 posts
    Registered:
    10 Oct 2012
    02 Dec 2010
    Link to this post
    Today I ran into an error when a user was publishing a new page. It seemed like it was failing to update my search index of page content, but the page was actually published. It seemed similar to errors I've seen if Network Service does not have sufficient permissions on the App_Data folder, so I checked and that was fine.
    I next decided to try and delete the page index and just generate a new one. It failed when I tried to delete the index, but then Sitefinity acts like there is no available search indexes and I can not create a new one of the same name because it "already exists". This is Sitefinity 3.7 SP4 (assuming that all pieces were patched properly... I am running multiple instances and have done upgrades with Beyond Compare).
    I see that the files are still in the search folder of App_Data, along with a lock file that was showing the date/time when we were last trying to publish.

    thanks in advance for suggestions on cleaning this up!
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    02 Dec 2010
    Link to this post
    Hi Scott,

    Can you show the error and the stack trace ?

    Regards,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Scott Rozman
    Scott Rozman avatar
    93 posts
    Registered:
    10 Oct 2012
    06 Dec 2010
    Link to this post
    Here is the original yellow screen as captured by ELMAH on Dec 1 when I had the problem, followed by a second that happened while I was trying to resolve the problem. At the time, I couldn't get things to behave properly and was getting an error when I tried to delete my Search Index and create a new with the same name.
    I just went back into this and made edits to a page with no errors, then created a search index called "PageContent", the same as my original and no errors.
    Also, I have no errors further than Dec 1 when this happened for a user and I was able to reproduce the problem myself.
    Could this type of error that "Fixes itself" when the app pool auto recycles?

    Several weeks ago, we started adding ELMAH to all of our Sitefinity instances, so we can have a handle on whether users are encountering any problems or if there are bad links etc. on a site. I don't have time to follow up on every single thing that ELMAH captures, but it seems to me that I've seen other instances of errors relating to segments.gen, so it would be useful to know if there may be something weird with our configuration or perhaps an occasional bug that pops up.

    thanks for any info you can provide!

    Server Error in '/' Application.

    Access to the path 'D:\webfiles\test3\main\App_Data\Search\PageContent\Index\segments.gen' is denied.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.UnauthorizedAccessException: Access to the path 'D:\webfiles\test3\main\App_Data\Search\PageContent\Index\segments.gen' is denied.

    ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity. ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5 or Network Service on IIS 6 and IIS 7, and the configured application pool identity on IIS 7.5) that is used if the application is not impersonating. If the application is impersonating via <identity impersonate="true"/>, the identity will be the anonymous user (typically IUSR_MACHINENAME) or the authenticated request user.

    To grant ASP.NET access to a file, right-click the file in Explorer, choose "Properties" and select the Security tab. Click "Add" to add the appropriate user or group. Highlight the ASP.NET account, and check the boxes for the desired access.

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Stack Trace:

    [UnauthorizedAccessException: Access to the path 'D:\webfiles\test3\main\App_Data\Search\PageContent\Index\segments.gen' is denied.]
       System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +12892935
       System.IO.File.Delete(String path) +250
       Telerik.Lucene.Net.Store.FSDirectory.CreateOutput(String name) +186
       Telerik.Lucene.Net.Index.SegmentInfos.Write(Directory directory) +352
       Telerik.Lucene.Net.Index.IndexWriter.MergeSegments(SegmentInfos sourceSegments, Int32 minSegment, Int32 end) +1380
       Telerik.Lucene.Net.Index.IndexWriter.FlushRamSegments() +121
       Telerik.Lucene.Net.Index.IndexWriter.Optimize() +58
       Telerik.Search.Engine.BaseIndexer.Close() +27
       Telerik.Search.Engine.Crawler.Index(String provider, String[] urls, LinkedList`1 data, Boolean appendToIndex) +386
       Telerik.Search.Engine.IndexingManager.StartIndexing(String provider, LinkedList`1 content, Boolean appendToIndex) +92
       Telerik.Cms.Search.PageIndexProvider.CmsManager_Executed(Object sender, ExecutedEventArgs e) +1404
       Telerik.Cms.Data.StagedPage.Publish() +1525
       Telerik.Cms.Data.StagedPage.CheckIn() +163
       Telerik.Cms.Web.UI.ToolBar.Button_Command(Object sender, CommandEventArgs e) +159
       System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e) +130
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3691
    

    Server Error in '/' Application.

    Access to the path 'fieldsInfoProvider.xml' is denied.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.UnauthorizedAccessException: Access to the path 'fieldsInfoProvider.xml' is denied.

    ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity. ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5 or Network Service on IIS 6 and IIS 7, and the configured application pool identity on IIS 7.5) that is used if the application is not impersonating. If the application is impersonating via <identity impersonate="true"/>, the identity will be the anonymous user (typically IUSR_MACHINENAME) or the authenticated request user.

    To grant ASP.NET access to a file, right-click the file in Explorer, choose "Properties" and select the Security tab. Click "Add" to add the appropriate user or group. Highlight the ASP.NET account, and check the boxes for the desired access.

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Stack Trace:

    [UnauthorizedAccessException: Access to the path 'fieldsInfoProvider.xml' is denied.]
       System.IO.Directory.DeleteHelper(String fullPath, String userPath, Boolean recursive) +5011593
       System.IO.Directory.Delete(String fullPath, String userPath, Boolean recursive) +294
       Telerik.Search.WebControls.Admin.ControlPanel.DeleteServiceHolder(String serviceName) +298
       Telerik.Search.WebControls.Admin.ControlPanel.Service_Command(Object sender, CommandEventArgs e) +449
       System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e) +130
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3691
    
  4. Scott Rozman
    Scott Rozman avatar
    93 posts
    Registered:
    10 Oct 2012
    06 Dec 2010
    Link to this post
    Ivan, I guess I celebrated too fast.... Now that the index was re-created, searching works fine, but the problem has returned with access to segments.gen.

    The error is the same as the first one I had posted above.
  5. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    06 Dec 2010
    Link to this post
    Hi Scott,

    Have you granted ASP.NET or NETWORK SERVICE accounts full access over App_Data folder? The error says that you do not have permissions to do this. You your application pool uses another account you shoul grant it with full rights over App_Data.

    Kind regards,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  6. Scott Rozman
    Scott Rozman avatar
    93 posts
    Registered:
    10 Oct 2012
    06 Dec 2010
    Link to this post
    OK, looks like this is due to a recent migration from a Server 2008 dev box to a new Server 2008R2 dev box.
    On the old box , Network Service is the default indentity when we create a new app pool. On the new box, the default identity matches the app pool name, so I was unknowingly running under a different identity.
  7. Sean
    Sean avatar
    1 posts
    Registered:
    10 Mar 2011
    10 May 2011
    Link to this post
    Hi,
    I'm having the same issue, but able to get it work by changing the application pool from Network Service to System on IIS7 server 2008

Register for webinar
7 posts, 0 answered