Closed sockeqwe closed 8 years ago
@sockeqwe could you look into this problem, i tried to run it with production mongodbUrl, it contains the username and password in the mongodb url, so when I ran it, it gave me
Error: More than 1 database name in URL
at module.exports (/Users/samit/PokeData/node_modules/hashpokemongo/node_modules/mongodb/lib/url_parser.js:128:13)
at connect (/Users/samit/PokeData/node_modules/hashpokemongo/node_modules/mongodb/lib/mongo_client.js:290:16)
at Function.MongoClient.connect (/Users/samit/PokeData/node_modules/hashpokemongo/node_modules/mongodb/lib/mongo_client.js:114:3)
at Object.module.exports.start.MongoClient.connect.Rx.Observable.interval.map.counter.do.pokemon.flatMap.pokemon.flatMap.emptyArrayObservable.flatMap.tweets.filter.tweet.map [as start] (/Users/samit/PokeData/node_modules/hashpokemongo/sentimentTwitter/TwitterSentimentsMiner.js:22:17)
at Object.module.exports.insertToDb (/Users/samit/PokeData/app/controllers/filler/hashPokemonGo.js:34:40)
at NativeConnection.<anonymous> (/Users/samit/PokeData/scripts/listen.js:33:18)
at emitNone (events.js:67:13)
at NativeConnection.emit (events.js:166:7)
at open (/Users/samit/PokeData/node_modules/mongoose/lib/connection.js:516:11)
at /Users/samit/PokeData/node_modules/mongoose/lib/connection.js:522:7
at /Users/samit/PokeData/node_modules/mongoose/node_modules/mongodb/lib/db.js:1504:5
at handleCallback (/Users/samit/PokeData/node_modules/mongoose/node_modules/mongodb/lib/utils.js:96:12)
at _callback (/Users/samit/PokeData/node_modules/mongoose/node_modules/mongodb/lib/db.js:1420:5)
at /Users/samit/PokeData/node_modules/mongoose/node_modules/mongodb/lib/db.js:1463:7
at /Users/samit/PokeData/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/server.js:1416:5
at finish (/Users/samit/PokeData/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/auth/scram.js:157:16)
@sockeqwe any progress with the database url? did you try to connect with remote database?
Not yet, will try that in the evening
samitsv notifications@github.com schrieb am Fr., 23. Sep. 2016, 15:32:
@sockeqwe https://github.com/sockeqwe any progress with the database url? did you try to connect with remote database?
— You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/PokemonGoers/PokeData/pull/162#issuecomment-249193680, or mute the thread https://github.com/notifications/unsubscribe-auth/AAjnrtF8lnuYpXPSKgC0KbM8nwpMl9qlks5qs9TUgaJpZM4KC6JQ .
@samitsv So I set up a demo database on mlab and I am able to connect to.
The url mongodb://username:password@ds023435.mlab.com:23435/fooDatabase
works.
So compared to your database url:
mongodb://username:password@xxxxx.mlab.com:63725/pokemongo/PokeData
you have an additional /pokemongo/DatabaseName
whereas I have only /DatabaseName
in my test (without /pokemongo
).
Are your sure your url is correct?
@samitsv Ok, so I have found the bug. The issue is that the url you retrun from getMongoDbUrl()
is wrong:
mongodb://username:password@xxxxx.mlab.com:63725/pokemongo/PokeData
(currently used url, returned from getMongoDbUrl() )
should be
mongodb://username:password@xxxxx.mlab.com:63725/pokemongo
(connecting to this url works)
getMongoDbUrl()
is always appending /PokeData
(but shouldn't, at least not in production)
@sockeqwe thanks .. corrected it and now it works fine
thanks for your help!
@sacdallago - After this merge, the API link is not available. The builds (both Travis and Docker) seemed fine and completed without errors.
@sockeqwe - In the file, HasMap
is required.. However, the module name is hashmap
. This might fail on case-sensitive file systems and in fact it does fail.
Could you please correct this?
Adds:
/pokemon/:pokemonNumber/sentiments
and/pokemon/:pokemonNumber/sentiments/:lat/:lng