Windows Service

<< Click to Display Table of Contents >>

Navigation:  FAQ > Modules and add-ons >

Windows Service

How can I check, if the Windows Service is running?

If the add-on Windows Service is licensed and the service is installed, the protocol analyser can be used to monitor the Windows Service status. When starting the protocol analyser the program will display an icon in the task bars system tray which refelcts the current state (see Windows Service Monitor). The Windows task manager can also be used to check, if the service is running: The processes mc5serv.exe as well as mc5.exe have to be running after closing the !MC5 GUI. If only the service (mc5serv.exe) but not !MC5 (mc5.exe) is running, check the protocols for error messages.

 

!MC5 seems to regularly freeze when running as service.

If files are still being received, but are processed by the EDI module only after starting the GUI, the reason for this might be the default printer fallback (see General EDI settings). Check the protocols for corresponding messages (e.g. "Printer [...] not found. Trying to use default printer."). By default the service is started using the SYSTEM user account. This account might not have access to the same printers as other, "normal" users (especially network printers might not be available). If so, when printing during automatic processing !MC5 tries to use the Windows default printer instead. If the default printer is the "Microsoft XPS Document Writer" or "Microsoft Print to PDF" or any other virtual printer, that creates a file, printing will open a save dialog and the program waits for user input. Until that dialog is closed the program seems to be frozen, but the dialog might not be visible, as !MC5 is started in the background.

To fix this issue either make sure, all used printers are available under the user account, which is used to run the windows service, change the user account, which is used to run the service and/or deactivate the default printer fallback option.

 

What is the maximum downtime that can be expected with Windows Service monitoring?

One of the tasks of the Windows Service add-on is to ensure that an instance of !MC5 is running as continuously as possible and that the system is always ready to receive/process data. Various methods are used for this purpose, so in case of problems the maximum downtime should not exceed 20 minutes at a time, provided there is no problem regarding the license:

 

If the !MC5 interface is terminated by the user !MC5 sends a signal to the service to start the service instance directly. If the service is installed but not started when !MC5 is terminated, it will be started automatically by !MC5.

The running service periodically checks if any instance of !MC5 is running. If no running instance of !MC5 can be found for ten minutes, then the service instance of !MC5 is started automatically.

!MC5 sends a heartbeat signal to the service at regular intervals. If an instance of !MC5 is running, but this heartbeat signal remains off for 20 minutes, then the service terminates the running instance of !MC5 (no matter if user or service instance) and restarts !MC5 as service instance.

In case of a license error the service instance terminates automatically. If this happens, then the service tries to restart the service instance every 60 minutes for a new license check.