Comments (7)
Interesting. Any idea if the bug is in my code, node itself, or something cloudent it doing wrong?
Can you trace the data going back and forth using pcap or something?
from couch-client.
I've dug into it further. There are several things going on. The unexpected token is because the server is returning
<html><body><h1>503 Service Unavailable</h1>
No server is available to handle this request.
</body></html>
when called by CouchClient.
CouchClient also assumes port 5984, and Cloudant is running on port 80, so I need to specify port 80 in my connection url, where curl assumes port 80.
Finally, CouchClient seems to throw away information about secure sockets, so it is not connecting over https.
I've gotten far enough to bring Node and CouchClient up, but it appears to be unresponsive now, will give you some more info when I get it.
from couch-client.
I think I am having a similar issue. I can connect to a CouchDB instance locally, but using Cloudant via heroku over https fails. If I curl my couchdb running on cloudant, I can connect to the database. However, attempting to do the same with CouchClient gives me this:
2011-06-07T14:45:12+00:00 app[web.1]: node.js:134
2011-06-07T14:45:12+00:00 app[web.1]: throw e; // process.nextTick error, or 'error' event on first tick
2011-06-07T14:45:12+00:00 app[web.1]: ^
2011-06-07T14:45:12+00:00 app[web.1]: TypeError: Cannot read property 'rows' of undefined
2011-06-07T14:45:12+00:00 app[web.1]: at /app/node_modules/couch-client/lib/couch-client.js:170:21
2011-06-07T14:45:12+00:00 app[web.1]: at ClientRequest.errorHandler (/app/node_modules/couch-client/lib/couch-client.js:47:23)
2011-06-07T14:45:12+00:00 app[web.1]: at ClientRequest.emit (events.js:64:17)
2011-06-07T14:45:12+00:00 app[web.1]: at CleartextStream. (http.js:1272:31)
2011-06-07T14:45:12+00:00 app[web.1]: at CleartextStream.emit (events.js:61:17)
2011-06-07T14:45:12+00:00 app[web.1]: at Array. (tls.js:617:22)
2011-06-07T14:45:12+00:00 app[web.1]: at EventEmitter._tickCallback (node.js:126:26)
from couch-client.
I'm seeing the same issue as @mhemesath
from couch-client.
I got around it by doing this:
new CouchClient(process.env.CLOUDANT_URL + ":443/myDocument")
from couch-client.
awesome, that worked :) thanks!
from couch-client.
I logged an issue specific to this problem here: #29
from couch-client.
Related Issues (19)
- changes should allow arbitrary query params HOT 1
- Beyond Basic Auth Bugs HOT 3
- NPM 0.3.0 install fails HOT 1
- revCache never being cleared HOT 2
- Setting Host header incorrectly
- realGet actually Posts? HOT 1
- HEAD requests fail HOT 1
- Server crashing when receiving a connection refused error message from Couchdb HOT 1
- _all_docs
- The request method should allow functions in body to be able to save design docs correctly
- Broken on Node 0.4.7 HOT 2
- Error when saving with outdated _rev value
- Response missing for arbitrary HTTP requests
- _bulk_docs response undefined HOT 2
- Default Port of 5984 Breaking Connections to Cloudant over HTTPS HOT 2
- merge HOT 2
- basic auth not working HOT 2
- save writes over previous document HOT 17
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from couch-client.