Error: Search encountered problem that prevents results from being returned

Image

Had a problem today with a search issue:

I tried to stop and restart the search service

net stop osearch15

net start osearch15

But that didn’t work

I then went to checked Central admin -> Service applications – > Search Service application for status on search components and I noticed an RED X next to query processing

So I rebooted the search server and then everything was back and running again.  Note you need to REFRESH the page and then you will get the new green status.

Aside: Yesterday, I got a request to check on one our SharePoint 2013 applications which has not been modified in last couple of months. The users were getting an error related to search…

Search has encountered a problem that prevents results from being returned. If the issue persists, please contact your administrator.

Correlation ID: 85a0bd9c-3615-f0f4-b26f-38cd545f34eb

Below are the debugging steps for such an error message:

1) Looked up the correlation id in ULS logs and found an error related to query processing
Saw an error related toaccess denied for the crawler account ( I knew this was not correct because we did not update or change any security related to this account)
2) Looked up event viewer for any error messages and the below showed up
w3wp.exe: All query processing components are in ‘Failed’ status.
w3wp.exe: Query processing component ‘net.tcp://nameoftheserver/D30C5C/QueryProcessingComponent1/ImsQueryInternal’ changes its status to ‘Failed’.
3) Checked Central admin -> Service applications – > Search Service application for status on search components
4) Notice an yellow exclamation mark next to query processing
5) Restarted SharePoint Administration, SharePoint Timer Service and SharePoint Administration services through services mmc
6) Went back to Central administration to see if the exclamation mark was gone. Nope. Was still there.
7) Went back to services and restarted the Search Host Controller service
8) Opened command prompt and ran the below commands
net stop osearch15
net start osearch15
9) Went back to Central admin and refreshed the search application page
10) Saw exclamation marks on all Search related components – did not feel good at this point
11) Refreshed the page and saw that each of the components were turning green now – felt better at this point
12) After few minutes all components were in green – felt really good at this point
13) Went to the actual site and performed a search – results came back and problem solved

If you see error messages related to search, do not reset the index or re-provision the search application. Sometimes a simple reboot might actually fix the problem.

Error: Workflow 2010 failed to run after in sleep mode.

Problem: We had an issue with our SharePoint 2010 Workflows where once in sleep mode it would show failed to run in the workflow history. When only one item into the custom list ,after pause 5 mins , it will randomly to show the error ‘xxx workfow fail to run’.

To solve this the ‘xxx workfow fail to run’ error

Solution:  We found that we only have Microsoft SharePoint Foundation Workflow Timer Service started on the application server, the reason was we were concern about performance which workflows may have on the WFEs, thus this service was never started on the WFEs.  The solution was to start Microsoft SharePoint Foundation Workflow Timer Service on the WFEs.  Since then all new workflows would sleep and then automatically wake up and continue as usual.

Aside: Microsoft’s documentation explicitly says that the Microsoft SharePoint Foundation Workflow Timer Service should be run only on web servers. But it’s also marked as a ‘Can also be deployed to application servers‘. It’s recommended to be a WFE role but it’s not mandatory as far as we know.  But this started the service on all WFEs solved our problem.

Can’t Connect to the SharePoint Store

enter image description here

After setting up the SharePoint Store, I got this message and I was sure everything was setup correctly.  I checked the Event Log and saw this:

image

Solution:

Check the trust between SharePoint and the Auth provider .

OR try below option once

Go to your SharePoint site web.config and add the following line within
system.net tag:

<system.net>
<defaultProxy />
<settings>
<servicePointManager
 checkCertificateName=”false”
 checkCertificateRevocationList=”false”
/>
</settings>
</system.net>

Note: Need to do this for the web.config file on all WFE, no need for Application Server

Aside: Make that your server has access to the Microsoft url: https://store.office.com/en-in/appshome.aspx

Also you maybe need to refresh the App Store several times before any Apps will show up.  Occasionally, I’ve seen adding/removing the above <Settings></Settings> tag also solves the can’t connect to App Store.

ParseExact – String was not recognized as a valid DateTime

I’m trying to convert a string variable to DateTime format like this:

$myDate = [DateTime]::ParseExact($endDate,’dd/MM/yyyy’, [System.Globalization.CultureInfo]::InvariantCulture)

where $endDate contains a date value in the format of dd/mm/yyy which was obtained from an cvs file

Unfortunately I kept on getting the error message “ParseExact – String was not recognized as a valid DateTime” when the $endDate is 31/3/2007 but don’t get the error message when $endDate is 31/10/2006.

Close inspection seems to be that if the $endDate was 31/03/2207 then the script worked so all I have to do is ensure that the day and month are always 2 digits.

Solution:  I break the date into an array and then assemble the date time string
$newEndDate = @()
$newEndDate = $endDate.split(‘/’)

#”{0:D2}” – Adds an extra leading zerso if the day or month is only 1 digit
$temp2 = “{0:D2}” -f [int]$newEndDate[0] + “/”+ “{0:D2}” -f [int]$newEndDate[1] +”/” + “{0:D2}” -f [int]$newEndDate[2]
$file[“End Date”] = [DateTime]::ParseExact($temp2,’dd/MM/yyyy’, [System.Globalization.CultureInfo]::InvariantCulture)

Activate Features is not installed in this farm

Problem: If you ever deploy wsp from Visual Studio and get the Error Message as above “Error occurred in deployment step ‘Activate Features’: Feature with [GUID] is not installed in this farm, and cannot be added to this scope.

Solution: Change the Activate Deployment Configuration from Default to No Activation

Unable to open _layouts/15/ManageUserProfileServiceApplication.aspx

Today I went to click on a User Profile Service and to my surprise I got the Something went wrong page.

So I went to Central Admin and clicked on services on Server (spw-1a-p1n1) and checked to make sure that my User Profile Service and User Profile Synchronization Service were both Started. Sure enough both were started so i proceed to check on the second WFE (spw-1a-p1n2).

I noticed that my User Profile Service was started but NOT my User Profile Synchronization Service so I started the service by entering my credentials and in several mins it was started successfully.

Then I went to click on Application Management > Manage Service Applications and clicked on User Profile Service Application and then i was back in business.

 

REST api doesn’t show the data in xml

As a test I wanted to see what the xml data looked like using REST call thus I entered this, https://[your site url]/_api/web/lists/GetBytitle(‘Immigration%20status’)/Items, into a browser. The returned page looked like this:

I wanted to see the XML format of the data.

Solution: Go to Internet Options > Content tab > Feeds and Web Slices > click on Settings button > Uncheck Turn on feed reading view

Then refresh the browser and you should see the XML format of the REST call.

 

Couldn’t drag and drop in Explorer View and it was blank

Had an issue today where I could drag and drop any file using Explorer view.  I checked that the WebClient service was running and even though Explorer view opened up it was blank.

I can see that the address url had the below

Solution: so I just changed the address to \\intranet-p1.superman.com\dept\it\Style library and then all of the folders and items showed up.  There and after Explorer view always worked.