I got this error and spent hours on finding solution. Here is the list you need to check:
has the account ‘MOSS-RTM\Administrator’ actually got access to the SQL Server? MOSS-RTM\Administrator is the default content access account? If SQL Server is on a different server is this a domain account?
also is Office SharePoint Server Search Windows Service was running with the LOCAL SERVICE account.? This is what I failed even I gave db permission to the account
Local Server Farm cannot be detected. This was the most common error we encountered while attempting to get Surfacting deployed on test systems came from security problems. We found two causes for the following screen which occurred during a crawl of the data:
1. NT AUTHORITY\Local Service did not have permission to access to the <%SysVol%>\Windows\system32\drivers\etc\hosts file.
2. Once this problem was resolved, the screen persisted until we gave a real domain\user account the right to access content ( the default account is NT AUTHORITY\Local Service and this does not work. Check it by
Central Administration > Operations > Services on Server ->
The Default content access account that is located in your ‘Configure Search Settings’ doesn’t have the correct permissions. There is a good chance that the password has either expired or someone has changed it recently.
Click on the user name on the Configure Serach Settings and make sure the user you enter has enough rights to access the content.
Note: Specify an account to use as the default account when crawling content. This account must have read access to the content being crawled. To avoid crawling unpublished versions of documents, ensure that this account is not an administrator on the target server.
And always check C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\LOGS. Search by Sort the files by Date Modified and open the latest one. There’s a good chance that you see something simular to Access Denied