mlab

Mongo Query failed with error code 13 and error message 'not authorized'

故事扮演 提交于 2020-01-24 14:21:26
问题 Error occures when I am trying to make an query to mongo instance on mLab. I am requesting it from spring boot app. Connection to database is stable. Below log from console. Monitor thread successfully connected to server with description ServerDescription{address=ds131531.mlab.com:31531, type=REPLICA_SET_PRIMARY, state=CONNECTED, ok=true, version=ServerVersion{versionList=[3, 4, 15]}, minWireVersion=0, maxWireVersion=5, maxDocumentSize=16777216, logicalSessionTimeoutMinutes=null,

Using mongoose and mlab behind a proxy

天大地大妈咪最大 提交于 2020-01-24 02:45:37
问题 Can't connect to my mlab database if I'm behind a proxy. Any idea how to achieve this? I've already googled and found no answer... Here is my connection: mongoose.connect(config.db.URI); var db = mongoose.connection; db.on('error', function(){ throw new Error('unable to connect to database at ' + config.db.URI); }); 来源: https://stackoverflow.com/questions/38197407/using-mongoose-and-mlab-behind-a-proxy

Mongoose + Mlabs + Big amount of data

别来无恙 提交于 2020-01-15 06:12:06
问题 I use mongoose and react to fetch data from a mlab database. The probleme is that the mlab database have a size of 200 MB, it's a collection of more than 400 000 objects. So when i fetch i have JS error (out of memory) or the request is pending during 2 or 3 mins. I don't know how to improve this request. I also need to do some data formating and i don't know if it's better on back or front end.. I need your help to find a solution. Thanks a lot 回答1: you can try connection.model("myModel")

How to return/edit REST resource with AngularJS & Restangular

荒凉一梦 提交于 2020-01-13 18:26:32
问题 Using Restangular for AngularJS, keep getting an object object from Mongolab. I'm sure it has to do with Promise but not sure how to use/implement this coming from old Java OO experience. (Side note, would something like Eloquent Javascript, some book or resource help me understand the 'new' Javascript style?) The small web app is for Disabled Students and is to input/edit the students, update the time they spend after school and then output reports for their parents/caregivers every week.

How to return/edit REST resource with AngularJS & Restangular

﹥>﹥吖頭↗ 提交于 2020-01-13 18:26:27
问题 Using Restangular for AngularJS, keep getting an object object from Mongolab. I'm sure it has to do with Promise but not sure how to use/implement this coming from old Java OO experience. (Side note, would something like Eloquent Javascript, some book or resource help me understand the 'new' Javascript style?) The small web app is for Disabled Students and is to input/edit the students, update the time they spend after school and then output reports for their parents/caregivers every week.

Mongoid fails on ruby 1.9.3

孤者浪人 提交于 2020-01-13 08:35:13
问题 So I'm playing around with mongo stuffs. Created a new heroku app, added a mongolab option to it, but every mongoid method fails. I googled around, and it looks like this issue was common with ruby prior to 1.9.3, but I'm running 1.9.3. Here's the simplest failing sample: require 'sinatra' require 'mongoid' require 'json' require "sinatra/reloader" if development? Mongoid.load!("mongoid.yml") class Company include Mongoid::Document field :code, type: String field :sector, type: String field

error when creating object in collection in mongolab: BasicBSONList can only work with numeric keys, not: [_id]

元气小坏坏 提交于 2020-01-06 02:26:07
问题 I'm using the following JSON (and have validated it) for my collection in MongoLab: [{ "city": "ACMAR", "pop": 6055, "state": "AL", "_id": "35004" }, { "city": "ADAMSVILLE", "pop": 10616, "state": "AL", "_id": "35005" }, { "city": "ADGER", "pop": 3205, "state": "AL", "_id": "35006" }] But I keep getting this error: BasicBSONList can only work with numeric keys, not: [_id]. So what am I doing wrong? 回答1: I think I may have an idea of what the problem is, but can you elaborate on a few things?

Retrieve audio - binary file- stored in my Mlab

旧时模样 提交于 2020-01-05 03:15:22
问题 Basically, I have set an application with the MediaDevices.getUserMedia WebRTC API. I have recorded the audios and all, all is good in theory. But I got to retrieve the audio now to listen to them. I wonder now how to download audio Post in my MongoDB database. I have tried to export my MongoDB database but I receive only JSON or CSV file, not my audios files. I have heard about gridFS but only in image-handling context. Before dive deeply into gridFS I would get your thinks about audio

Heroku could not authenticate mongolab

旧时模样 提交于 2020-01-03 16:36:20
问题 It was corrected two days ago. And yesterday I committed some changes to heroku and the application crashed, I found from heroku logs that: /app/.bundle/gems/ruby/1.9.1/gems/mongo-1.4.0/lib/mongo/db.rb:137:in `issue_authentication': Failed to authenticate user 'larryzhao' on db 'uthenera' (Mongo::AuthenticationError) I even explicitly input the host/port/username/password/db name into mongoid.yml, still it could not get pass authentication. I tried both database in Rackspace and in Amazon,

Mongodb:SyntaxError: Unexpected identifier

余生颓废 提交于 2020-01-01 11:47:07
问题 i am new in mongodb. i am creating free database using mongolab. my database name is enron. connecting to mongo database using online mongoshell then error occure. mongo ds033499.mongolab.com:33499/enron -u user -p user123 error SyntaxError: Unexpected identifier 回答1: I had this problem and found that mongod.exe was interfering and wouldn't let me connect remotely. Without mongod.exe running, the mongo.exe wouldn't open from windows, so you have to goto the mongo/bin directory in the cmd