guardly / loopback-connector-couchbase

Couchbase Connector for Strongloop Loopback
MIT License
19 stars 25 forks source link

Connection error #13

Open muneebs opened 9 years ago

muneebs commented 9 years ago

Hi I've tried to setup my data source the way you have it in your example application, unfortunately, I've not been able to connect to my couchbase instance at all, and get the error below:

{
  "error": {
    "name": "TypeError",
    "status": 500,
    "message": "Cannot read property 'connect' of undefined",
    "stack": "TypeError: Cannot read property 'connect' of undefined\n    at DataSource.dataSource.connect (/Users/muneeb/dev/api/node_modules/loopback-datasource-juggler/lib/datasource.js:339:29)\n    at DataSource.ready (/Users/muneeb/dev/api/node_modules/loopback-datasource-juggler/lib/datasource.js:2001:10)\n    at stillConnecting (/Users/muneeb/dev/api/node_modules/loopback-datasource-juggler/lib/dao.js:306:23)\n    at Function.DataAccessObject.create (/Users/muneeb/dev/api/node_modules/loopback-datasource-juggler/lib/dao.js:151:27)\n    at Object.eval [as forward] (eval at recompile (/usr/local/lib/node_modules/strongloop/node_modules/strong-agent/lib/proxy.js:237:15), <anonymous>:4:32)\n    at Function.eval (eval at wrap (/usr/local/lib/node_modules/strongloop/node_modules/strong-agent/lib/proxy.js:193:20), <anonymous>:3:21)\n    at SharedMethod.invoke (/Users/muneeb/dev/api/node_modules/loopback/node_modules/strong-remoting/lib/shared-method.js:198:25)\n    at HttpContext.invoke (/Users/muneeb/dev/api/node_modules/loopback/node_modules/strong-remoting/lib/http-context.js:335:12)\n    at /Users/muneeb/dev/api/node_modules/loopback/node_modules/strong-remoting/lib/remote-objects.js:595:9\n    at execStack (/Users/muneeb/dev/api/node_modules/loopback/node_modules/strong-remoting/lib/remote-objects.js:448:7)"
  }
}

This is my configuration file:

"couchbase": {
    "host": "127.0.0.1",
    "port": 8091,
    "database": "default",
    "name": "couchbase",
    "n1qlport": 8093,
    "connector": "couchbase",
    "connectionTimeout": 20000,
    "operationTimeout": 15000
  }
sebastianhaas commented 9 years ago

I can confirm this- I am currently using the preview of Couchbase Server 4.

nolandubeau commented 9 years ago

Hi guys,

We are looking into getting this working with the latest version, but don't have a timeframe for release due to higher priorities. PR requests are welcome!

Thanks.

On Mon, May 25, 2015 at 10:17 AM, Sebastian Haas notifications@github.com wrote:

I can confirm this- I am currently using the preview of Couchbase Server 4.

— Reply to this email directly or view it on GitHub https://github.com/guardly/loopback-connector-couchbase/issues/13#issuecomment-105241756 .

_Nolan Dubeau_VP, Engineering, Guardly Corp. Online: https://www.guardly.com LinkedIn: http://www.linkedin.com/in/nolandubeau 20 Maud Street, Suite 307, Toronto, ON M5V 2M5 CA (416) 434-8029 | US (650) 262-3599 | Skype: nolandubeau Please consider the environment before printing this email.

sebastianhaas commented 9 years ago

Thank you very much for your quick response!

hoangton commented 8 years ago

Hi, I face same issue Version: 4.0.0-4051 Community Edition (build-4051)

{ "error": { "name": "TypeError", "status": 500, "message": "Cannot read property 'connect' of undefined", "stack": "TypeError: Cannot read property 'connect' of undefined\n at DataSource.dataSource.connect (/Volumes/DATA/stash/cms/node_modules/loopback-datasource-juggler/lib/datasource.js:349:29)\n at DataSource.ready (/Volumes/DATA/stash/cms/node_modules/loopback-datasource-juggler/lib/datasource.js:2121:10)\n at stillConnecting (/Volumes/DATA/stash/cms/node_modules/loopback-datasource-juggler/lib/dao.js:357:23)\n at Function.find (/Volumes/DATA/stash/cms/node_modules/loopback-datasource-juggler/lib/dao.js:1315:27)\n at SharedMethod.invoke (/Volumes/DATA/stash/cms/node_modules/loopback/node_modules/strong-remoting/lib/shared-method.js:248:25)\n at HttpContext.invoke (/Volumes/DATA/stash/cms/node_modules/loopback/node_modules/strong-remoting/lib/http-context.js:384:12)\n at /Volumes/DATA/stash/cms/node_modules/loopback/node_modules/strong-remoting/lib/remote-objects.js:620:11\n at execStack (/Volumes/DATA/stash/cms/node_modules/loopback/node_modules/strong-remoting/lib/remote-objects.js:460:7)\n at RemoteObjects.execHooks (/Volumes/DATA/stash/cms/node_modules/loopback/node_modules/strong-remoting/lib/remote-objects.js:464:10)\n at /Volumes/DATA/stash/cms/node_modules/loopback/node_modules/strong-remoting/lib/remote-objects.js:617:10" } }

mauroporras commented 8 years ago

@hoangton Could you work around this?

fargozhu commented 8 years ago

I am facing the same issue.Is there any progress on this?

rikyreas14 commented 8 years ago

Is there any solution for this?

exmurr commented 8 years ago

getting this too.... so the question is whether this is a versioning issue with couchbase or something specific I am doing that causes this. Anyone have a workaround?

exmurr commented 8 years ago

I found that the connector couldn't be initialized unless you installed couchbase in the loopback-connector-couchbase itself. That solved this problem for me and I've had no other issues.

minho814 commented 8 years ago

So does anyone know the source of what's exactly causing this error?

rikyreas14 commented 8 years ago

@exmurr: What if we need to connect to remote couchbase? For me change the configuration directly in the datasources.json and it works fine.

sminodonte commented 7 years ago

same problem for me

sminodonte commented 7 years ago

with loopback-connector-couchbase version 1.0.0 I solve the problem