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

Forums / Developing with Sitefinity / Cant Find Segments File

Cant Find Segments File

9 posts, 1 answered
  1. Daniel
    Daniel avatar
    62 posts
    Registered:
    20 Apr 2009
    15 Feb 2010
    Link to this post
    Hi Support I am recieving the the following error:

    Server Error in '/Ebusiness' Application.
    Could not find file 'C:\Program Files\telerik\Sitefinity3.5 Community\WebSites\Ebusiness\App_Data\Search\eBusiness-Default-Index\Index\segments'.
    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.IO.FileNotFoundException: Could not find file 'C:\Program Files\telerik\Sitefinity3.5 Community\WebSites\Ebusiness\App_Data\Search\eBusiness-Default-Index\Index\segments'.
     
    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:
     
    [FileNotFoundException: Could not find file 'C:\Program Files\telerik\Sitefinity3.5 Community\WebSites\Ebusiness\App_Data\Search\eBusiness-Default-Index\Index\segments'.]
       System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +305
       System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy) +1162
       System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) +66
       Lucene.Net.Store.Descriptor..ctor(FSIndexInput enclosingInstance, FileInfo file, FileAccess mode) +47
       Lucene.Net.Store.FSIndexInput..ctor(FileInfo path) +49
       Lucene.Net.Store.FSDirectory.OpenInput(String name) +69
       Lucene.Net.Index.SegmentInfos.Read(Directory directory) +49
       Lucene.Net.Index.AnonymousClassWith.DoBody() +45
       Lucene.Net.Store.With.Run() +67
       Lucene.Net.Index.IndexReader.Open(Directory directory, Boolean closeDirectory) +110
       Telerik.Search.Engine.SearchManager.GetIndexingStatistics(String Provider) +109
       Telerik.Search.WebControls.Admin.ControlPanel.Indexes_ItemDataBound(Object sender, RepeaterItemEventArgs e) +323
       System.Web.UI.WebControls.Repeater.OnItemDataBound(RepeaterItemEventArgs e) +108
       System.Web.UI.WebControls.Repeater.CreateItem(Int32 itemIndex, ListItemType itemType, Boolean dataBind, Object dataItem) +136
       System.Web.UI.WebControls.Repeater.CreateControlHierarchy(Boolean useDataSource) +443
       System.Web.UI.WebControls.Repeater.OnDataBinding(EventArgs e) +51
       System.Web.UI.WebControls.Repeater.DataBind() +75
       Telerik.Search.WebControls.Admin.ControlPanel.LoadMainScreenTemplate() +382
       Telerik.Search.WebControls.Admin.ControlPanel.CreateChildControls() +54
       System.Web.UI.Control.EnsureChildControls() +87
       System.Web.UI.Control.PreRenderRecursiveInternal() +44
       System.Web.UI.Control.AddedControl(Control control, Int32 index) +8681381
       System.Web.UI.ControlCollection.Add(Control child) +80
       Telerik.Cms.Web.UI.ServiceList.CreateChildControls() +1132
       System.Web.UI.Control.EnsureChildControls() +87
       System.Web.UI.Control.PreRenderRecursiveInternal() +44
       System.Web.UI.Control.PreRenderRecursiveInternal() +171
       System.Web.UI.Control.PreRenderRecursiveInternal() +171
       System.Web.UI.Control.PreRenderRecursiveInternal() +171
       System.Web.UI.Control.PreRenderRecursiveInternal() +171
       System.Web.UI.Control.PreRenderRecursiveInternal() +171
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +842

    Having looked at other posts I believe I need to re-index the search index however I cannot got to the administration tab to do this!

    Any help would be very much appreciated

    Thanks Daniel
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    15 Feb 2010
    Link to this post
    Hello Daniel,

    1. Open App_Data/Search folder. This folder contains the information about your search indexes and the segment files generated by Lucene search engine.

    2. Remove all folders inside App_Data/Search

    3. Try to access the backend >> Administration >> Search. If the problem persists go to step four.

    4. Open your database and remove all data from the tables listed below

    • [sf_Search_IndexignClient] - collects data for all indexes you have created
    • [sf_Search_IndexignService] - collects data for the index name and associated service
    • [sf_Search_ClientSettings] - collects data for all client settings - properties, starting node, categories etc.

    5. Go to the backend and create your search indexes. Then run them. Make sure that ASP.NET Worker process has full access( or at least read/write permissions) over App_Data/Search folder

    Generally the problem you have comes from a single index eBusiness-Default-Index, so you could try to remove only the related data in steps from 1 to 5.


    All the best,
    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.
    Answered
  3. Daniel
    Daniel avatar
    62 posts
    Registered:
    20 Apr 2009
    15 Feb 2010
    Link to this post
    Thats Great it worked

    Thanks Ivan!!

    Dan
  4. Doug
    Doug avatar
    34 posts
    Registered:
    20 Apr 2010
    09 Jun 2010
    Link to this post
    Hi Ivan,
        I had to go as far as to truncate the three tables that you mentioned in your post.  This seemingly happened at random, I was adding a URL to a page and I started getting all sorts of Access Denied exceptions.  I went so far as to grant the 'Everyone' group read/write perms to the App_Data folder and that didn't work.  Is there a specific reason why this occurs or is it a known bug?
  5. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    09 Jun 2010
    Link to this post
    Hi Doug,

    ASP.NET worker process  need full rights over App_Data folder and its subdirectories. Full access should be granted to the Windows Temp folder as well.

    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. Bachar Zeidan
    Bachar Zeidan avatar
    67 posts
    Registered:
    01 Jul 2010
    09 Mar 2011
    Link to this post
    Hi Ivan,
    I've deployed on production server the customer site few days ago. Often all the files in the ..\App_Data\Search\MyIndex\Index folder disappears.
    I'm promptly informed of this because (fortunally) I receive a log message about a page creation failure (when a user attempt to save a page in the back-end), followed by a lot of messages about the search execution (when the visitors attemps to execute search on the front end). So I have to create the index files and launch a full indexing process!

    What can cause the deletion of the index files?
    Best regards,
    Bachar

    The errors:
    E' stata generata un eccezione. Messaggio Exception has been thrown by the target of an invocation.. Metodo o funzione :System.Object _InvokeConstructor(System.Object[], System.SignatureStruct ByRef, IntPtr). Dettaglio Errore:   at System.RuntimeMethodHandle._InvokeConstructor(Object[] args, SignatureStruct& signature, IntPtr declaringType)
       at System.RuntimeMethodHandle.InvokeConstructor(Object[] args, SignatureStruct signature, RuntimeTypeHandle declaringType)
       at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
       at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
       at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
       at Telerik.Search.Engine.Crawler.GetIndexer(String key, Dictionary`2 indexers, String provider, Boolean appendToIndex)
       at Telerik.Search.Engine.Crawler.IndexContent(String provider, LinkedList`1 data, Boolean appendToIndex, Dictionary`2 indexers)
       at Telerik.Search.Engine.Crawler.Index(String provider, String[] urls, LinkedList`1 data, Boolean appendToIndex)
       at Telerik.Search.Engine.IndexingManager.StartIndexing(String provider, LinkedList`1 content, Boolean appendToIndex)
       at Telerik.Search.Engine.IndexingService.Client_Index(Object sender, IndexEventArgs e)
       at Telerik.Cms.Engine.ContentIndexProvider.OnIndex(IndexEventArgs args)
       at Telerik.Cms.Engine.ContentIndexProvider.ContentProvider_Executed(Object sender, ExecutedEventArgs e)
       at System.EventHandler`1.Invoke(Object sender, TEventArgs e)
       at Telerik.Cms.Engine.Data.Providers.DefaultProvider.OnExecuted(ExecutedEventArgs args, Boolean fireEvents)
       at Telerik.Cms.Engine.Data.EventExecuteController.tran_EndCommit(Object sender, EventArgs e)
       at Nolics.ORMapper.Base.Transaction.OnEndCommit()
       at Nolics.ORMapper.Base.Transaction.Commit(Boolean fCleanIfSuccess)
       at Nolics.ORMapper.Base.Transaction.Commit()
       at Telerik.Cms.Engine.Data.Providers.DefaultProvider.SaveContent(IContent content, Boolean fireEvents)
       at Telerik.Cms.Engine.ContentProviderBase.SaveContent(IContent content)
       at Telerik.Cms.Engine.ContentManager.SavedStagedContent(StagedContent staged, ContentStatus status)
       at Telerik.Cms.Engine.ContentManager.SaveContent(IContent content, ContentStatus status)
       at Telerik.Cms.Engine.WebControls.Admin.ContentItemEdit`1.SaveContent()
       at Telerik.Cms.Engine.WebControls.Admin.ContentItemEdit`1.Button_Command(Object sender, CommandEventArgs e)
       at System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e)
       at System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument)
       at System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
       at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
       at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
    System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IO.FileNotFoundException: no segments* file found: files:
       at Telerik.Lucene.Net.Index.IndexWriter.Init(Directory d, Analyzer a, Boolean create, Boolean closeDir)
       at Telerik.Lucene.Net.Index.IndexWriter..ctor(String path, Analyzer a, Boolean create)
       at Telerik.Search.Engine.Crawler.GetIndexWriter(String indexName, Boolean createIndex)
       at Telerik.Search.Engine.BaseIndexer..ctor(String directory, String provider, Boolean appendToIndex)
       at Telerik.Search.Engine.HtmlIndexer..ctor(String directory, String provider, Boolean appendToIndex)
       --- End of inner exception stack trace ---
       at System.RuntimeMethodHandle._InvokeConstructor(Object[] args, SignatureStruct& signature, IntPtr declaringType)
       at System.RuntimeMethodHandle.InvokeConstructor(Object[] args, SignatureStruct signature, RuntimeTypeHandle declaringType)
       at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
       at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
       at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
       at Telerik.Search.Engine.Crawler.GetIndexer(String key, Dictionary`2 indexers, String provider, Boolean appendToIndex)
       at Telerik.Search.Engine.Crawler.IndexContent(String provider, LinkedList`1 data, Boolean appendToIndex, Dictionary`2 indexers)
       at Telerik.Search.Engine.Crawler.Index(String provider, String[] urls, LinkedList`1 data, Boolean appendToIndex)
       at Telerik.Search.Engine.IndexingManager.StartIndexing(String provider, LinkedList`1 content, Boolean appendToIndex)
       at Telerik.Search.Engine.IndexingService.Client_Index(Object sender, IndexEventArgs e)
       at Telerik.Cms.Engine.ContentIndexProvider.OnIndex(IndexEventArgs args)
       at Telerik.Cms.Engine.ContentIndexProvider.ContentProvider_Executed(Object sender, ExecutedEventArgs e)
       at System.EventHandler`1.Invoke(Object sender, TEventArgs e)
       at Telerik.Cms.Engine.Data.Providers.DefaultProvider.OnExecuted(ExecutedEventArgs args, Boolean fireEvents)
       at Telerik.Cms.Engine.Data.EventExecuteController.tran_EndCommit(Object sender, EventArgs e)
       at Nolics.ORMapper.Base.Transaction.OnEndCommit()
       at Nolics.ORMapper.Base.Transaction.Commit(Boolean fCleanIfSuccess)
       at Nolics.ORMapper.Base.Transaction.Commit()
       at Telerik.Cms.Engine.Data.Providers.DefaultProvider.SaveContent(IContent content, Boolean fireEvents)
       at Telerik.Cms.Engine.ContentProviderBase.SaveContent(IContent content)
       at Telerik.Cms.Engine.ContentManager.SavedStagedContent(StagedContent staged, ContentStatus status)
       at Telerik.Cms.Engine.ContentManager.SaveContent(IContent content, ContentStatus status)
       at Telerik.Cms.Engine.WebControls.Admin.ContentItemEdit`1.SaveContent()
       at Telerik.Cms.Engine.WebControls.Admin.ContentItemEdit`1.Button_Command(Object sender, CommandEventArgs e)
       at System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e)
       at System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument)
       at System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
       at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
       at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

    And:
    Current Url: /Risultati_Ricerca.aspx?IndexCatalogue=INDEXPAGINE_HOME_NEWS_LIBRARIES_EVENTS&SearchQuery=conciliatori&PrevPage=be725bbf-d8f0-4a35-855e-d9bb1630be91
     
    Si è verificato un errore: Exception has been thrown by the target of an invocation.
     
    System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IO.FileNotFoundException: no segments* file found: files:
       at Telerik.Lucene.Net.Index.IndexWriter.Init(Directory d, Analyzer a, Boolean create, Boolean closeDir)
       at Telerik.Lucene.Net.Index.IndexWriter..ctor(String path, Analyzer a, Boolean create)
       at Telerik.Search.Engine.Crawler.GetIndexWriter(String indexName, Boolean createIndex)
       at Telerik.Search.Engine.BaseIndexer..ctor(String directory, String provider, Boolean appendToIndex)
       at Telerik.Search.Engine.HtmlIndexer..ctor(String directory, String provider, Boolean appendToIndex)
       --- End of inner exception stack trace ---
       at System.RuntimeMethodHandle._InvokeConstructor(Object[] args, SignatureStruct& signature, IntPtr declaringType)
       at System.RuntimeMethodHandle.InvokeConstructor(Object[] args, SignatureStruct signature, RuntimeTypeHandle declaringType)
       at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
       at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
       at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
       at Telerik.Search.Engine.SearchManager.GetFields(String provider)
       at Telerik.Search.Engine.SearchManager.Search(String searchQuery, String indexName, Int32 startIndex, Int32 max, String mode, Boolean escapeChars, Int32& totalItems)
       at Telerik.Search.WebControls.SearchResult.CreateChildControls()
       at Telerik.Search.WebControls.CCSearchResult.CreateChildControls() in C:\sites\waterfall\App_Code\CCSearchResult.vb:line 1085

  7. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    09 Mar 2011
    Link to this post
    Hello Bachar,

    We do not have a code that removes the index files if you do not click "removed index" explicitly or you have custom code that does this. Another option would be if you are in some shared environment and you make files replication and the files get lost.

    Greetings,
    Ivan Dimitrov
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
  8. Bachar Zeidan
    Bachar Zeidan avatar
    67 posts
    Registered:
    01 Jul 2010
    29 Mar 2011
    Link to this post
    None of this. If I set auto-index = true, after a short time the index files disappears, I think it happens when a user save contents.
    So I set auto-index = false, but yesterday remained in line the write.lock and the syncFile.sync (why? I haven't launched the indicization process).
    In which way I can detect the reasons of these anomaly?
  9. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    29 Mar 2011
    Link to this post
    Hi Bachar,

    I am not able to replicate this issue locally. There is no code in our code base that will delete the segment files if you do not do this explicitly. You have a code that deletes the file or some third party software that does this.

    Regards,
    Ivan Dimitrov
    the Telerik team
Register for webinar
9 posts, 1 answered