
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
net/http error: TLS handshake timeout during App Get request with Qlik-CLI
Dec 7, 2022 6:15:51 AM
Dec 7, 2022 6:15:51 AM
A TLS handshake timeout is reached when running a simple App Get requests via Qlik-CLI. The same request via Invoke-WebRequest completes quickly and successfully.
PowerShell Script example with error:
$tenant = "xxxx.eu.qlikcloud.com"
$tenantId = 'xxxxxx'
$apikey = "STRIPPED"
qlik context update $tenant --api-key $apikey
qlik context use $tenant
qlik app get "xxxxxx"v#-----------------------------------------------------------------------------------
# CLI OUTPUT:
#------------------------------------------------------------------------------------
Context: xxxxx.qlikcloud.com
qlik : Server-type not set, guessing "cloud"
At line:7 char:1
+ qlik app get "xxxxxxx" -v
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
{{ + CategoryInfo : NotSpecified: (Server-type not set, guessing "cloud":String) [], RemoteException}}
{{ + FullyQualifiedErrorId : NativeCommandError}}GET xxxxxx
> Authorization: Bearer xxxxx
> Content-Type: application/json
> Referer: xxxxxx
> User-Agent: qlik/2.8.0 (windows)
Error: Get "xxxxxxx": net/http: TLS handshake timeout
Resolution
Qlik-CLI doesn't pick up the Internet Proxy defined in Internet Options at the OS level, while PowerShell does.
To resolve this, set the https_proxy environment variable via PowerShell or at the OS level permanently to guarantee Qlik-CLI can connect to their tenant via the permitted path in their network setup.
Example:
Set the environment variable at beginning of the script:
$env:https_proxy="http://url.etc"
Remove the environment variable when done:
$env:https_proxy="http://url.etc"
Related Content
Environment
Qlik Cloud
Qlik-CLI
Internal Investigation ID(s)
QB-9096