nodemon] app crashed - waiting for file changes before starting - mongodb

I cannot connect to Mongo using mongoose ,,,
querySrv ENODATA _mongodb._tcp.todocluster-3kozc.mongodb.net
[nodemon] app crashed - waiting for file changes before starting...

I found a solution in another post Error: querySrv ENODATA _mongodb._tcp.blog-cluster-0hb5z.mongodb.net at QueryReqWrap.onresolve [as oncomplete]
For some reason the dns server did not return srv records, changing the dns server to one that returns those records fixed the problem. (I used https://use.opendns.com/ to fix the it)
it works now ...

npx kill-port 5000
then,
yarn start or npm start

Related

Backup Daemon error - ops manager 3.4

I have installed ops manager and setup the configuration for backup. When it tries to sync the mongodb deployment, it is giving an error as it could not find mongod in /opt/mongodb/mms/mongodb-releases.
Here is the error below, this is the error thrown by backup daemon- backup.jobs.590664394c9f732dd6c88b7c.tax
Failed to start mongod
com.xgen.svc.brs.util.GenericMongoManager$MongoManagerConfigException: Could not find mongod. Found /opt/mongodb/mms/mongodb-releases/mongodb-linux-x86_64-rhel70-3.2.8/bin, but did not find /opt/mongodb/mms/mongodb-releases/mongodb-linux-x86_64-rhel70-3.2.8/bin/mongod.
com.xgen.svc.brs.util.GenericMongoManager$Purpose.<init>(GenericMongoManager.java:132)
com.xgen.svc.brs.util.MongoManager$MongoDPurpose.<init>(MongoManager.java:331)
com.xgen.svc.brs.util.MongoManager$HeadPurpose.<init>(MongoManager.java:477)
com.xgen.svc.brs.job.ReplicaSetJob.startMongo(ReplicaSetJob.java:103)
com.xgen.svc.brs.job.ReplicaSetJob.startMongo(ReplicaSetJob.java:80)
com.xgen.svc.brs.job.IncrementalSyncJob.doWork(IncrementalSyncJob.java:82)
Can you please show how can it be resolved?
Restart the backup daemon (only the backup daemon).
It should normally download the mongodb releases at the very beginning.
2017-05-05T00:00:47.558+0000 [MongoDbReleaseAutoDownload Thread] INFO com.xgen.svc.brs.autoDownloader.MongoDbReleaseAutoDownloadThread [MongoDbReleaseAutoDownloadThread.java.runInternal:105] - MongoDbReleaseAutoDownload run completed.
If it does not work, look at the daemon log (by default /opt/mongodb/mms/logs/daemon.log).

Error starting ionic project

I have installed Node.js to start with an ionic project.
I have also installed ionic and cordova using the commands below:
npm install ionic -g
npm install cordova -g
I am using the command below to create an ionic project:
ionic start myApp blank
And i m getting the following error:
D:\IonicWork>ionic start myApp blank
Creating Ionic app in folder D:\IonicWork\myApp based on blank project
Downloading: https://github.com/driftyco/ionic-app-base/archive/master.zip
Error with start Error: connect ETIMEDOUT 192.30.253.121:443
at Object.exports._errnoException (util.js:1036:11)
at exports._exceptionWithHostPort (util.js:1059:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1080:14)
Error Initializing app: Error: connect ETIMEDOUT 192.30.253.121:443
Error: connect ETIMEDOUT 192.30.253.121:443
at Object.exports._errnoException (util.js:1036:11)
at exports._exceptionWithHostPort (util.js:1059:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1080:14)
Caught exception:
Error: connect ETIMEDOUT 192.30.253.121:443
at Object.exports._errnoException (util.js:1036:11)
at exports._exceptionWithHostPort (util.js:1059:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1080:14)
Mind letting us know? https://github.com/driftyco/ionic-cli/issues
Please suggest.
Thanks,
Malini
If you are on a company network, you are most probably behind a corporate web proxy. There are plenty of solution out there.
For a headstart, you need to add http_proxy and https_proxy environment variables based on the proxy you got from your company IT department.
Open your node command prompt in administrator mode and run following command. After that, close and restart your node command prompt and try to run ionic start again.
npm config set proxy http://proxy.company.com:8080
npm config set https-proxy http://proxy.company.com:8080
Better to start in ionic creator.and its the better place for design also

Meteor app crash randomly throwing a 'MongoError: server instance pool was destroyed' error

I deployed a meteor app to an AWS server using mup which used docker to deploy the app. I also used mLab sandboxed db.
The issue is, the app crashes without warning after some time. Crashing means the app still works but data won't load from the database. I have two versions of the app (staging and production) running in two different servers. But both have this issue. In the docker logs I see this error repeated a lot of times :
Exception in setInterval callback: MongoError: server instance pool was destroyed
at Object.Future.wait (/bundle/bundle/programs/server/node_modules/fibers/future.js:446:16)
at MongoConnection.<anonymous> (packages/meteor/helpers.js:119:1)
at MongoConnection.(anonymous function) [as update] (packages/mongo/mongo_driver.js:771:49)
at [object Object].update (packages/mongo/collection.js:589:29)
at AccountsServer.Ap._expireTokens (packages/accounts-base/accounts_server.js:1100:14)
at packages/accounts-base/accounts_server.js:1173:14
at [object Object]._.extend.withValue (packages/meteor/dynamics_nodejs.js:56:1)
at packages/meteor/timers.js:6:1
at runWithEnvironment (packages/meteor/dynamics_nodejs.js:110:1)
- - - - -
at Function.MongoError.create (/bundle/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/error.js:29:11)
at basicWriteValidations (/bundle/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/topologies/server.js:433:51)
at [object Object].Server.update (/bundle/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/topologies/server.js:543:16)
at [object Object].Server.update (/bundle/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/server.js:386:17)
at updateDocuments (/bundle/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/collection.js:1037:19)
at [object Object].Collection.update (/bundle/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/collection.js:1075:44)
at MongoConnection._update (packages/mongo/mongo_driver.js:560:18)
at MongoConnection.<anonymous> (packages/meteor/helpers.js:118:1)
at MongoConnection.(anonymous function) [as update] (packages/mongo/mongo_driver.js:771:49)
at [object Object].update (packages/mongo/collection.js:589:29)
Any idea what's happening?
In the client browser console, I see this error:
WebSocket connection to 'wss://oursite.com/sockjs/373/2lrpal10/websocket' failed: WebSocket is closed before the connection is established.
Updating npm-mongo and mongo fixed this for me.
meteor update --all-packages

Meteor app crashes periodically with a Mongo error

Meteor app crashes every two-three minutes with this error:
TypeError: Error.captureStackTrace is not a function
at Error.MongoError (/Users/alex/.meteor/packages/npm-mongo/.1.5.45.1i7w6an++os+web.browser+web.cordova/npm/node_modules/mongodb-core/lib/error.js:13:9)
at Function.MongoError.create (/Users/alex/.meteor/packages/npm-mongo/.1.5.45.1i7w6an++os+web.browser+web.cordova/npm/node_modules/mongodb-core/lib/error.js:29:11)
at Socket.<anonymous> (/Users/alex/.meteor/packages/npm-mongo/.1.5.45.1i7w6an++os+web.browser+web.cordova/npm/node_modules/mongodb-core/lib/connection/connection.js:161:20)
at Socket.g (events.js:260:16)
at emitNone (events.js:67:13)
at Socket.emit (events.js:166:7)
at Socket._onTimeout (net.js:332:8)
at _runOnTimeout (timers.js:524:11)
at _makeTimerTimeout (timers.js:515:3)
at Timer.unrefTimeout (timers.js:584:5)
This started after I updated my project to Meteor 1.4. Is Meteor doing something in the background? How can I debug it to find out what's going on?
Additional details: I'm using React, react-router and reactrouter:react-router-ssr. So there is server side rendering. Maybe this will trigger something...
Guys. The most important detail as I see it is this:
Error.captureStackTrace is not a function
This is a core node function! If I run node and enter Error I see the function: captureStackTrace: [Function: captureStackTrace]. So the issue looks like Meteor is maybe running an older version of node that doesn't have captureStackTrace in Error yet? Well, I followed the instructions here to check the version:
MonsterMac:/ alex$ cd ~/.meteor/packages/meteor-tool/1.4.0-1/mt-os.osx.x86_64/dev_bundle/bin/
MonsterMac:bin alex$ ./node -v
v4.4.7
According to the Change log captureStackTrace is there in version 4.4.7. Now what?
Meteor uses node 4.4.7. Also, with Meteor 1.4, Mongo is updated to a newer version. To resolve this error, try meteor reset. This will refresh Mongo to the latest version, when you start meteor next.

Derby app created using 'derby new test' not working

I've installed derbyjs using npm install -g derby and then created a test app using derby new test.
Then i started the app using node server.js and I got the following output:
info - socket.io started
Starting cluster with 1 workers in undefined mode
`kill -s SIGUSR2 7161` to force cluster reload
Go to: http://localhost:3000/
info - socket.io started
So I tried to request http://localhost:3000/, but the site does not finish loading and I get the following exception:
TEMPLATE ERROR
Error: Model mutation performed after bundling for clientId: 79f4a9f3-25fc-438d-b9f4-a450dccf9566
at Model.errorOnCommit [as _commit] (/web/derby/test/node_modules/derby/node_modules/racer/lib/bundle/bundle.Model.js:64:9)
at /web/derby/test/node_modules/derby/node_modules/racer/lib/txns/txns.Model.js:120:15
at next (/web/derby/test/node_modules/derby/node_modules/racer/lib/middleware.js:7:26)
at /web/derby/test/node_modules/derby/node_modules/racer/lib/txns/txns.Model.js:107:16
at next (/web/derby/test/node_modules/derby/node_modules/racer/lib/middleware.js:7:26)
at /web/derby/test/node_modules/derby/node_modules/racer/lib/txns/txns.Model.js:101:16
at next (/web/derby/test/node_modules/derby/node_modules/racer/lib/middleware.js:7:26)
at /web/derby/test/node_modules/derby/node_modules/racer/lib/txns/txns.Model.js:92:16
at next (/web/derby/test/node_modules/derby/node_modules/racer/lib/middleware.js:7:26)
at Object.run (/web/derby/test/node_modules/derby/node_modules/racer/lib/middleware.js:10:12)
events.js:68
throw arguments[1]; // Unhandled 'error' event
^
Error: Cannot write after end
at Gzip.write (zlib.js:311:31)
at ServerResponse.res.write (/web/derby/test/node_modules/express/node_modules/connect/lib/middleware/compress.js:82:18)
at Object.View._render (/web/derby/test/node_modules/derby/lib/View.server.js:337:9)
at /web/derby/test/node_modules/derby/lib/View.server.js:276:10
at Array.2 (/web/derby/test/node_modules/derby/lib/View.server.js:300:5)
at Object.Promise.resolve (/web/derby/test/node_modules/derby/node_modules/racer/lib/util/Promise.js:21:19)
at /web/derby/test/node_modules/derby/lib/View.server.js:136:17
at /web/derby/test/node_modules/derby/lib/files.js:224:7
at Object.oncomplete (fs.js:308:15)
at process._makeCallback (node.js:248:20)
I have absolutely no idea how I can get it running... Is it a bug, or am I doing something wrong?
Update
I've created a bug report on the derby repository: https://github.com/codeparty/derby/issues/170