Skip to content

Local preview – connection to localhost failed

If an embedded view in the Windows client displays a connection error for localhost instead of its content, you can test whether using 127.0.0.1 resolves it. One possible symptom is ERR_CONNECTION_REFUSED for an address such as http://localhost:9404/localfiles/1.

localhost means the computer running the Windows client. With Citrix/XenApp or Remote Desktop, this is the session host. This setting affects the local preview, not the address of the central web client or backend server. It is a diagnostic step and does not resolve every cause of a failed connection.

Test with one user first

  1. Close Zeta Test Management completely in the affected Windows session.
  2. On that computer, open the Applications folder of your Zeta Test Management installation. Use the folder of the application actually being launched; writing to it may require administrator permissions.
  3. Back up any existing configuration file. For the affected Windows login, create config.<username>@<domain>.json, for example config.smith@COMPANY.json. Replace the placeholders, including the angle brackets, with the actual values. Use the Windows login, not the username within a test project.
  4. If only config.<username>.json exists so far, copy its settings into the new file: the domain-specific file replaces it as the user configuration. Then add this setting:
{
  "Settings": [
    {
      "Name": "htmlEditor.localHost.intelligent",
      "Value": "false"
    }
  ]
}

If the file already exists, add only this entry to its existing Settings list or change the entry's previous value. Preserve other settings. Separate entries with commas, without a comma after the last entry. Save as UTF-8 with the extension .json, not .json.txt.

  1. Restart Zeta Test Management and open the affected view again.

With "false", the local preview uses 127.0.0.1. With no entry or with "true", the application chooses automatically: it uses localhost if name resolution returns 127.0.0.1 for that name, and otherwise uses 127.0.0.1 directly.

Apply the setting to all users

To apply the setting to all users of this installation, add the same entry to config.json in the Applications folder. A user-specific setting takes precedence. The application first looks for config.<username>@<domain>.json; it uses config.<username>.json only if the first file does not exist.

With multiple session hosts, place the setting in the installation used on each relevant host. Running clients must be restarted to pick up the change.

Check the result and undo the change

With logging enabled, the local web server's startup message should now contain an address starting with http://127.0.0.1:. The port is selected automatically and may change on the next start; 9404 is only an example.

If the error persists, record the affected view, computer name and time, and send the new ztm.log to support. Disable logging again after diagnosis.

To undo the change, restore the previous value or remove only the entry added for this test, then restart the client. If the file was created solely for this test, you can remove it. Without a user-specific entry, any setting in config.json applies again.