Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW

Changing the listening port number for Qlik Web Connectors

No ratings
cancel
Showing results for 
Search instead for 
Did you mean: 
Bjorn_Wedbratt
Former Employee
Former Employee

Changing the listening port number for Qlik Web Connectors

Last Update:

Apr 7, 2021 3:15:42 AM

Updated By:

Sonja_Bauernfeind

Created date:

Jun 28, 2016 11:07:41 AM

In some rare circumstances you might find Qlik Web Connectors service will not start because another program has already 'claimed' Qlik Web Connectors default port of 5555. 

Issues starting Qlik Web Connectors Web Service explains the two main errors related to this which you might see when Qlik Web Connectors starts, either as a pop up message box or in the startup log files (which appear alongside the desktop and windows service application executables).

If you do find you cannot use port 5555, use the following instructions to change the listening port.

IMPORTANT:

  • Please note that if you try to pass any load-scripts generated using this new port number to another Qlik Web Connectors user they would also need to configure their Qlik Web Connectors to run on this port.
  • Similarly, you will not be able to reload examples on this site without first adjusting the port number in the load-scripts.


Environment:


 

Resolution:

 

  1. Stop the Qlik Web Connectors (service)
  2. Locate the deploy.config file in your Qlik Web Connectors folder (i.e. C:\Qlik Web Connectors\deploy.config)
  3. Locate the <Port> tag and change port 5555 to any available port on your system:

    <Port>5555</Port>

  4. Execute QlikWebConnectors.exe to make sure URL reservation is applied
  5. If running Qlik Web Connectors as a Service, close Qlik Web Connectors if still running and start the Qlik Web Connectors service


Managing your load scripts

It is recommended as good practice to convert the Qlik Web Connectors root URL to a variable

For example: your script may look like this and you are running on port 5557, with the following load script:
 

1
2
3
4
5
6
7
8
9
10
11
TwitterConnector_SearchV2:
LOAD
    id as SearchV2_id,
    created_at as SearchV2_created_at,
    Timestamp#(SubField(created_at, ', ', 2), 'DD MMM YYYY hh:mm:ss +0000') as SearchV2_created_at_timestamp,
    text as SearchV2_text,
    text_urlEncoded as SearchV2_text_urlEncoded,
    ...etc...
FROM
[http://localhost:5557/data?connectorID=TwitterConnector&table=SearchV2&searchTerm=nike&searchmaxpages=15&deletefromcache=true&format=qvx]
(qvx);



You can convert the Qlik Web Connectors root URL to a variable, so your script would look like this:

1
2
3
4
5
6
7
8
9
10
11
12
13
let vQlikWebConnectors = 'http://localhost:5557/data';
 
TwitterConnector_SearchV2:
LOAD
    id as SearchV2_id,
    created_at as SearchV2_created_at,
    Timestamp#(SubField(created_at, ', ', 2), 'DD MMM YYYY hh:mm:ss +0000') as SearchV2_created_at_timestamp,
    text as SearchV2_text,
    text_urlEncoded as SearchV2_text_urlEncoded,
    ...etc...
FROM
[$(vQlikWebConnectors)?connectorID=TwitterConnector&table=SearchV2&searchTerm=nike&searchmaxpages=15&deletefromcache=true&format=qvx]
(qvx);


Whenever a new piece of Qlik Web Connectors script is added to the document it is a simple matter of replacing the root url with the vQlikWebConnectors variable.

Now when the QlikView application is deployed to another machine, e.g. a test or production server, simply change the single variable at the top of the load script with the new port number.

This could be made more sophisticated by basing the Qlik Web Connectors  path on the current machine name or user account.
 

Configure the Qlik Web Connectors path automatically by machine name:

If, for example, you need to run Qlik Web Connectors on a different port on your development machine to your server, rather than manually editing this value each time you move the QlikView application you could use the following at the start of your load script:

1
2
3
4
5
if(ComputerName() = '[YOUR COMPUTER NAME]') then
    let vQlikWebConnectors = 'http://localhost:5557/data';
else
    let vQlikWebConnectors = 'http://localhost:5555/data';
endif
Configure the Qlik Web Connectors path automatically by current username

In another scenario, you may want to have different users each running Qlik Web Connectors on a different port.

You could use a a piece if script similar to the following which would allow these users to load each others applications and also deploy them to a server:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
if(OSUser() = 'user1') then
    let vQlikWebConnectors = 'http://localhost:5560/data';
elseif(OSUser() = 'user2') then
    let vQlikWebConnectors = 'http://localhost:5556/data';
elseif(OSUser() = 'user3') then
    let vQlikWebConnectors = 'http://localhost:5557/data';
elseif(OSUser() = 'user4') then
    let vQlikWebConnectors = 'http://localhost:5558/data';
elseif(OSUser() = 'user5') then
    let vQlikWebConnectors = 'http://localhost:5559/data';
else
    // Lets assume we are on a server with the default port.
    let vQlikWebConnectors = 'http://localhost:5555/data';
endif


Both of these final two configurations could be enhanced further by placing the IF statement into a text file, called say QlikWebConnectors_port_config.txt, which can then be referenced at the start of the QlikView load script with the statement $(include=QlikWebConnectors_port_config.txt). If all relevant QlikView applications use this reference, then the list only needs to be maintained through the single text file.
 

Labels (2)
Contributors
Version history
Last update:
‎2021-04-07 03:15 AM
Updated by: