Spotfire Analyst displays an empty page or gives error "WebSocket connection ... failed"

Spotfire Analyst displays an empty page or gives error "WebSocket connection ... failed"

book

Article ID: KB0082500

calendar_today

Updated On:

Products Versions
Spotfire Analyst 7.0 or higher

Description

You can under some circumstances get an empty / white / blank area below the toolbar when starting Spotfire Analyst or when opening an analysis file (*.dxp). You may see an error message similar to:
 
WebSocket connection to 'ws://127.0.0.1:<port number>/....' failed. Ensure you do not have an interfering proxy or similar.

There are some possible reasons for why this may happen; either something is disturbing the communication to the internal web server used by Spotfire Analyst, or the WebSocket setup to 127.0.0.1 is not working as intended. In both these cases, the most probable cause is blockage of network communication on the local machine, e.g. proxy or firewall rules. It can also be the result of an antivirus software configuration. If possible, test with proxy configuration turned off or with "Bypass proxy server for local addresses" checked.

Issue/Introduction

You can under some circumstances get an empty area below the toolbar when starting Spotfire Analyst or when opening an analysis file (*.dxp). You may in some situations get an error message similar to "WebSocket connection to 'ws://127.0.0.1:57492/....' failed. Ensure you do not have an interfering proxy or similar."

Environment

Spotfire Analyst 7.0 or higher

Resolution

Problems communicating with http://localhost:8000-8099

Problems communicating with localhost:8000-8099 can be seen as a white-beige (toolbar color) area directly when you start Spotfire Analyst. You will not see the TIBCO Spotfire logo, Recent Analysis, Recent Data, Add Data and Samples. 

For Spotfire 7.5 or higher there is an option to show a Development menu, where you can select "Copy URL to Clipboard" and test the communication to the local web server using a web browser. To turn on the Development Menu, select Tools > Options, followed by Application > Development > Show development menu. Then select Tools > Development > Copy URL to Clipboard. 
In Spotfire 7.5 or higher, you can also select "Developer Tools..." from the Development menu and use network analysis to see where the communication gets blocked.

For Spotfire 7.0 you will have to capture the URL using Fiddler or similar. The URL looks like http://localhost:8001/?view=5c59f75e-cf28-4f39-a1c9-65ed45bcb9a2

The reasons for testing this is that some setups blocks actions per application, and network support teams may be more familiar with debugging problems directly in a browser.
 

WebSocket connection to 127.0.0.1 fails

The second issue is seen as a white area under the toolbar when opening an analysis file but the initial display with TIBCO Spotfire logo etc looks OK. Depending on which version you are running, you may see the error "WebSocket connection to 'ws://127.0.0.1:<port number>/....' failed. Ensure you do not have an interfering proxy or similar." In this case, the WebSocket connection to 127.0.0.1 has probably failed. This connection is done towards an ephemeral port assigned by the system and is picked from a pool (49152-65535 on Windows 7 and later).
 
Normally localhost and 127.0.0.1 are interchangeable, but proxy .pac scripts can filter on hostname and for Chrome (and Spotfire) “localhost” and “127.0.0.1” are different. If this is the case, the URL should work in Internet Explorer, which treats this differently. This explains why these issues may appear for the first time with Spotfire, if no one has tested the hostname “127.0.0.1”.

Minimal Example .pac script:
function FindProxyForURL(url, host)
{
if (shExpMatch(host, "*.domain.example.com")) return "DIRECT";
else if (shExpMatch(host, "localhost")) return "DIRECT";
else if (shExpMatch(host, "127.0.0.1")) return "DIRECT";
//else if (isInNet(host, "127.0.0.0", "255.0.0.0")) return "DIRECT"; //this filters on the IP instead, which works for both "127.0.0.1" and "localhost"
else return "PROXY proxy.example.com:8090";
}

The port range may also be blocked, but this would also affect Internet Explorer

Additional Information

Requirements

For Spotfire Analyst (a.k.a Spotfire Professional and Spotfire desktop client) to function it needs to:

1. Be able to start a web server on localhost:8000-8099.
2. Be allowed to communicate with this web server.
3. Be able to create a WebSocket tunnel to 127.0.0.1: 49152-65535.

If any of these actions are blocked, Spotfire will not work.
 
See the following screen captures of when the localhost and 127.0.0.1 are working and blocked. Fiddler trace is shown above the image.
 

Reference images

Note: May look different depending on the version used.

Spotfire Analyst opening a file when WebSocket to 127.0.0.1 is blocked.

Spotfire Analyst opening a file when WebSocket to 127.0.0.1 is blocked


Spotfire Analyst welcome page when localhost is blocked.

Spotfire Analyst welcome page when localhost is blocked


Spotfire Analyst welcome page when localhost is working.

Spotfire Analyst welcome page when localhost is working


Spotfire Analyst opening a file when WebSocket is working

Spotfire Analyst opening a file when WebSocket is working