Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
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?
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
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.
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.
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.
Hi @Marc I'll have a look I have got another couple of issues to solve at the moment