marcusspitzmiller / QlikSenseTask

Active - QlikSenseTask is a tool for starting Qlik Sense tasks from the command line.
24 stars 13 forks source link

Stopped working after we enable TLS1.2 #29

Closed nitin881984 closed 3 years ago

nitin881984 commented 3 years ago

THe tool was working properly but after we enabled TLS1.2 and disabled TLS1.1 and 1.0, it stopped working. The error which am getting is as below.

2021_10_08_12_57_37,Debug,"error: The underlying connection was closed: An unexpected error occurred on a receive." 2021_10_08_12_57_37,Error,"System.Exception: Couldnt connect to the server at , check that the Proxy and QRS are running. Message: Object reference not set to an instance of an object. at QVnextDemoBuilder.QRSNTLMWebClient..ctor(String QRSserverURL, Int32 requesttimeout, Logger logger) at QlikSenseJSONObjects.QlikSenseJSONHelper..ctor(String url, Int32 timeout, Logger logger) at QlikSenseTask.Program.Main(String[] args)" 2021_10_08_12_57_37,Information,"Returning Errorlevel 8"

Any help is appreciated

marcusspitzmiller commented 3 years ago

There is a branch here

https://github.com/marcusspitzmiller/QlikSenseTask/tree/TLS https://github.com/marcusspitzmiller/QlikSenseTask/tree/TLS

But was never able to verify if it works. Can you check with this please?

On Oct 8, 2021, at 12:04 PM, nitin881984 @.***> wrote:

THe tool was working properly but after we enabled TLS1.2 and disabled TLS1.1 and 1.0, it stopped working. The error which am getting is as below.

2021_10_08_12_57_37,Debug,"error: The underlying connection was closed: An unexpected error occurred on a receive." 2021_10_08_12_57_37,Error,"System.Exception: Couldnt connect to the server at , check that the Proxy and QRS are running. Message: Object reference not set to an instance of an object. at QVnextDemoBuilder.QRSNTLMWebClient..ctor(String QRSserverURL, Int32 requesttimeout, Logger logger) at QlikSenseJSONObjects.QlikSenseJSONHelper..ctor(String url, Int32 timeout, Logger logger) at QlikSenseTask.Program.Main(String[] args)" 2021_10_08_12_57_37,Information,"Returning Errorlevel 8"

Any help is appreciated

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/marcusspitzmiller/QlikSenseTask/issues/29, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC4HC7XB5HA34MKFOMHJRJLUF4QDRANCNFSM5FUBFZAA. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

nitin881984 commented 3 years ago

Same error with this code too

Time, LogLevel, Message 2021_10_11_11_05_56,Information,"Task: QV_QS_INTEGRATION" 2021_10_11_11_05_56,Information,"Proxy: https://discovery-qs.intra.chrysler.com" 2021_10_11_11_05_56,Information,"Wait: 6000 seconds" 2021_10_11_11_05_56,Information,"Poll: 30 seconds" 2021_10_11_11_05_56,Information,"Log: C:\Users\nitm_s_qvservice\Desktop\QlikSenseTask-TLS\QlikSenseTask-TLS\QlikSenseTask-3.X\QlikSenseTask-3.X" 2021_10_11_11_05_56,Information,"Delete Log: -90 days" 2021_10_11_11_05_56,Information,"Creating connection..." 2021_10_11_11_05_56,Debug,"Creating web connection..." 2021_10_11_11_05_56,Debug,"Creating CookierAwareWebClient..." 2021_10_11_11_05_56,Debug,"calling /qrs/about" 2021_10_11_11_05_56,Debug,"setting headers" 2021_10_11_11_05_56,Debug,"constructing query string" 2021_10_11_11_05_56,Debug,"calling https://discovery-qs.intra.chrysler.com/qrs/about" 2021_10_11_11_05_56,Debug,"error: The underlying connection was closed: An unexpected error occurred on a receive." 2021_10_11_11_05_56,Error,"System.Exception: Couldnt connect to the server at https://discovery-qs.intra.chrysler.com , check that the Proxy and QRS are running. Message: Object reference not set to an instance of an object. at QVnextDemoBuilder.QRSNTLMWebClient..ctor(String QRSserverURL, Int32 requesttimeout, Logger logger) at QlikSenseJSONObjects.QlikSenseJSONHelper..ctor(String url, Int32 timeout, Logger logger) at QlikSenseTask.Program.Main(String[] args)" 2021_10_11_11_05_56,Information,"Returning Errorlevel 8"

marcusspitzmiller commented 3 years ago

ok try this build - https://github.com/marcusspitzmiller/QlikSenseTask/tree/master/QlikSenseTaskSource-3.X/QlikSenseTask/bin/Release

nitin881984 commented 3 years ago

Hi Marcus,

I downloaded all the file from the release and tried to execute on the same server where qliksense is installed, but still same error. TLS support issue

Thanks for helping me , please correct me if I am doing something wrong

marcusspitzmiller commented 3 years ago

i don't think you are doing anything wrong. try again. i upgraded this project to .net 4.7, hopefully you have that on your server, and set "System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.SystemDefault"

nitin881984 commented 3 years ago

I have 4.5.51650 version of .Net Framework.

NETFRAMEWORK

nitin881984 commented 3 years ago

Is there some way to get log in some more detailed way, to check what can be the issue here.

nitin881984 commented 3 years ago

I tried on one other server where the framework version was 4.8.03761, It failed there too.

Time, LogLevel, Message 2021_10_11_22_09_11,Information,"Task: QV_QS_INTEGRATION" 2021_10_11_22_09_11,Information,"Proxy: https://selfservice-alpha.intra.chrysler.com" 2021_10_11_22_09_11,Information,"Wait: 6000 seconds" 2021_10_11_22_09_11,Information,"Poll: 30 seconds" 2021_10_11_22_09_11,Information,"Log: C:\Users\NITM_s_QVService\Desktop\TLS" 2021_10_11_22_09_11,Information,"Delete Log: -90 days" 2021_10_11_22_09_11,Information,"Creating connection..." 2021_10_11_22_09_11,Debug,"Creating web connection..." 2021_10_11_22_09_11,Debug,"Creating CookierAwareWebClient..." 2021_10_11_22_09_11,Debug,"calling /qrs/about" 2021_10_11_22_09_11,Debug,"setting headers" 2021_10_11_22_09_11,Debug,"constructing query string" 2021_10_11_22_09_11,Debug,"calling https://selfservice-alpha.intra.chrysler.com/qrs/about" 2021_10_11_22_09_11,Debug,"error: The underlying connection was closed: An unexpected error occurred on a receive." 2021_10_11_22_09_11,Error,"System.Exception: Couldnt connect to the server at https://selfservice-alpha.intra.chrysler.com , check that the Proxy and QRS are running. Message: Object reference not set to an instance of an object. at QVnextDemoBuilder.QRSNTLMWebClient..ctor(String QRSserverURL, Int32 requesttimeout, Logger logger) at QlikSenseJSONObjects.QlikSenseJSONHelper..ctor(String url, Int32 timeout, Logger logger) at QlikSenseTask.Program.Main(String[] args)" 2021_10_11_22_09_11,Information,"Returning Errorlevel 8"

nitin881984 commented 3 years ago

Anything else we can do as I have 2 servers , one with 4.5.5 and other with 4.8.0, So , do you need to make some change I have to try only with 4.7??

As well When I tried to open below URL in browser https://selfservice-alpha.intra.chrysler.com/qrs/about

I get XSRF prevention check failed. Possible XSRF discovered.

Do you suspect anything with this

marcusspitzmiller commented 3 years ago

Hi, i was finally able to reproduce on my end. Let me keep looking.

marcusspitzmiller commented 3 years ago

Ok, try this branch...https://github.com/marcusspitzmiller/QlikSenseTask/tree/TLS12andNET48 - i have rebuilt for .net 4.8 and was able to reproduce and fix the issue on my end.

nitin881984 commented 3 years ago

No Change Same Error

image

image

image

marcusspitzmiller commented 3 years ago

In TLS 1.2 > Server, I am pretty sure the “Enabled” value in the registry should be set to a 1, not 0xfffff (I.e. -1) right?

No Change Same Error

[image]https://user-images.githubusercontent.com/17024046/137049716-6d02ec6b-29df-4461-84dd-74a22c29d650.png

[image]https://user-images.githubusercontent.com/17024046/137049742-8c46ba4a-8353-499d-bd34-5fea9eadfab9.png

[image]https://user-images.githubusercontent.com/17024046/137049867-acc20154-0785-4d23-9dff-dee044e37989.png

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/marcusspitzmiller/QlikSenseTask/issues/29#issuecomment-941816653, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AC4HC7TN6QVBKDSJPYL4BSTUGTMLNANCNFSM5FUBFZAA. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

nitin881984 commented 3 years ago

For TLS enablement we followed the Qlik article and ran the Powershell script available there at the last of the article, even this was suggested by Qlik Support team itself. https://community.qlik.com/t5/Knowledge/TLS-and-SSL-Support-in-Qlik-Sense-How-to-configure-Qlik-Sense/ta-p/1713720

and this powershell script can madethe value as 0xfffff

marcusspitzmiller commented 3 years ago

https://techcommunity.microsoft.com/t5/office-365/tls-1-2-enabled-registry-value-quot-0xffffffff-quot-0r-1/m-p/324275 https://docs.microsoft.com/en-us/windows-server/security/tls/tls-registry-settings

That is a pretty old Qlik article. MSFT looks to have standardized on the value of 1, can you please try that? If it works that way, I can let Support know the article should be updated.

Please give it a try

From: nitin881984 @.> Reply-To: marcusspitzmiller/QlikSenseTask @.> Date: Wednesday, October 13, 2021 at 4:47 AM To: marcusspitzmiller/QlikSenseTask @.> Cc: Marcus Spitzmiller @.>, Comment @.***> Subject: Re: [marcusspitzmiller/QlikSenseTask] Stopped working after we enable TLS1.2 (#29)

For TLS enablement we followed the Qlik article and ran the Powershell script available there at the last of the article, even this was suggested by Qlik Support team itself. https://community.qlik.com/t5/Knowledge/TLS-and-SSL-Support-in-Qlik-Sense-How-to-configure-Qlik-Sense/ta-p/1713720

and this powershell script can madethe value as 0xfffff

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/marcusspitzmiller/QlikSenseTask/issues/29#issuecomment-942123233, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AC4HC7QDKFA4RS76IBYQ6SDUGVIURANCNFSM5FUBFZAA. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

nitin881984 commented 3 years ago

Still the same,

I changed the Enable value to 1 for TLS1.2, and reboot the server, but still no change

image

marcusspitzmiller commented 3 years ago

Can you confirm you have set similar values in within the 'Client' key in the registry too?

marcusspitzmiller commented 3 years ago

Hi, try again from the same branch. I think this one should work

nitin881984 commented 3 years ago

Still the same

Even I tried using the URL to the server and as well the Server name in Proxy address , both ways dont work

image

marcusspitzmiller commented 3 years ago

Are you certain you are using the newest binary from the release folder? Because I added additional logging:

logger.Log(LogLevel.Debug, "error: " + ex.Message+ " / " + ex.InnerException);

which I am not seeing in the output from your screenshot.

From: nitin881984 @.> Reply-To: marcusspitzmiller/QlikSenseTask @.> Date: Thursday, October 14, 2021 at 11:27 AM To: marcusspitzmiller/QlikSenseTask @.> Cc: Marcus Spitzmiller @.>, Comment @.***> Subject: Re: [marcusspitzmiller/QlikSenseTask] Stopped working after we enable TLS1.2 (#29)

Still the same

Even I tried using the URL to the server and as well the Server name in Proxy address , both ways dont work

[image]https://user-images.githubusercontent.com/17024046/137358479-2d382de1-3440-40d5-82c4-cb3d388b06ce.png

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/marcusspitzmiller/QlikSenseTask/issues/29#issuecomment-943520018, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AC4HC7X45DZZOJB3DLLJUOTUG4AINANCNFSM5FUBFZAA. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

nitin881984 commented 3 years ago

Hi Marcus,

Yes I was using the wrong EXE.

When I used QlikSenseTask-TLS12andNET48_10_14_2021.zip\QlikSenseTask-TLS12andNET48\QlikSenseTaskSource-3.X\QlikSenseTask\bin\Release\QlikSenseTask.exe then This worked.

SO In this branch We need to use only QlikSenseTaskSource-3.X folder as our Source Code right.?? Or create a clean Branch which would avoid any confusion to anybody...

Thnaks a lot for your extended help....