MongoError: Unknown modifier: $pushAll
at Function.MongoError.create (E:\ecom\node_modules\mongodb-core\lib\error.js:31:11)
at toError (E:\ecom\node_modules\mongodb\lib\utils.js:139:22)
at E:\ecom\node_modules\mongodb\lib\collection.js:1059:67
at E:\ecom\node_modules\mongodb-core\lib\connection\pool.js:469:18
at _combinedTickCallback (internal/process/next_tick.js:131:7)
at process._tickCallback (internal/process/next_tick.js:180:9)
POST /product/572a35ce194328dc20bfb7c7 500 3099.572 ms - 665
Related
Any help would be appreciated...
Not sure why I get this error every now and then. I've search off and on for a solution but keep coming up empty.
I run my Node App as a service on Centos7. It can run for a few days ... or even a month before getting this error.
I use a Pooled connection to Postgres and am inserting data into several different databases every few seconds.
events.js:377
throw er; // Unhandled 'error' event
^
error: terminating connection due to administrator command
at Parser.parseErrorMessage (/home/beenth12/public_html/ws/wxbox/node/node_modules/pg-protocol/dist/parser.js:287:98)
at Parser.handlePacket (/home/beenth12/public_html/ws/wxbox/node/node_modules/pg-protocol/dist/parser.js:126:29)
at Parser.parse (/home/beenth12/public_html/ws/wxbox/node/node_modules/pg-protocol/dist/parser.js:39:38)
at Socket.<anonymous> (/home/beenth12/public_html/ws/wxbox/node/node_modules/pg-protocol/dist/index.js:11:42)
at Socket.emit (events.js:400:28)
at addChunk (internal/streams/readable.js:290:12)
at readableAddChunk (internal/streams/readable.js:265:9)
at Socket.Readable.push (internal/streams/readable.js:204:10)
at TCP.onStreamRead (internal/stream_base_commons.js:188:23)
Emitted 'error' event on Client instance at:
at Client._handleErrorEvent (/home/beenth12/public_html/ws/wxbox/node/node_modules/pg/lib/client.js:319:10)
at Client._handleErrorMessage (/home/beenth12/public_html/ws/wxbox/node/node_modules/pg/lib/client.js:330:12)
at Connection.emit (events.js:400:28)
at /home/beenth12/public_html/ws/wxbox/node/node_modules/pg/lib/connection.js:114:12
at Parser.parse (/home/beenth12/public_html/ws/wxbox/node/node_modules/pg-protocol/dist/parser.js:40:17)
at Socket.<anonymous> (/home/beenth12/public_html/ws/wxbox/node/node_modules/pg-protocol/dist/index.js:11:42)
[... lines matching original stack trace ...]
at Socket.Readable.push (internal/streams/readable.js:204:10) {
length: 116,
severity: 'FATAL',
code: '57P01',
detail: undefined,
hint: undefined,
position: undefined,
internalPosition: undefined,
internalQuery: undefined,
where: undefined,
schema: undefined,
table: undefined,
column: undefined,
dataType: undefined,
constraint: undefined,
file: 'postgres.c',
line: '3193',
routine: 'ProcessInterrupts'
}
The documentation will inform you that SQLSTATE 57P01 is admin_shutdown. So somebody shutdown the database, and it is not surprising that your database connection got terminated.
Hi all I am using ImageMagick to convert image. But while running the server I am getting the following Error. Anyone have the answer for this? The error is below>
Invalid Parameter - 150
ImageMagick Error:
Error: write EOF
events.js:377
throw er; // Unhandled 'error' event
^
Error: write EOF
at WriteWrap.onWriteComplete [as oncomplete] (internal/stream_base_commons.js:94:16)
Emitted 'error' event on ImageMagick instance at:
at onwriteError (E:\git_clone\nuron_core_ns\node_modules\readable-
stream\lib\_stream_writable.js:449:12)
at onwrite (E:\git_clone\nuron_core_ns\node_modules\readable-
stream\lib\_stream_writable.js:470:11)
at WritableState.onwrite (E:\git_clone\nuron_core_ns\node_modules\readable-
stream\lib\_stream_writable.js:180:5)
at ImageMagick.Duplexify._destroy
(E:\git_clone\nuron_core_ns\node_modules\duplexify\index.js:190:18)
at E:\git_clone\nuron_core_ns\node_modules\duplexify\index.js:182:10
at processTicksAndRejections (internal/process/task_queues.js:77:11) {
errno: -4095,
code: 'EOF',
syscall: 'write'
i have a http request in a variable queryData = qs.parse(requestBody);
when i try to parse through winston
logger.log("info","requestbody",+queryData);
even tried
logger.log("info","requestbody %s", queryData);
logger.log("info","requestbody",{queryData});
didn't worked
am getting error like:
{ TypeError: Cannot create property 'Symbol(level)' on string 'Registering Device typeac'
at DerivedLogger.log (/home/grl/www/node_modules/winston/lib/winston/logger.js:130:20)
at createOcfRes (/home/aol/www/iot-node-server.js:285:10)
at IncomingMessage.<anonymous> (/home/aol/www/iot-node-server.js:115:9)
at emitNone (events.js:86:13)
at IncomingMessage.emit (events.js:186:7)
at endReadableNT (_stream_readable.js:974:12)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickCallback (internal/process/next_tick.js:98:9) level: 'error', timestamp: '19-07-2018 20:20:19' }
I installed meanjs in my OpenSUSE distro, however when I run npm start, here's what I get:
+ Important warning: config.domain is empty. It should be set to the fully qualified domain of the app.
Unhandled rejection MongoError: not authorized on mean-dev to execute command { listIndexes: "sessions", cursor: {} }
at Function.MongoError.create (/home/tasher/Projects/meanjs_test/node_modules/mongodb-core/lib/error.js:31:11)
at queryCallback (/home/tasher/Projects/meanjs_test/node_modules/mongodb-core/lib/cursor.js:212:36)
at /home/tasher/Projects/meanjs_test/node_modules/mongodb-core/lib/connection/pool.js:469:18
at _combinedTickCallback (internal/process/next_tick.js:73:7)
at process._tickCallback (internal/process/next_tick.js:104:9)
From previous event:
at MongoStore.setAutoRemoveAsync (/home/tasher/Projects/meanjs_test/node_modules/connect-mongo/src/index.js:129:40)
at MongoStore.handleNewConnectionAsync (/home/tasher/Projects/meanjs_test/node_modules/connect-mongo/src/index.js:121:18)
at MongoStore (/home/tasher/Projects/meanjs_test/node_modules/connect-mongo/src/index.js:96:26)
at Object.module.exports.initSession (/home/tasher/Projects/meanjs_test/config/lib/express.js:120:12)
at Object.module.exports.init (/home/tasher/Projects/meanjs_test/config/lib/express.js:243:8)
at /home/tasher/Projects/meanjs_test/config/lib/app.js:25:23
at /home/tasher/Projects/meanjs_test/config/lib/mongoose.js:35:21
at process._tickCallback (internal/process/next_tick.js:109:7)
Unhandled rejection MongoError: not authorized on mean-dev to execute command { listIndexes: "sessions", cursor: {} }
at Function.MongoError.create (/home/tasher/Projects/meanjs_test/node_modules/mongodb-core/lib/error.js:31:11)
at queryCallback (/home/tasher/Projects/meanjs_test/node_modules/mongodb-core/lib/cursor.js:212:36)
at /home/tasher/Projects/meanjs_test/node_modules/mongodb-core/lib/connection/pool.js:469:18
at _combinedTickCallback (internal/process/next_tick.js:73:7)
at process._tickCallback (internal/process/next_tick.js:104:9)
From previous event:
at MongoStore.setAutoRemoveAsync (/home/tasher/Projects/meanjs_test/node_modules/connect-mongo/src/index.js:129:40)
at MongoStore.handleNewConnectionAsync (/home/tasher/Projects/meanjs_test/node_modules/connect-mongo/src/index.js:121:18)
at MongoStore (/home/tasher/Projects/meanjs_test/node_modules/connect-mongo/src/index.js:96:26)
at module.exports (/home/tasher/Projects/meanjs_test/config/lib/socket.io.js:73:20)
at Object.module.exports.configureSocketIO (/home/tasher/Projects/meanjs_test/config/lib/express.js:214:38)
at Object.module.exports.init (/home/tasher/Projects/meanjs_test/config/lib/express.js:258:14)
at /home/tasher/Projects/meanjs_test/config/lib/app.js:25:23
at /home/tasher/Projects/meanjs_test/config/lib/mongoose.js:35:21
at process._tickCallback (internal/process/next_tick.js:109:7)
error: uncaughtException: getaddrinfo ENOTFOUND linux-hcjz.suse date=Mon Aug 28 2017 22:46:50 GMT+0100 (WEST), pid=4497, uid=1000, gid=100, cwd=/home/tasher/Projects/meanjs_test, execPath=/usr/bin/node6, version=v6.11.1, argv=[/usr/bin/node6, /home/tasher/Projects/meanjs_test/server.js], rss=97284096, heapTotal=69029888, heapUsed=48863040, external=20182576, loadavg=[0.6513671875, 0.61669921875, 0.43505859375], uptime=3056
Error: getaddrinfo ENOTFOUND linux-hcjz.suse
at errnoException (dns.js:28:10)
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:76:26)
I have re-installed meanjs twice but in vain. Mongo is also running. By the way:
tasher#linux-hcjz:~/Projects/meanjs_test> node -v
v6.11.1
tasher#linux-hcjz:~/Projects/meanjs_test> npm6 -v
3.10.10
Any thoughts?
try adding execution permission to your mean-dev
chmod 755 path_for_package/mean-dev
replace path path_for_package with your path
I am very dummy on ElasticSearch and I have little experience with NodeJs. I have created few cruds using NodeJs + MongoDb. I have to change from MongoDb to ElasticSearch (this is mandatory). Please, I don't want to compare MOngoDb with ElasticSearch so don't try that.
I am following the example found here
https://blog.raananweber.com/2015/11/24/simple-autocomplete-with-elasticsearch-and-node-js/
I have started succesfully ElasticSearch. I can see:
nodejs express.js-elasticsearch-autocomplete-demo-master # curl --noproxy -XGET 'http://127.0.0.1:9200/?pretty'
{
"name" : "-em7X-s",
"cluster_name" : "elasticsearch",
"cluster_uuid" : "cqJUaPcFREe4wX_YyYWoFg",
"version" : {
"number" : "5.2.1",
"build_hash" : "db0d481",
"build_date" : "2017-02-09T22:05:32.386Z",
"build_snapshot" : false,
"lucene_version" : "6.4.1"
},
"tagline" : "You Know, for Search"
}
However, when I try to start the sample above or access I get the error bellow respectvely:
/dev/samples/express.js-elasticsearch-autocomplete-demo-master $ npm start
> autocompleter#0.0.0 start /home/demetrio/dev/samples/express.js-elasticsearch-autocomplete-demo-master
> node ./bin/www
Elasticsearch INFO: 2017-02-16T20:00:48Z
Adding connection to http://localhost:9200/
Unhandled rejection Error: Bad Request
at respond (/home/demetrio/dev/samples/express.js-elasticsearch-autocomplete-demo-master/node_modules/elasticsearch/src/lib/transport.js:264:15)
at checkRespForFailure (/home/demetrio/dev/samples/express.js-elasticsearch-autocomplete-demo-master/node_modules/elasticsearch/src/lib/transport.js:223:7)
at HttpConnector.<anonymous> (/home/demetrio/dev/samples/express.js-elasticsearch-autocomplete-demo-master/node_modules/elasticsearch/src/lib/connectors/http.js:155:7)
at IncomingMessage.wrapper (/home/demetrio/dev/samples/express.js-elasticsearch-autocomplete-demo-master/node_modules/lodash/index.js:3095:19)
at emitNone (events.js:72:20)
at IncomingMessage.emit (events.js:166:7)
at endReadableNT (_stream_readable.js:905:12)
at nextTickCallbackWith2Args (node.js:441:9)
at process._tickCallback (node.js:355:17)
Unhandled rejection Error: [illegal_argument_exception] request [/randomindex/_suggest] contains unrecognized parameter: [type]
at respond (/home/demetrio/dev/samples/express.js-elasticsearch-autocomplete-demo-master/node_modules/elasticsearch/src/lib/transport.js:264:15)
at checkRespForFailure (/home/demetrio/dev/samples/express.js-elasticsearch-autocomplete-demo-master/node_modules/elasticsearch/src/lib/transport.js:223:7)
at HttpConnector.<anonymous> (/home/demetrio/dev/samples/express.js-elasticsearch-autocomplete-demo-master/node_modules/elasticsearch/src/lib/connectors/http.js:155:7)
at IncomingMessage.wrapper (/home/demetrio/dev/samples/express.js-elasticsearch-autocomplete-demo-master/node_modules/lodash/index.js:3095:19)
at emitNone (events.js:72:20)
at IncomingMessage.emit (events.js:166:7)
at endReadableNT (_stream_readable.js:905:12)
at nextTickCallbackWith2Args (node.js:441:9)
at process._tickCallback (node.js:355:17)
Unhandled rejection Error: [illegal_argument_exception] request [/randomindex/_suggest] contains unrecognized parameter: [type]
at respond (/home/demetrio/dev/samples/express.js-elasticsearch-autocomplete-demo-master/node_modules/elasticsearch/src/lib/transport.js:264:15)
at checkRespForFailure (/home/demetrio/dev/samples/express.js-elasticsearch-autocomplete-demo-master/node_modules/elasticsearch/src/lib/transport.js:223:7)
at HttpConnector.<anonymous> (/home/demetrio/dev/samples/express.js-elasticsearch-autocomplete-demo-master/node_modules/elasticsearch/src/lib/connectors/http.js:155:7)
at IncomingMessage.wrapper (/home/demetrio/dev/samples/express.js-elasticsearch-autocomplete-demo-master/node_modules/lodash/index.js:3095:19)
at emitNone (events.js:72:20)
at IncomingMessage.emit (events.js:166:7)
at endReadableNT (_stream_readable.js:905:12)
at nextTickCallbackWith2Args (node.js:441:9)
at process._tickCallback (node.js:355:17)
I am very confused what to check. Any suggestion will be appreciated. My final target is to understand how to connect to ElasticSearch from NodeJs application