<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Unable to close server sessions in Integration, Extension &amp; APIs</title>
    <link>https://community.qlik.com/t5/Integration-Extension-APIs/Unable-to-close-server-sessions/m-p/1820408#M15216</link>
    <description>&lt;P&gt;I checked the log and there are only a couple of Redirect/LoadBalancing logs, presumably from when I logged through my browser to the QMC as admin.&lt;/P&gt;&lt;P&gt;The Set-Cookie data contains following information:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;X-Qlik-Session-manta={23DA935C-D834-43BA-AA16-9F1ADCB88879}:0b07499c-92f5-4cf9-b48e-b53357b9a55e; Path=/; HttpOnly; SameSite=Lax; Secure&lt;/LI-CODE&gt;&lt;P&gt;Do I only have to set a sub-string of the data into the 'Cookie' header?&lt;/P&gt;</description>
    <pubDate>Wed, 07 Jul 2021 13:43:07 GMT</pubDate>
    <dc:creator>manta_dev</dc:creator>
    <dc:date>2021-07-07T13:43:07Z</dc:date>
    <item>
      <title>Unable to close server sessions</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Unable-to-close-server-sessions/m-p/1820363#M15213</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;so I am trying to connect to a Qlik Sense Enterprise server's virtual proxy using certificates and doing a metadata retrieval of many applications using the Java's websockets (in my case implementation by TooTallNate: &lt;A href="https://github.com/TooTallNate/Java-WebSocket" target="_blank" rel="noopener"&gt;https://github.com/TooTallNate/Java-WebSocket&lt;/A&gt;) and Qlik Engine JSON API.&lt;/P&gt;&lt;P&gt;Naturally, I have to connect again for every application I want to open and this means that for 10 apps I have 11 connections (the first one only retrieves a list of apps using the GetDocList method.&lt;/P&gt;&lt;P&gt;However, virtual proxies limit maximum parallel sessions to 5 at a time and whenever I close a websocket, for some reason, the session remains open. Does anyone have any idea how to make the virtual proxy session close on websocket close?&lt;/P&gt;&lt;P&gt;More details:&lt;/P&gt;&lt;P&gt;- I am using a static user directory authentication&lt;/P&gt;&lt;P&gt;- I tried to add the content of 'Set-Cookie' header from the server's handshake response that didn't work:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;addHeader("cookie", handshakeData.getFieldValue("Set-Cookie"));&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- I am properly closing the websockets, when I only connected to a normal Proxy, there was no problem with this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas would be greatly appreciated, thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jul 2021 11:50:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Unable-to-close-server-sessions/m-p/1820363#M15213</guid>
      <dc:creator>manta_dev</dc:creator>
      <dc:date>2021-07-07T11:50:04Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to close server sessions</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Unable-to-close-server-sessions/m-p/1820395#M15214</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/102124"&gt;@manta_dev&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It should work to add the cookie as a request header on subsequent requests as you've pointed as it would cookie on the same proxy session.&lt;/P&gt;&lt;P&gt;There must be something wrong in the code logic or a timing issue if it's not trying to reuse the session.&lt;BR /&gt;Did you try to check the Qlik Proxy logs, if you've tried to use an invalid cookie you should have a WARN or ERROR in that log: C:\programdata\qlik\sense\log\trace\servername_audit_proxy.txt&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jul 2021 13:22:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Unable-to-close-server-sessions/m-p/1820395#M15214</guid>
      <dc:creator>Damien_V</dc:creator>
      <dc:date>2021-07-07T13:22:40Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to close server sessions</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Unable-to-close-server-sessions/m-p/1820408#M15216</link>
      <description>&lt;P&gt;I checked the log and there are only a couple of Redirect/LoadBalancing logs, presumably from when I logged through my browser to the QMC as admin.&lt;/P&gt;&lt;P&gt;The Set-Cookie data contains following information:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;X-Qlik-Session-manta={23DA935C-D834-43BA-AA16-9F1ADCB88879}:0b07499c-92f5-4cf9-b48e-b53357b9a55e; Path=/; HttpOnly; SameSite=Lax; Secure&lt;/LI-CODE&gt;&lt;P&gt;Do I only have to set a sub-string of the data into the 'Cookie' header?&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jul 2021 13:43:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Unable-to-close-server-sessions/m-p/1820408#M15216</guid>
      <dc:creator>manta_dev</dc:creator>
      <dc:date>2021-07-07T13:43:07Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to close server sessions</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Unable-to-close-server-sessions/m-p/1820413#M15217</link>
      <description>&lt;P&gt;I believe in this case the correct format to reuse that cookie would be&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;X-Qlik-Session-manta=0b07499c-92f5-4cf9-b48e-b53357b9a55e;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The rest is not needed when it's in the "Cookie" request header&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jul 2021 13:47:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Unable-to-close-server-sessions/m-p/1820413#M15217</guid>
      <dc:creator>Damien_V</dc:creator>
      <dc:date>2021-07-07T13:47:47Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to close server sessions</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Unable-to-close-server-sessions/m-p/1820430#M15218</link>
      <description>&lt;P&gt;I tried to add the following pair into the header map:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Cookie: X-Qlik-Session=&amp;lt;the session ID sent in handshake&amp;gt;;&lt;/LI-CODE&gt;&lt;P&gt;and I am still getting the same error message after I try to use the 6th session:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{
  "method": "OnMaxParallelSessionsExceeded",
  "jsonrpc": "2.0",
  "params": {
    "severity": "fatal",
    "message": "Access to the app is denied: MaxParallelSessionsExceeded",
    "timestamp": "2021-07-07T14:25:09.4092842Z"
  }
}&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 07 Jul 2021 14:27:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Unable-to-close-server-sessions/m-p/1820430#M15218</guid>
      <dc:creator>manta_dev</dc:creator>
      <dc:date>2021-07-07T14:27:35Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to close server sessions</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Unable-to-close-server-sessions/m-p/1820634#M15222</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/102124"&gt;@manta_dev&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you see any error in the Qlik Proxy logs that states that the session you're trying to use is invalid ?&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jul 2021 08:36:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Unable-to-close-server-sessions/m-p/1820634#M15222</guid>
      <dc:creator>Damien_V</dc:creator>
      <dc:date>2021-07-08T08:36:21Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to close server sessions</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Unable-to-close-server-sessions/m-p/1820898#M15227</link>
      <description>&lt;P&gt;I did not see any errors in logs, however, connecting directly to the server node (therefore bypassing the virtual proxy) solve the problem. Fortunately, using the virtual proxy is not necessary for us and we can work with the Engine directly.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jul 2021 06:48:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Unable-to-close-server-sessions/m-p/1820898#M15227</guid>
      <dc:creator>manta_dev</dc:creator>
      <dc:date>2021-07-09T06:48:55Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to close server sessions</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Unable-to-close-server-sessions/m-p/1821048#M15229</link>
      <description>&lt;P&gt;I would suspect the Qlik Proxy service hasn't receive the cookie if it doesn't throw an error, it would show an error if you try to use a cookie that it doesn't consider to be valid.&lt;/P&gt;&lt;P&gt;Glad that you found an alternative solution that works for your use case.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jul 2021 13:25:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Unable-to-close-server-sessions/m-p/1821048#M15229</guid>
      <dc:creator>Damien_V</dc:creator>
      <dc:date>2021-07-09T13:25:54Z</dc:date>
    </item>
  </channel>
</rss>

