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

SetKeepAlive fails on Windows

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.0.0
    • 3.0.1
    • None
    • 1

    Description

      Can no longer set up a connection to CB on windows. (Windows Server 2012 R2).

      Logs:

      {{2020-05-12 08:15:00.5050||SdkdConsole.Program|INFO|Starting up SDKD-NET.. }}
      {{2020-05-12 08:15:00.6492||SdkdConsole.Program|INFO|SDKD Listening on port 8050 }}
      {{2020-05-12 08:15:00.7542||SdkdConsole.Daemon.Control|INFO|Got a new connection. Creating child handle }}
      {{2020-05-12 08:15:00.7542||SdkdConsole.Daemon.Control|INFO|Received request: INFO }}
      {{2020-05-12 08:15:43.5600||SdkdConsole.Daemon.Control|INFO|Got a new connection. Creating child handle }}
      {{2020-05-12 08:15:43.5666||SdkdConsole.Daemon.Control|INFO|Registering handle 101 }}
      {{2020-05-12 08:15:43.6175||Sdkd.Client.ClientFactory|INFO|Connection string is couchbase://172.23.99.86 , with creds Administrator:password }}
      {{2020-05-12 08:15:43.6880||Couchbase.Core.IO.Connections.MultiplexingConnection|DEBUG|Setting TCP Keep-Alives using SocketOptions - enable keep-alives True, retries 9, time 00:01:00, interval 00:00:01. }}
      {{2020-05-12 08:15:43.6880||Couchbase.Core.IO.Connections.MultiplexingConnection|DEBUG|Setting TCP Keep-Alives using SocketOptions - enable keep-alives True, retries 9, time 00:01:00, interval 00:00:01. }}
      {{2020-05-12 08:15:43.6955||Couchbase.Core.IO.Connections.MultiplexingConnection|WARN|SetKeepAlive failed (Not Supported): An unknown, invalid, or unsupported option or level was specified in a getsockopt or setsockopt call. }}
      {{2020-05-12 08:15:43.6955||Couchbase.Core.IO.Connections.MultiplexingConnection|WARN|SetKeepAlive failed (Not Supported): An unknown, invalid, or unsupported option or level was specified in a getsockopt or setsockopt call. }}
      2020-05-12 08:15:43.7178||SdkdConsole.Daemon.Control|ERROR|Unexpected Exception on Run:One or more errors occurred. (The operation is not allowed on non-connected sockets.) The operation is not allowed on non-connected sockets.

      Attachments

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

        Activity

          Note that I had a similar error message before and it was a red herring. The actual problem was that the DNS name didn't resolve and it wasn't caught there, so a socket that never connected was trying to have keepalive set against it.

          ingenthr Matt Ingenthron added a comment - Note that I had a similar error message before and it was a red herring. The actual problem was that the DNS name didn't resolve and it wasn't caught there, so a socket that never connected was trying to have keepalive set against it.
          will.broadbelt Will Broadbelt added a comment - - edited

          Hmm, interesting, here we are using the IP so I think it has to do with the recent TCPKeepAlive change:  NCBC-2494. Though it could be some configuration issue on our windows machines - like how we're using .NET Core 3.0 app on Windows, which looks like its become unsupported?

          will.broadbelt Will Broadbelt added a comment - - edited Hmm, interesting, here we are using the IP so I think it has to do with the recent TCPKeepAlive change:  NCBC-2494 . Though it could be some configuration issue on our windows machines - like how we're using .NET Core 3.0 app on Windows, which looks like its become unsupported?
          jmorris Jeff Morris added a comment - - edited

          I am pretty sure its the operating system that doesn't support SocketOptions, its not just the .NET Core version. Its troubling that the connection seems to be terminated/corrupted. I was hoping a NotSupportedException would be thrown instead.

          The next logical step would be to not use conditional compilation, but target the OS instead. I am not 100% confident about this. Perhaps we skip the code if Keep-Alives is disabled, so that there is a work-around.

          jmorris Jeff Morris added a comment - - edited I am pretty sure its the operating system that doesn't support SocketOptions, its not just the .NET Core version. Its troubling that the connection seems to be terminated/corrupted. I was hoping a NotSupportedException would be thrown instead. The next logical step would be to not use conditional compilation, but target the OS instead. I am not 100% confident about this. Perhaps we skip the code if Keep-Alives is disabled, so that there is a work-around.

          People

            jmorris Jeff Morris
            will.broadbelt Will Broadbelt
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty