https://www.growthbook.io/ logo
#announcements
Title
# announcements
n

nice-painting-14163

06/03/2022, 6:45 AM
below are the PODs logs
Copy code
yarn run v1.22.19
$ wsrun -p '*-end' -m start
back-end
 | $ node dist/server.js
front-end
 | $ next start
 | ready - started server on 0.0.0.0:3000, url: <http://localhost:3000>
 | info  - Using webpack 5. Reason: no next.config.js <https://nextjs.org/docs/messages/webpack5>
back-end
 | No config.yml file. Using MongoDB instead to store data sources, metrics, and dimensions.
 |   Back-end is running at <http://localhost:3100> in development mode
 |   Press CTRL-C to stop
 |
 | MongooseServerSelectionError: getaddrinfo ENOTFOUND mongo
 |     at NativeConnection.Connection.openUri (/usr/local/src/app/node_modules/mongoose/lib/connection.js:847:32)
 |     at /usr/local/src/app/node_modules/mongoose/lib/index.js:351:10
 |     at /usr/local/src/app/node_modules/mongoose/lib/helpers/promiseOrCallback.js:32:5
 |     at Promise._execute (/usr/local/src/app/node_modules/bluebird/js/release/debuggability.js:384:9)
 |     at Promise._resolveFromExecutor (/usr/local/src/app/node_modules/bluebird/js/release/promise.js:518:18)
 |     at new Promise (/usr/local/src/app/node_modules/bluebird/js/release/promise.js:103:10)
 |     at promiseOrCallback (/usr/local/src/app/node_modules/mongoose/lib/helpers/promiseOrCallback.js:31:10)
 |     at Mongoose._promiseOrCallback (/usr/local/src/app/node_modules/mongoose/lib/index.js:1149:10)
 |     at Mongoose.connect (/usr/local/src/app/node_modules/mongoose/lib/index.js:350:20)
 |     at /usr/local/src/app/packages/back-end/dist/init/mongo.js:26:41
 |     at Generator.next (<anonymous>)
 |     at /usr/local/src/app/packages/back-end/dist/init/mongo.js:8:71
 |     at new Promise (<anonymous>)
 |     at __awaiter (/usr/local/src/app/packages/back-end/dist/init/mongo.js:4:12)
 |     at Object.exports.default (/usr/local/src/app/packages/back-end/dist/init/mongo.js:19:25)
 |     at /usr/local/src/app/packages/back-end/dist/app.js:102:38
 |     at Generator.next (<anonymous>)
 |     at /usr/local/src/app/packages/back-end/dist/app.js:27:71
 |     at new Promise (<anonymous>)
 |     at __awaiter (/usr/local/src/app/packages/back-end/dist/app.js:23:12)
 |     at /usr/local/src/app/packages/back-end/dist/app.js:101:34
 |     at /usr/local/src/app/packages/back-end/dist/app.js:104:16 {
 |   reason: TopologyDescription {
 |     type: 'Single',
 |     setName: null,
 |     maxSetVersion: null,
 |     maxElectionId: null,
 |     servers: Map(1) { 'mongo:27017' => [ServerDescription] },
 |     stale: false,
 |     compatible: true,
 |     compatibilityError: null,
 |     logicalSessionTimeoutMinutes: null,
 |     heartbeatFrequencyMS: 10000,
 |     localThresholdMS: 15,
 |     commonWireVersion: null
 |   }
 | }
 | Error: MongoDB connection error.
 |     at /usr/local/src/app/packages/back-end/dist/init/mongo.js:34:15
 |     at Generator.throw (<anonymous>)
 |     at rejected (/usr/local/src/app/packages/back-end/dist/init/mongo.js:6:65)
 | error Command failed with exit code 1.
 | info Visit <https://yarnpkg.com/en/docs/cli/run> for documentation about this command.
 | `yarn start` failed with exit code 1
f

fresh-football-47124

06/03/2022, 7:15 AM
Hi Kapil, looking, one moment
n

nice-painting-14163

06/03/2022, 7:16 AM
ok thanks
f

fresh-football-47124

06/03/2022, 7:17 AM
do you have mongo running locally?
n

nice-painting-14163

06/03/2022, 7:17 AM
yeh
in seprate POD
f

fresh-football-47124

06/03/2022, 7:18 AM
can you access it with mongo:27017 or are you using an ip?
n

nice-painting-14163

06/03/2022, 7:18 AM
I did not check this ..
f

fresh-football-47124

06/03/2022, 7:18 AM
sounds like the mongo connection string isn't correct
n

nice-painting-14163

06/03/2022, 7:18 AM
I have created a service
Copy code
- env:
    - name: MONGODB_URI
      value: <mongodb://root:password@mongo:27017/>
try to connect using like this
f

fresh-football-47124

06/03/2022, 7:20 AM
ya, that's the default when you're using the local mongo docker container, but I'm not sure about the networking inside k8s
n

nice-painting-14163

06/03/2022, 7:21 AM
ok let me check
@fresh-football-47124 Its working now Issue is connection string error
Copy code
value: <mongodb://root:password@mongodb:27017/>
previous I am using
Copy code
<mongodb://root:password@mongo:27017/>
f

fresh-football-47124

06/03/2022, 9:01 AM
oh, cool - missing the value: ?
oh, nm, I see it
mongodb vs mongo, cool, glad it's working
29 Views