"Unable to connect to X1 Service. All attempts to start and connect to X1Servicehost failed"

X1 Search is made up of a couple of different executables that run in parallel with each other. A very simplified overview of the process is that X1.exe controls the user interface (all the stuff that the user sees and interacts with) and X1Servicehost.exe does the heavy lifting in the background (scanning the drive and providing the UI with content). 

The two processes communicate to each other using the Microsoft WCF architecture, (https://docs.microsoft.com/en-us/dotnet/framework/wcf/whats-wcf for more info).

Generally the root cause of the "Unable to connect to X1 Service. All attempts to start and connect to X1Servicehost failed" error of falls into one of the following categories: 

  • Antivirus Interference: Antivirus software sees X1 Search's indexing of the machine as suspicious and interferes with or outright quarantines X1Servicehost.exe!
  • Backup Software Interference: Backup software locks the files X1Servicehost.exe needs to start
  • WCF Interference: Another program is hijacks the entire WCF communication channel, preventing the processes from communicating 
  • Index Corruption: A malformed index is causes X1Servicehost.exe to crash before the WCF communication channel can be established 

Troubleshooting Possible Antivirus Interference:
The best possible method for troubleshooting antivirus interference is to shut down the antivirus program in question, and see if X1 launches normally. If it is determined that an antivirus solution was interfering with normal usage of X1 Search, configuring the antivirus in question to "whitelist" the following list of executables and directories will allow for normal functioning in most cases: 

X1 Search Executables that must be whitelisted:

  • X1.exe
  • X1ServiceHost.exe
  • X1ContentExtraction.exe
  • X1Viewer.exe
  • WebImageExtractor.exe

Directories that must be whitelisted:

  • C:\Program Files\X1 Search\
  • C:\Program Files (x86)\X1 Search\
  • C:\ProgramData\X1 Search
  • C:\Users\%USER%\AppData\Local\X1 Search (The directory where the indexes are stored by default)

Troubleshooting Possible Backup Software Interference:
If it has been determined that the source of the issue is not antivirus related, investigate backup programs. Are the X1 Search directories blacklisted from backing up? Does exiting the backup software allow X1 to launch normally?

Troubleshooting WCF Interference:
This is a more difficult issue to diagnose. The most comprehensive way to test for interference is to close all other programs and services other than X1 Search, and see if Search launches. Once X1 Search launches correctly, test programs one by one to see if they interfere with X1's function.

Our QA engineers have devised a script that can sometimes detect this sort of interference without having to test every other program to detect interference.

Steps for running the "Get_Pipe_Info" script:

  1. Download and extract this .zip file to your desktop: https://www.x1.com/download/X1Search/get_pipe_info_new.zip
  2. Relaunch X1 Search and wait for the “Unable to Connect” error to display on the screen.
  3. Once the "Unable to Connect" error message appears, leave the error message on the screen and follow the rest of the steps.
  4. Right click on the extracted file and select Run as Administrator (Please note: you must have administrative rights one your machine for this to work. If you do not, please contact your IT department)
  5. The script will run and generate a text document which lists the conflicting processes.
  6. Disable the service listed in the text document to see if it is in fact causing X1 to fail during launch.

Troubleshooting Corrupt Indexes:
The most common indicator of a malformed index is in the crash logs for X1Servicehost.exe. Generally the stack trace (contained within the generated X1Servicehost.exe.crash.xml) will have a line that says “UnmanagedCodeException: Crash in X1IndexCore.dll”. This is an indicator that one or more of the indexes is causing X1Servicehost.exe to crash. By reviewing X1indexcore.log one can further determine the problematic index.

For example, when reading from X1Indexcore.log:

5/19/2014 8:38:04:226 - 00000e8c : X1IndexCore started
5/19/2014 8:38:13:465 - 00000404 : Flushing Email Database
5/19/2014 8:38:13:540 - 00000404 : Email Flush State Start done
5/19/2014 8:38:16:520 - 00000404 : Email Flush State Save done
5/19/2014 8:38:16:535 - 00000404 : Email Flush State Commit done
5/19/2014 8:38:34:813 - 00001ae4 : Stopping X1IndexCore...
5/19/2014 8:38:54:792 - 00000e9c : X1IndexCore started
5/19/2014 8:38:55:075 - 00000e9c : Previous crash detected

In the example given above, we see that the last datasource that attempted to merge to the index was the Email index. Thus we can conclude that the Emails index is most likely the problematic one, and clearing that index will allow Search to launch.

Steps for clearing the index:

  1. Download and extract this .zip file to your desktop: https://www.x1.com/download/X1Search/index_deletion_scripts.zip
  2. Navigate to X1 Search's Main Menu and click "Exit" to shut down both X1.exe and X1Servicehost.exe
  3. Open Windows Task manager to verify that no X1 Search processes are present
  4. Run the most appropriate script to delete the problematic index (or if unsure, run the all_delete_tool.cmd)
  5. Launch X1 Search

The casualty of this process will be that X1 Search will have to re-index the index that has been cleared.

 

 

 

0 Comments

Article is closed for comments.
Powered by Zendesk