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

Can't connect to local or remote Couchbase server

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • None
    • None
    • library
    • Client - Windows 8.1
      Servers tested:
        Windows Server 2012
        Windows 8.1
        Windows 7
        Centos 6

    Description

      I've written a test application that just connects to a Couchbase server, and reads one record. I've tested this app on other machines and it works, however I can't connect to any Couchbase server (local or remote) from my local machine. Every time, I get a System.Net.WebException when it times out.

      Firewall is turned off
      There are no HTTP debugging applications running
      I can connect to the server via a web browser
      Using a CouchbaseCluster connection works

      Attached is my solution, and the log is in the /bin/debug folder.

      Attachments

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

        Activity

          jmorris Jeff Morris added a comment -

          Does the "test-bucket" exist? Once I changed the source to this it worked for me locally:

          var conn = new CouchbaseClientConfiguration();
          conn.Urls.Add(new Uri("http://127.0.0.1:8091/pools/"));
          conn.Bucket = "default";
          conn.HttpRequestTimeout = new TimeSpan(0, 1, 0);

          If does exist, then it's probably something that's blocking the streaming http connection from establishing. I usually see this with Fiddler/Charles on startup, but once the client has established it's connection you can run the http debugger with no problems. Is there something else that's possibly blocking the connection?

          jmorris Jeff Morris added a comment - Does the "test-bucket" exist? Once I changed the source to this it worked for me locally: var conn = new CouchbaseClientConfiguration(); conn.Urls.Add(new Uri("http://127.0.0.1:8091/pools/")); conn.Bucket = "default"; conn.HttpRequestTimeout = new TimeSpan(0, 1, 0); If does exist, then it's probably something that's blocking the streaming http connection from establishing. I usually see this with Fiddler/Charles on startup, but once the client has established it's connection you can run the http debugger with no problems. Is there something else that's possibly blocking the connection?
          niculear niculear added a comment -

          Yes, I created a bucket called 'test-bucket' with default settings, and created one record in it:

          UniqueID1

          { "test-data": "It's Working!" }
          niculear niculear added a comment - Yes, I created a bucket called 'test-bucket' with default settings, and created one record in it: UniqueID1 { "test-data": "It's Working!" }
          jmorris Jeff Morris added a comment -

          What happens when you change 127.0.0.1 => localhost? You mentioned you are using Hyper-V? That could be the problem...have you tried running VS using admin credentials ("run as adminstrator")?

          Also, try changing the Get<string>(...) to ExecuteGet<string>(..) and then checking the result.Message property.

          jmorris Jeff Morris added a comment - What happens when you change 127.0.0.1 => localhost? You mentioned you are using Hyper-V? That could be the problem...have you tried running VS using admin credentials ("run as adminstrator")? Also, try changing the Get<string>(...) to ExecuteGet<string>(..) and then checking the result.Message property.
          niculear niculear added a comment -

          Hi Jeff,

          I've been running VS as admin the whole time, changing loopback address to localhost incurs the same result, and here is the response I get when using ExecuteGet:

          Unable to locate node

          If I run the app inside of one of my Hyper-V vm's (pointing to the host machine) it works.

          Nick

          niculear niculear added a comment - Hi Jeff, I've been running VS as admin the whole time, changing loopback address to localhost incurs the same result, and here is the response I get when using ExecuteGet: Unable to locate node If I run the app inside of one of my Hyper-V vm's (pointing to the host machine) it works. Nick
          niculear niculear added a comment -

          Hi Jeff,

          Looks like it was my anti-virus after all. I use BitDefender, and after disabling the firewall, anti-virus, and every other service that could be disabled I looked for other causes for this problem. I decided to try uninstalling BitDefender from my system, and it seemed to work after that. I'll be opening a ticket with them to see why this is happening, so thanks for your help, and sorry to waste your time.

          Nick

          niculear niculear added a comment - Hi Jeff, Looks like it was my anti-virus after all. I use BitDefender, and after disabling the firewall, anti-virus, and every other service that could be disabled I looked for other causes for this problem. I decided to try uninstalling BitDefender from my system, and it seemed to work after that. I'll be opening a ticket with them to see why this is happening, so thanks for your help, and sorry to waste your time. Nick
          jmorris Jeff Morris added a comment -

          No problem, just close this ticket

          jmorris Jeff Morris added a comment - No problem, just close this ticket
          jmorris Jeff Morris added a comment -

          Also, could you please update your question with the answer? http://www.couchbase.com/communities/q-and-a/windows-81-machine-will-not-connect-couchbase

          It helps the next person who encounters the problem down the road.

          Thanks,

          Jeff

          jmorris Jeff Morris added a comment - Also, could you please update your question with the answer? http://www.couchbase.com/communities/q-and-a/windows-81-machine-will-not-connect-couchbase It helps the next person who encounters the problem down the road. Thanks, Jeff
          jmorris Jeff Morris added a comment -

          User resolved.

          jmorris Jeff Morris added a comment - User resolved.

          People

            jmorris Jeff Morris
            niculear niculear
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty