none
Could not create SSL/TLS secure channel exception in Service Job

    Question

  • Hi,

    I am new to HPC, tried out a SOA sample. Task result corresponding to the service call show the following exception:

    et.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: The request was aborted: Could not create SSL/TLS secure channel.
       at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
       at System.Net.Http.HttpClientHandler.GetResponseCallback(IAsyncResult ar)
       --- End of inner exception stack trace ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at Microsoft.Hpc.HttpClientExtension.<>c__DisplayClass5_0.<<GetHttpApiCallAsync>b__0>d.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at Microsoft.Hpc.RetryManager.<InvokeWithRetryAsync>d__33`1.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at Microsoft.Hpc.RetryManager.<InvokeWithRetryAsync>d__33`1.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at Microsoft.Hpc.HttpClientExtension.<GetHttpApiCallAsync>d__5.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at Microsoft.Hpc.Rest.HpcRestClient.<GetHttpApiCallAsync>d__18.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at Microsoft.Hpc.Rest.HpcRestClient.<GetHttpApiCallAsync>d__20`1.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at Microsoft.Hpc.Rest.ServiceRegistrationRestClient.<GetMd5Async>d__15.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at Microsoft.Hpc.Rest.ServiceRegistrationRestClient.<GetMd5Async>d__16.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at Microsoft.Hpc.Rest.ServiceRegistrationRestClient.<ExportToTempFileAsync>d__23.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at Microsoft.Hpc.Scheduler.Session.Internal.ServiceRegistrationRepo.GetServiceRegistrationPath(String filename)
    HpcServiceHost.exe Information: 0 : [ServiceRegistrationRepo] GetServiceRegistrationPath: Found file \\**\HpcServiceRegistration\PrimeFactorizationService.config
    HpcSoa Information: 11 : [Session:28] ServiceConfigFullPath = \\**\HpcServiceRegistration\PrimeFactorizationService.config
    HpcSoa Information: 11 : [Session:28] Sleep...
    Broker shut down this service host when shrinking session's resource allocation.

    Please point me to possible solutions if you have come across similar issue. 


    • Edited by Viswa rk Wednesday, October 17, 2018 8:46 PM
    Wednesday, October 17, 2018 8:45 PM

All replies

  • Hi,

    Windows Registry Editor Version 5.00
     
    [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\.NETFramework\\v4.0.30319]
    "SchUseStrongCrypto"=dword:00000001
     
    [HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\.NETFramework\\v4.0.30319]
    "SchUseStrongCrypto"=dword:00000001
    

    Could you import above regkey value and see if it works?

    Thanks,
    Zihao

    Thursday, October 18, 2018 6:52 AM
  • Added the suggested registry entries, still getting the same original exception. Do I need to add configuration related to the certificate to Service Config?
    Thursday, October 18, 2018 2:06 PM
  • Hi,

    This error is related to TLS. From this thread we saw a similar error and the customer has resolve his issue. Can it be also helpful to you?

    Thanks,
    Zihao

    Friday, October 19, 2018 6:23 AM
  • The bottom line from this thread is using an user with right privileges. I am able to submit Batch Jobs with the same user, however when SOA Job is submitted, I see the following log in the task results.

    HpcSoa Information: 10011 : HpcServiceHost entry point is called.
    HpcSoa Information: 11 : [Session:75] OnAzure = False
    HpcServiceHost.exe Information: 0 : [GetCertificateValidationCallback] Bypass certificate CN validation.
    HpcServiceHost.exe Information: 0 : [GetCertificateValidationCallback] Bypass certificate CN validation.
    HpcServiceHost.exe Information: 0 : [ServiceRegistrationRepo] GetServiceRegistrationPath: Try get file PaceHpcJobService.config
    HpcServiceHost.exe Information: 0 : [ServiceRegistrationRepo] GetServiceRegistrationPath: Get from reliable registry
    HpcServiceHost.exe Information: 0 : [HpcFabricRestContext] Calling HpcNaming//api/fabric/resolve/stateless/FrontendStatelessService on HostName:443.
    HpcServiceHost.exe Information: 0 : cert issuer CN=HPC Pack 2016 Communication, cert subject CN=HPC Pack 2016 Communication, sslPolicyErrors RemoteCertificateNameMismatch
    HpcServiceHost.exe Information: 0 : cert issuer CN=HPC Pack 2016 Communication, cert subject CN=HPC Pack 2016 Communication, sslPolicyErrors RemoteCertificateNameMismatch
    HpcServiceHost.exe Information: 0 : [HpcFabricRestContext] HpcNaming//api/fabric/resolve/stateless/FrontendStatelessService on HostName:443 returned System.Collections.Generic.List`1[System.String].
    HpcServiceHost.exe Information: 0 : [ServiceRegistrationRestClient] Calling GET HpcFrontend/api/soa/service-registration/PaceHpcJobService.config/md5?serviceVersion= on HostName:443.
    HpcServiceHost.exe Information: 0 : cert issuer CN=HPC Pack 2016 Communication, cert subject CN=HPC Pack 2016 Communication, sslPolicyErrors RemoteCertificateNameMismatch
    HpcServiceHost.exe Information: 0 : cert issuer CN=HPC Pack 2016 Communication, cert subject CN=HPC Pack 2016 Communication, sslPolicyErrors RemoteCertificateNameMismatch
    HpcServiceHost.exe Information: 0 : [ServiceRegistrationRestClient] GET HpcFrontend/api/soa/service-registration/PaceHpcJobService.config/md5?serviceVersion= returned .
    HpcServiceHost.exe Information: 0 : [HpcFabricRestContext] Calling HpcNaming//api/fabric/resolve/stateless/FrontendStatelessService on HostName:443.
    HpcServiceHost.exe Information: 0 : [HpcFabricRestContext] HpcNaming//api/fabric/resolve/stateless/FrontendStatelessService on HostName:443 returned System.Collections.Generic.List`1[System.String].
    HpcServiceHost.exe Information: 0 : [ServiceRegistrationRestClient] Calling GET HpcFrontend/api/soa/service-registration/PaceHpcJobService?serviceVersion= on HostName:443.
    HpcServiceHost.exe Information: 0 : [ServiceRegistrationRestClient] GET HpcFrontend/api/soa/service-registration/PaceHpcJobService?serviceVersion= returned .
    HpcServiceHost.exe Information: 0 : [ServiceRegistrationRepo] GetServiceRegistrationPath: Found file \\HostName\HpcServiceRegistration\HpcJobService.config
    HpcSoa Information: 11 : [Session:75] ServiceConfigFullPath = \\HostName\HpcServiceRegistration\HpcJobService.config
    HpcSoa Information: 11 : [Session:75] Sleep...
    Broker shut down this service host when shrinking session's resource allocation.


    • Edited by Viswa rk Friday, November 16, 2018 3:26 PM
    Friday, November 16, 2018 3:18 PM
  • Hi,

    This task output is expected.

    What's your result of echoclient (type "echoclient" in cmd prompt)?

    Thanks,
    Zihao

    Monday, November 19, 2018 1:44 AM
  • Output of EchoClient:

    [INFO][09:31:32.256] Session ID                          : 77
    [INFO][09:31:32.256] Session creation time               : 19.986 sec
    [INFO][09:31:32.257] Wait for all broker clients.
    [INFO][09:31:32.281] Sending 10 requests for broker client (1/1)...
    [INFO][09:31:32.372] Requests sent time (1/1)            : 0.091 sec
    [INFO][09:31:32.372] Requests throughput (1/1)           : 110.40 /sec
    [INFO][09:31:32.372] Retrieving responses for broker client (1/1)...
    [INFO][09:31:32.806] GetResponses time (1/1)             : 0.434 sec
    [INFO][09:31:32.806] GetResponses throughput (1/1)       : 23.07 /sec
    [INFO][09:31:32.843] All requests sending time           : 0.091 sec
    [INFO][09:31:32.843] All requests throughput             : 109.89 /sec
    [INFO][09:31:32.843] All responses receiving time        : 0.434 sec
    [INFO][09:31:32.843] All responses throughput            : 23.04 /sec
    [INFO][09:31:32.844] Response time Min                   : 0.488 sec
    [INFO][09:31:32.844] Response time Max                   : 0.490 sec
    [INFO][09:31:32.844] Response time Ave                   : 0.489 sec
    [INFO][09:31:32.844] Response first                      : 09:31:32.804
    [INFO][09:31:32.845] Response last                       : 09:31:32.805
    [INFO][09:31:32.846] Responses elapsed                   : 0.001 sec
    [INFO][09:31:32.847] Responses throughput                : 9977.05 /sec
    [INFO][09:31:32.848] Request E2E elapsed                 : 0.490 sec
    [INFO][09:31:32.848] Request E2E throughput              : 20.41 /sec
    [INFO][09:31:32.849] Echo Done.

    Monday, November 19, 2018 2:44 PM
  • Hi,

    The result shows you can run SOA job without any issue.

    Thanks,
    Zihao

    Tuesday, November 20, 2018 1:30 AM