function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Neerav SinghNeerav Singh 

Cognos SalesFroce connectivity through secured network

I am trying to connect Cognos with SalesForce and started creating the Salesforce datasource.

I am getting error while testing the connection , error being below:
XQE-GEN-0002 An unexpected exception occurred: Connecting "<username>@<domain>.com@//" failed. Error message "org.apache.axis2.AxisFault: peer not authenticated".

I found out that our cognos server is in a secured network and not all ports are opened.

I checked on whats available on internet and found below:
which says:
80: This port only accepts HTTP connections.
443: This port only accepts HTTPS connections.
1024–66535 (inclusive): These ports accept HTTP or HTTPS connections.

I need to know 
1. which ports should I get opened for connecting to Salesforce from Cognos is it 443?
3. List of SalesForce servers (referred
Recently Salesforce disabled the ability to login via  I believe you will just wnat to change your URL to use instead
Neerav SinghNeerav Singh
I checked with Cognos support earlier on this.  
They tried recreating the scenario and are able to connect to salesforce using following URL

and said it is related to network.

Also today I tried changing the URL to, but got below error

Error message "<sf:LoginFault xsi:type="sf:LoginFault" xmlns:sf="" xmlns:xsi=""><sf:exceptionCode>INVALID_LOGIN</sf:exceptionCode><sf:exceptionMessage>Invalid username, password, security token; or user locked out.</sf:exceptionMessage></sf:LoginFault>"

The credentials that I used are correct and I am able to connect to salesforce using the id password.
Are you using a token with your password?  If you do not have the IP address of the host making this request in your host whitelist then you will need to concatenate your password and token together to do your login
String password = 'abc123';
String token = 'aabbccddeeffgghhiijjkk';

String passwordForAuth = password + token;

It suprises me that Cognos was able to get this to work with  Salesforce may have delayed the removal of that endpoint but it will be going away and you should not use it but instead use so that when Salesforce does remove it your integration will continue to work.
Neerav SinghNeerav Singh
Thanks for your reply, I have used password + token to set up the connectivity.
Neerav SinghNeerav Singh
I have tried with & password + token (reset the token to be sure as well) combination but still does not work.

Is there something more that can be done?
Neerav SinghNeerav Singh
It worked after we added SalesForce URL to whitelist. Thanks for your inputs.