Home
About
Search
Welcome to M-Files Empower – our new support experience. We'd love to hear what you think!Give feedback
Home/Support and troubleshooting/Troubleshooting/Common problems

Delayed start of M-Files client service (Issue: 132218, Workaround exists)

Last updated on 25 August 2021 · 2 min read

Admin
Terminal Services (Citrix)

Overview

In some situations, M-Files client service is not necessarily starting automatically. This situation may happen for example on the Citrix server when after server restart, the M-Files client service cannot contact the shared cache server. Starting M-Files client service with delay would solve this this issue since due to delay connection to shared cache server would be ready when M-Files client service is started. However, setting Startup type to "Automatic (Delayed Start)" is not possible currently. It gives the following error:
image.png
There is open improvement (ID 132218) to make delayed start available for M-Files Client service.
The completed improvement will be is listed on Release note pages after it has been implemented.

Workaround

Set Startup type as "Manual" in services.mcs and create a script which applies delayed start. Script is started on Task scheduler.

Workaround Example

Delayed start can be set via following example Powershell script, which is then to run in Windows Task Scheduler:
example scipt delayed_start_mfclient.ps1:
Start-Sleep -s 30 | Out-Null                 # Set delay for 30 seconds
net start "MFClient 21.6.10322.8" | Out-Null # Start M-Files client service

Note that starting MFClient is tied to specific version in the script. To handle the version dynamically in the script, the version number needs to be parsed separately.
  1. Create new basic task to Windows Task scheduler and set it run when logging in to computer:
image.png
  1. Select "Start a program" to run specific script.
image.png
  1. Set task to run with argument "-executionpolicy bypass -file "path_to_script\file.ps1" (For example: "-executionpolicy bypass -file "C:\scripts\delayed_start_mfclient.ps1") and select "Run with highest privileges" in Task Scheduler.
image.png
Now, when restarting the computer and logging in, script should be run, and M-Files client started with delay.
Please notice that scripting is not part of standard support, and this is just an example script. Be aware that all scripts are run at your own risk.

 

Still need help?