Skip to main content
Announcements
Defect acknowledgement with Nprinting Engine May 2022 SR2, please READ HERE
cancel
Showing results for 
Search instead for 
Did you mean: 
michasiuk
Contributor III
Contributor III

Connect-Qlik Failing to connect to to Qlik Sense Server.

@Marc

I'm configuring a new Nprinting Server and we use PowerShell Scripts to coordinate Qlik Sense App Reloads and Nprinting publish tasks. In the old server configuration this actually works successfully I can remotely connect to the server. I'm using the following connect-qlik command 

Connect-Qlik -Computername $QlikSenseServer -TrustAllCerts -Certificate $cert -Username "$($UserDirectory)\$($UserID)" #Connect to the server

But on the new Server configuration I'm getting the following error.

Invoke-RestMethod : Unable to connect to the remote server
At C:\Program Files\WindowsPowerShell\Modules\Qlik-Cli\functions\core.ps1:66 char:23
+ ... $result = Invoke-RestMethod @paramInvokeRestMethod @params
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebException
+ FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand

I've followed the installation documentation and as far as I can see the I have all the correct ports open. Just wondering what I should be checking to fault find this correctly. I'm hoping someone can point me in the right direction.

Labels (1)
6 Replies
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi. Obviously you are using not officially supported scripts so the question is what are they? Are you using some sort of cli library or have you written your own one?

then for Api calls typically you would need to configure trusted origins in nprinting admin console settings. Have you done this in your new environment?

cheers Lech, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful to the problem.
Ruggero_Piccoli
Support
Support

Hi,

Please remember to add the label with the version of Qlik NPrinting you are using. Thanks.

We did not make any changes to the APIs so the authentication method is the same as the old versions. Do you have an error message?

Best Regards

Ruggero

 



Best Regards,
Ruggero
---------------------------------------------
When applicable please mark the appropriate replies as CORRECT. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads with a LIKE if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads with LIKEs if you feel additional info is useful to others.
Marc
Employee
Employee

Hi @michasiuk, my first guess would be that the QlikClient $Cert you are using if for the old environment, not the new environment. or depending on how you are populating the variable $Cert, you may be getting more than one certificate returned.

So would probably be beneficial to start checking that first.

 

michasiuk
Contributor III
Contributor III
Author

Hi @Marc I'm not fully certain but it may have something to do with the hardened security environment that I have to work with of late. I have had a talk with our network people about another issue. We are trying to get the Nprinting to talk to Qlik Sense. For some reason that we cannot figure out at the moment why the requests are not getting out of the  server even though the correct ports are open. 

Marc
Employee
Employee

First thing you could test would be these.

Replacing <fqdn> with the actual server e.g. Test-NetConnection -ComputerName server.domain -Port 4242

Test-NetConnection -ComputerName <fqdn> -Port 443

Test-NetConnection -ComputerName <fqdn> -Port 4242

if 443 is open you could try using windows authentication, if 4242 you can use certificate authentication

either way for NPrinting to be able to pull data out of Qlik Sense, you will need to resolve any connectivity issues between the two servers.

michasiuk
Contributor III
Contributor III
Author

Hi @Marc I'll have a look I have got another couple of issues to solve at the moment