mongodb import
#1
hi

I set up UIconfig.js so

Code:
ui: {
   ssl: true,
   host: 'domainname',
   port: 443,
   path: '/'
 },
 adapter: 'mongodb'

, but I can not connect to import data.

Code:
Error: Cannot find module 'mongojs'
   at Function.Module._resolveFilename (internal/modules/cjs/loader.js:548:15)
   at Function.Module._load (internal/modules/cjs/loader.js:475:25)
   at Module.require (internal/modules/cjs/loader.js:598:17)
   at require (internal/modules/cjs/helpers.js:11:18)
   at Object.<anonymous> (/home/eml/gekko/plugins/mongodb/handle.js:1:77)
   at Module._compile (internal/modules/cjs/loader.js:654:30)
   at Object.Module._extensions..js (internal/modules/cjs/loader.js:665:10)
   at Module.load (internal/modules/cjs/loader.js:566:32)
   at tryModuleLoad (internal/modules/cjs/loader.js:506:12)
   at Function.Module._load (internal/modules/cjs/loader.js:498:3)
RECEIVED ERROR IN IMPORT 61216142502108495
Child process has died.

Maybe I need to do something else?

Thank's
  Reply
#2
npm install mongojs

in gekko directory
  Reply
#3
And set mongodb in CandleWriter plugin. I do not know if it would be faster than import to convert dumps from SQLite from here: https://github.com/xFFFFF/Gekko-Datasets
My projects [Strategies] [Datasets]
  Reply
#4
(04-23-2018, 03:45 PM)PapoKarlo Wrote: npm install mongojs

in gekko directory

thank

Code:
<-- GET /api/exchanges
 --> GET /api/exchanges 200 8ms 100.21kb
 <-- POST /api/scansets

/home/eml/gekko/node_modules/mongodb/lib/mongo_client.js:421
         throw err
         ^
MongoError: failed to connect to server [mongodb:27017] on first connect [MongoError: getaddrinfo EAI_AGAIN mongodb:27017]
   at Pool.<anonymous> (/home/eml/gekko/node_modules/mongodb-core/lib/topologies/server.js:336:35)
   at Pool.emit (events.js:180:13)
   at Connection.<anonymous> (/home/eml/gekko/node_modules/mongodb-core/lib/connection/pool.js:280:12)
   at Object.onceWrapper (events.js:272:13)
   at Connection.emit (events.js:180:13)
   at Socket.<anonymous> (/home/eml/gekko/node_modules/mongodb-core/lib/connection/connection.js:189:49)
   at Object.onceWrapper (events.js:272:13)
   at Socket.emit (events.js:180:13)
   at emitErrorNT (internal/streams/destroy.js:64:8)
   at process._tickCallback (internal/process/next_tick.js:178:19)
Emitted 'error' event at:
   at /home/eml/gekko/node_modules/mongojs/lib/database.js:31:16
   at connectCallback (/home/eml/gekko/node_modules/mongodb/lib/mongo_client.js:527:5)
   at /home/eml/gekko/node_modules/mongodb/lib/mongo_client.js:418:11
   at process._tickCallback (internal/process/next_tick.js:176:11)
  Reply
#5
(04-23-2018, 04:27 PM)xFFFFF Wrote: And set mongodb in CandleWriter plugin. I do not know if it would be faster than import to convert dumps from SQLite from here: https://github.com/xFFFFF/Gekko-Datasets

thanks, it's interesting, I did not see your project
  Reply
#6
It will be nice if will be useful.

I dont know why gekko's developers set it, but one line from config/adapters/mongodb.toml must be changed
Code:
connectionString = "mongodb://mongodb/gekko"
to
Code:
connectionString = "mongodb://localhost/gekko"
My projects [Strategies] [Datasets]
  Reply


Forum Jump:


Users browsing this thread: