Skip to main content
Code42 Support

Unable to connect to backup engine on devices with a custom localhost address

Available in:

  • CrashPlan PRO
    • Standard
    • Premium
    • Enterprise
Applies to:

Overview

This article describes an issue in which the Code42 app displays the message "Cannot connect to the backup engine" if the localhost entries in your computer's hosts file do not point to the default loopback IP addresses. Beginning with version 4.3.0, the Code42 app cannot connect to the Code42 service if the localhost entries in your hosts file have changed.

To troubleshoot other causes of the "Cannot connect to the backup engine" message, see Unable To Connect To Backup Engine.

Affects

Code42 app version 4.3.0 and later

Diagnosing

A changed localhost entry is likely causing this issue if all of these conditions exist:

  • The Code42 app displays the message "Cannot connect to the backup engine."
  • The Code42 app service.log contains the message:
CPService is already running on localhost:4243

This message indicates the Code42 app cannot connect to the Code42 service.

  • Your hosts file has been modified, either manually or by another application.

Recommended solution

Use caution when following the steps below. Editing the hosts file should only be performed by advanced users. If you have any concerns about this process, contact our Customer Champions for Code42 for Enterprise support. Some versions of Windows also provide automated tools to restore the default values to your hosts file. See External Resources below for more details.

Back up the hosts file before making changes
Before following the steps below to edit your hosts file, make a backup copy of the file so that you can easily revert your changes in case they cause unintended consequences.

In addition, adding a # to the beginning of any line instructs the operating system to ignore that line, but still preserves the content as a "comment" you can reference later. Saving the original content as comments is helpful if you need to revert your changes later.

Windows

  1. Open the Windows Start menu and locate Notepad.
  2. Right-click Notepad and select Launch as Administrator.
  3. Select File > Open and navigate to C:\Windows\System32\drivers\etc\host
    The hosts file opens.
  4. Edit or remove any localhost entries so that only the following localhost addresses remain. DO NOT edit any other entries in the file.
    127.0.0.1    localhost
    ::1          localhost
    
  5. Save the file.
  6. Start the Code42 service.

OS X

  1. Open the Finder.
  2. Go to Applications > Utilities and open Terminal.
  3. Enter the following command: sudo nano /private/etc/hosts
    If prompted, enter the administrator password.
  4. Edit or remove any localhost entries so that only the following localhost addresses remain. DO NOT edit any other entries in the file.
    127.0.0.1    localhost
    ::1          localhost
    fe80::1%lo0  localhost
    
  5. Press Control+X to exit.
  6. Press Y to confirm the changes.
  7. Press Enter to save to the existing location.
  8. Start the Code42 service.

Linux

  1. Open Terminal.
  2. Enter the following command: sudo nano /etc/hosts
    If prompted, enter the administrator password.
  3. Edit or remove any localhost entries so that only the following localhost addresses remain. DO NOT edit any other entries in the file.
    127.0.0.1    localhost
    ::1          localhost
    
  4. Press Control+X to exit.
  5. Press Y to confirm the changes.
  6. Press Enter to save to the existing location.
  7. Start the Code42 service.

External resources