This article applies to:
E-Prime Extensions for Tobii Pro 3.2
Tobii Pro Lab's External Presenter API uses port 8080 for WebSocket communications. However, another application that is running on the Tobii Pro Lab computer can allocate this port for its own use prior to Tobii Pro Lab being launched. If another process is running on port 8080, then an E-Prime Extensions for Tobii Pro Lab-enabled experiment will not be able to establish communications with Tobii Pro Lab. The following error occurs when the TPLOpen PackageCall executes in this situation (note that the specific localhost IP address may differ from what is shown here):
If this occurs, then Tobii Pro advises users to change the port that Tobii Pro Lab uses (scroll to the "Connect E-Prime to Pro Lab" section). The remainder of this Knowledge Base article describes how to confirm that another process is running on port 8080 and if so then how to identify an alternative port number and configure Tobii Pro Lab to use the alternative port.
Confirm that another process is using port 8080 on the Tobii Pro Lab computer
Use the Windows netstat command to identify which applications are using port 8080:
- Hold down the Windows key and press the R key to open the Run dialog.
- Type “cmd” and click OK in the Run dialog.
- Verify the Command Prompt opens.
- Type “netstat -a -n -o | find "8080". A list of processes using port 8080 are displayed.
- note that the symbol before the word "find" is the pipe symbol ("|") and not a lower-case l
Identify an alternative available port number
If a process is using port 8080, then re-run the netstat command without the "| port "8080" to identify the ports that are currently in use. Select an available port, one that is not returned by the netstat command, to use with Tobii Pro Lab. PST recommends avoiding well-known port numbers (ports 0 through 1023) and specifying a user (registered) port (ports 1024-49151). For example, the following output from netstat shows that port 7680 is being utillized by a process and therefore is not available for Tobii Pro Lab:
Launch Tobii Pro Lab with another port
If another process on the Tobii Pro Lab computer is already using port 8080, then configure Tobii Pro Lab to use another port by launching it from the command line with the option Api.Server.Port = PORT_NUMBER. For example, to specify port 3785, enter the following from a Windows command prompt:
Note that the command line solution must be used every time that Tobii Pro Lab is launched if you want to change the Tobii Pro Lab port; it only sets the port number for the current Tobii Pro Lab session. You can also configure a Tobii Pro Lab shortcut to use a specified port (avoiding the need for command prompt) by putting the Api.Server.Port = PORT_NUMBER at the end of the Target Path.