Uploaded image for project: 'Couchbase .NET client library'
  1. Couchbase .NET client library
  2. NCBC-1247

.Net core (2.4.0 dp2) N1QL is not running on Mac (SecureTransport)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Won't Fix
    • Affects Version/s: 2.4.0-dp2
    • Fix Version/s: 2.4.0
    • Component/s: None
    • Labels:
    • Environment:
      macOS X El Capitan, sdk 2.4.0dp2, native curl 7.43.0 and updated 7.51.0

      Description

      I was trying to run this demo on a Mac.

      Working with El Capitan, Couchbase 4.5.x and sdk 2.4.0dp2.
      .Net core 1.1.

      KV operation worked perfectly.
      when I tried N1QL queries I've got an exception:
      "Message: Check Exception and Error fields for details.
      Exception: PlatformNotSupportedException
      Exception Message: The libcurl library in use (7.43.0) and its SSL backend ("SecureTransport") do not support custom handling of certificates. A libcurl built with OpenSSL is required."

      I've updated curl from HomeBrew (7.51) and added it to the Path - but even then it is not taking the new curl.

        Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

          Hide
          jmorris Jeff Morris added a comment -

          Roi Katz -

          This will be in 2.4.0 GA scheduled for early January 2016. We'll try to get an early NuGet package available ASAP so you can in-block (if you are blocked).

          Thanks,

          Jeff

          Show
          jmorris Jeff Morris added a comment - Roi Katz - This will be in 2.4.0 GA scheduled for early January 2016. We'll try to get an early NuGet package available ASAP so you can in-block (if you are blocked). Thanks, Jeff
          Hide
          roi.katz Roi Katz added a comment -

          Hi Jeff Morris
          I'm not blocked in a project or something, just testing it so I can show customers that we can do it.
          It is totally fine to wait to the GA by me.

          Do you know why the issue is happening?

          Thanks,
          Roi

          Show
          roi.katz Roi Katz added a comment - Hi Jeff Morris I'm not blocked in a project or something, just testing it so I can show customers that we can do it. It is totally fine to wait to the GA by me. Do you know why the issue is happening? Thanks, Roi
          Hide
          mike.goldsmith Michael Goldsmith added a comment - - edited

          Hi Roi Katz

          Unfortunately this isn't an SDK flaw but a problem with how .NET Core handles custom certificate callback functions when checking SSL certificates. From this Microsoft .NET Core issue, I can see it applies to many different OS's other than Windows which probably what that tutorial was created on.

          I've worked my way down the list of potential fixes with intermittent success getting that sample to run.

          It does look like they are trying to remove the dependency on openssl in this ticket, but until then we have do some magic.

          The steps I took to get it working are:

          brew install curl --with-openssl
          brew link --force curl
          export DYLD_LIBRARY_PATH=/usr/local/lib/ 
          

          Hope that helps.

          Show
          mike.goldsmith Michael Goldsmith added a comment - - edited Hi Roi Katz Unfortunately this isn't an SDK flaw but a problem with how .NET Core handles custom certificate callback functions when checking SSL certificates. From this Microsoft .NET Core issue , I can see it applies to many different OS's other than Windows which probably what that tutorial was created on. I've worked my way down the list of potential fixes with intermittent success getting that sample to run. It does look like they are trying to remove the dependency on openssl in this ticket, but until then we have do some magic. The steps I took to get it working are: brew install curl --with-openssl brew link --force curl export DYLD_LIBRARY_PATH= /usr/local/lib/   Hope that helps.
          Hide
          mike.goldsmith Michael Goldsmith added a comment -

          This unfortunately isn't an SDK bug, but instead a .NET Core tooling issue with regards to using OpenSSL on OSX.

          Show
          mike.goldsmith Michael Goldsmith added a comment - This unfortunately isn't an SDK bug, but instead a .NET Core tooling issue with regards to using OpenSSL on OSX.
          Hide
          roi.katz Roi Katz added a comment - - edited

          I probably missed the update.

          however those 3 lines did not solve the issue for me on mac.

           "Success: False

          Message: Check Exception and Error fields for details.

          Exception: PlatformNotSupportedException

          Exception Message: The libcurl library in use (7.51.0) and its SSL backend ("SecureTransport") do not support custom handling of certificates. A libcurl built with OpenSSL is required."

          Show
          roi.katz Roi Katz added a comment - - edited I probably missed the update. however those 3 lines did not solve the issue for me on mac.  "Success: False Message: Check Exception and Error fields for details. Exception: PlatformNotSupportedException Exception Message: The libcurl library in use (7.51.0) and its SSL backend ("SecureTransport") do not support custom handling of certificates. A libcurl built with OpenSSL is required."
          Hide
          mike.goldsmith Michael Goldsmith added a comment - - edited

          Looks like the Getting Started with .NET core for OSX homepage has been updated; https://www.microsoft.com/net/core#macos.

          Roi Katz Please can you try the updated instructions regarding creating symlinks to libcrypto and libssl?

          Show
          mike.goldsmith Michael Goldsmith added a comment - - edited Looks like the Getting Started with .NET core for OSX homepage has been updated; https://www.microsoft.com/net/core#macos . Roi Katz Please can you try the updated instructions regarding creating symlinks to libcrypto and libssl?
          Hide
          roi.katz Roi Katz added a comment -

          No, Error still remains the same.

          Show
          roi.katz Roi Katz added a comment - No, Error still remains the same.

            People

            • Assignee:
              mike.goldsmith Michael Goldsmith
              Reporter:
              roi.katz Roi Katz
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Gerrit Reviews

                There are no open Gerrit changes

                  PagerDuty

                  Error rendering 'com.pagerduty.jira-server-plugin:PagerDuty'. Please contact your Jira administrators.