The Problem

Starting Parallels 5 an error message is shown like: “Service prl_disp_service could not be started or connected to”. I don’t remember the exact words. This happens every time you start Parallels and even a reboot won’t help.

Analysis

In the “Activity Monitor” the process is not to be found. Some applications have a StartupItem or a launchd config to launch a service process. Parallels is also one of those.

In this case, the launchd should start this command on every boot of your Mac:

/Library/Parallels/Parallels Service.app/Contents/Resources/ParallelsDispatcherService start

Which is a shell script we can debug. How you can debug shell scripts, have a look at Debug Shell Scripts.

So we start this shell script in debug mode bash -x:

sudo bash -x /Library/Parallels/Parallels\ Service.app/Contents/Resources/ParallelsDispatcherService start

and take a good look at the debug output:

+ RunService start
+ case $1 in
+ StartService
+ '[' $'-YES-\r' '!=' -YES- ']'
+ return

this output is shown on these lines:

# The start subroutine
StartService () {
# Check if service is enabled
[ "${PARALLELS:=-YES-}" != "-YES-" ] && return

which means that whenever the property PARALLELS in /etc/hostconfig is not set to

PARALLELS=-YES-

then the service should not start.

But at the output above the comparision of -YES- seems to be a bit odd. Why is that \r (Carriage-Return) shown right after -YES-? This seems to be causing the problem. The comparision will fail every time.

Parallels has somehow corrupted the /etc/hostconfig introducing DOS new-lines (\r\n) instead of the UNIX new-lines (\n).

Even

file /etc/hostconfig

will tell you

/etc/hostconfig: ASCII text, with CRLF line terminators

Solution

That can be fixed removing those \r from /etc/hostconfig using:

sudo sed -i 's/\r//g' /etc/hostconfig

After a reboot or

sudo launchctl start com.parallels.desktop.launchdaemon

Parallels should work as expected.

I also wrote a copy of this article in the Parallels forum: http://forum.parallels.com/showthread.php?t=99054