- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
这个错误是什么意思?
$ pm2 logs
[TAILING] Tailing last 15 lines for [all] processes (change the value with --lines option)
/home/tealou/.pm2/pm2.log last 15 lines:
PM2 | 2017-03-29 07:25:45: App [www] with id [0] and pid [29444], exited with code [1] via signal [SIGINT]
PM2 | 2017-03-29 07:25:45: Starting execution sequence in -fork mode- for app name:www id:0
PM2 | 2017-03-29 07:25:45: App name:www id:0 online
PM2 | 2017-03-29 07:25:46: App [www] with id [0] and pid [29460], exited with code [1] via signal [SIGINT]
PM2 | 2017-03-29 07:25:46: Starting execution sequence in -fork mode- for app name:www id:0
PM2 | 2017-03-29 07:25:46: App name:www id:0 online
PM2 | 2017-03-29 07:25:47: App [www] with id [0] and pid [29477], exited with code [1] via signal [SIGINT]
PM2 | 2017-03-29 07:25:47: Starting execution sequence in -fork mode- for app name:www id:0
PM2 | 2017-03-29 07:25:47: App name:www id:0 online
PM2 | 2017-03-29 07:25:48: App [www] with id [0] and pid [29487], exited with code [1] via signal [SIGINT]
PM2 | 2017-03-29 07:25:48: Starting execution sequence in -fork mode- for app name:www id:0
PM2 | 2017-03-29 07:25:48: App name:www id:0 online
PM2 | 2017-03-29 07:25:49: App [www] with id [0] and pid [29497], exited with code [1] via signal [SIGINT]
PM2 | 2017-03-29 07:25:49: Starting execution sequence in -fork mode- for app name:www id:0
PM2 | 2017-03-29 07:25:49: App name:www id:0 online
/home/tealou/.pm2/logs/www-out-0.log last 15 lines:
0|www | POST /input/XnCuYLP72jGwMt25bPVuuM81uq2 200 233.304 ms - 9
0|www | Successfully connected to mongodb
0|www | POST /input/2psLUE6VB7tEdC0sACCl8Yn1oC6 200 133.400 ms - 9
0|www | Successfully connected to mongodb
0|www | POST /input/2IcNjH69dLyMhrCSi0voaM5OLW8 200 87.776 ms - 9
0|www | Successfully connected to mongodb
0|www | POST /input/lJOVksaP8LMhgOl8XOCofV6ZeZZ 200 117.275 ms - 9
0|www | POST /input/YbJriPtV1FZWUDwgZq46zFqL7BC 200 147.066 ms - 9
0|www | Successfully connected to mongodb
0|www | POST /input/lb8BbtOobixWcfI4dItIaS0U2KZ 200 196.825 ms - 9
0|www | POST /input/97PWLQquQIFxTgpSLZa4rgvXSLR 200 42.662 ms - 9
0|www | POST /input/G4ZrX1Wz88Kx1gcDBN8bw4exi3M 200 127.855 ms - 9
0|www | Successfully connected to mongodb
0|www | POST /input/D2wBHNc4BX19tDkGqXfD8ClY6E0 200 126.571 ms - 9
0|www | Successfully connected to mongodb
/home/tealou/.pm2/logs/www-error-0.log last 15 lines:
0|www | MongoError: failed to connect to server [localhost:27017] on first connect [MongoError: connect ECONNREFUSED 127.0.0.1:27017]
0|www | at .<anonymous> (/usr/local/chroot/project-1/node_modules/mongodb-core/lib/topologies/server.js:327:35)
0|www | at emitOne (events.js:96:13)
0|www | at emit (events.js:188:7)
0|www | at .<anonymous> (/usr/local/chroot/project-1/node_modules/mongodb-core/lib/connection/pool.js:274:12)
0|www | at g (events.js:286:16)
0|www | at emitTwo (events.js:106:13)
0|www | at emit (events.js:191:7)
0|www | at Socket.<anonymous> (/usr/local/chroot/project-1/node_modules/mongodb-core/lib/connection/connection.js:177:49)
0|www | at Socket.g (events.js:286:16)
0|www | at emitOne (events.js:96:13)
0|www | at Socket.emit (events.js:188:7)
0|www | at emitErrorNT (net.js:1272:8)
0|www | at _combinedTickCallback (internal/process/next_tick.js:74:11)
0|www | at process._tickDomainCallback (internal/process/next_tick.js:122:9)
[STREAMING] Now streaming realtime logs for [all] processes
0|www | MongoError: failed to connect to server [localhost:27017] on first connect [MongoError: connect ECONNREFUSED 127.0.0.1:27017]
0|www | at .<anonymous> (/usr/local/chroot/project-1/node_modules/mongodb-core/lib/topologies/server.js:327:35)
0|www | at emitOne (events.js:96:13)
0|www | at emit (events.js:188:7)
0|www | at .<anonymous> (/usr/local/chroot/project-1/node_modules/mongodb-core/lib/connection/pool.js:274:12)
0|www | at g (events.js:286:16)
0|www | at emitTwo (events.js:106:13)
0|www | at emit (events.js:191:7)
0|www | at Socket.<anonymous> (/usr/local/chroot/project-1/node_modules/mongodb-core/lib/connection/connection.js:177:49)
0|www | at Socket.g (events.js:286:16)
0|www | at emitOne (events.js:96:13)
0|www | at Socket.emit (events.js:188:7)
0|www | at emitErrorNT (net.js:1272:8)
0|www | at _combinedTickCallback (internal/process/next_tick.js:74:11)
0|www | at process._tickDomainCallback (internal/process/next_tick.js:122:9)
PM2 | App [www] with id [0] and pid [29513], exited with code [1] via signal [SIGINT]
PM2 | Starting execution sequence in -fork mode- for app name:www id:0
PM2 | App name:www id:0 online
0|www | MongoError: failed to connect to server [localhost:27017] on first connect [MongoError: connect ECONNREFUSED 127.0.0.1:27017]
0|www | at .<anonymous> (/usr/local/chroot/project-1/node_modules/mongodb-core/lib/topologies/server.js:327:35)
0|www | at emitOne (events.js:96:13)
0|www | at emit (events.js:188:7)
0|www | at .<anonymous> (/usr/local/chroot/project-1/node_modules/mongodb-core/lib/connection/pool.js:274:12)
0|www | at g (events.js:286:16)
0|www | at emitTwo (events.js:106:13)
0|www | at emit (events.js:191:7)
0|www | at Socket.<anonymous> (/usr/local/chroot/project-1/node_modules/mongodb-core/lib/connection/connection.js:177:49)
0|www | at Socket.g (events.js:286:16)
0|www | at emitOne (events.js:96:13)
0|www | at Socket.emit (events.js:188:7)
0|www | at emitErrorNT (net.js:1272:8)
0|www | at _combinedTickCallback (internal/process/next_tick.js:74:11)
0|www | at process._tickDomainCallback (internal/process/next_tick.js:122:9)
PM2 | App [www] with id [0] and pid [29527], exited with code [1] via signal [SIGINT]
PM2 | Starting execution sequence in -fork mode- for app name:www id:0
PM2 | App name:www id:0 online
0|www | MongoError: failed to connect to server [localhost:27017] on first connect [MongoError: connect ECONNREFUSED 127.0.0.1:27017]
0|www | at .<anonymous> (/usr/local/chroot/project-1/node_modules/mongodb-core/lib/topologies/server.js:327:35)
0|www | at emitOne (events.js:96:13)
0|www | at emit (events.js:188:7)
0|www | at .<anonymous> (/usr/local/chroot/project-1/node_modules/mongodb-core/lib/connection/pool.js:274:12)
0|www | at g (events.js:286:16)
0|www | at emitTwo (events.js:106:13)
0|www | at emit (events.js:191:7)
0|www | at Socket.<anonymous> (/usr/local/chroot/project-1/node_modules/mongodb-core/lib/connection/connection.js:177:49)
0|www | at Socket.g (events.js:286:16)
0|www | at emitOne (events.js:96:13)
0|www | at Socket.emit (events.js:188:7)
0|www | at emitErrorNT (net.js:1272:8)
0|www | at _combinedTickCallback (internal/process/next_tick.js:74:11)
0|www | at process._tickDomainCallback (internal/process/next_tick.js:122:9)
PM2 | App [www] with id [0] and pid [29544], exited with code [1] via signal [SIGINT]
PM2 | Starting execution sequence in -fork mode- for app name:www id:0
PM2 | App name:www id:0 online
0|www | MongoError: failed to connect to server [localhost:27017] on first connect [MongoError: connect ECONNREFUSED 127.0.0.1:27017]
0|www | at .<anonymous> (/usr/local/chroot/project-1/node_modules/mongodb-core/lib/topologies/server.js:327:35)
0|www | at emitOne (events.js:96:13)
0|www | at emit (events.js:188:7)
0|www | at .<anonymous> (/usr/local/chroot/project-1/node_modules/mongodb-core/lib/connection/pool.js:274:12)
0|www | at g (events.js:286:16)
0|www | at emitTwo (events.js:106:13)
0|www | at emit (events.js:191:7)
0|www | at Socket.<anonymous> (/usr/local/chroot/project-1/node_modules/mongodb-core/lib/connection/connection.js:177:49)
0|www | at Socket.g (events.js:286:16)
0|www | at emitOne (events.js:96:13)
0|www | at Socket.emit (events.js:188:7)
0|www | at emitErrorNT (net.js:1272:8)
0|www | at _combinedTickCallback (internal/process/next_tick.js:74:11)
0|www | at process._tickDomainCallback (internal/process/next_tick.js:122:9)
PM2 | App [www] with id [0] and pid [29554], exited with code [1] via signal [SIGINT]
PM2 | Starting execution sequence in -fork mode- for app name:www id:0
PM2 | App name:www id:0 online
0|www | MongoError: failed to connect to server [localhost:27017] on first connect [MongoError: connect ECONNREFUSED 127.0.0.1:27017]
0|www | at .<anonymous> (/usr/local/chroot/project-1/node_modules/mongodb-core/lib/topologies/server.js:327:35)
0|www | at emitOne (events.js:96:13)
0|www | at emit (events.js:188:7)
0|www | at .<anonymous> (/usr/local/chroot/project-1/node_modules/mongodb-core/lib/connection/pool.js:274:12)
0|www | at g (events.js:286:16)
0|www | at emitTwo (events.js:106:13)
0|www | at emit (events.js:191:7)
0|www | at Socket.<anonymous> (/usr/local/chroot/project-1/node_modules/mongodb-core/lib/connection/connection.js:177:49)
0|www | at Socket.g (events.js:286:16)
0|www | at emitOne (events.js:96:13)
0|www | at Socket.emit (events.js:188:7)
0|www | at emitErrorNT (net.js:1272:8)
0|www | at _combinedTickCallback (internal/process/next_tick.js:74:11)
0|www | at process._tickDomainCallback (internal/process/next_tick.js:122:9)
PM2 | App [www] with id [0] and pid [29564], exited with code [1] via signal [SIGINT]
PM2 | Starting execution sequence in -fork mode- for app name:www id:0
PM2 | App name:www id:0 online
在我的本地主机上一切正常,但在我的生产服务器上却崩溃了。
有什么想法吗?
编辑:
$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 23G 23G 43M 100% /
devtmpfs 7.9G 0 7.9G 0% /dev
tmpfs 7.EDIT:9G 0 7.9G 0% /dev/shm
tmpfs 7.9G 1.5M 7.9G 1% /run
tmpfs 7.9G 0 7.9G 0% /sys/fs/cgroup
tmpfs 1.6G 0 1.6G 0% /run/user/1002
编辑2:
$ mongo
MongoDB shell version: 3.2.6
connecting to: test
2017-03-29T07:21:59.231+0100 W NETWORK [thread1] Failed to connect to 127.0.0.1:27017, reason: errno:111 Connection refused
2017-03-29T07:21:59.237+0100 E QUERY [thread1] Error: couldn't connect to server 127.0.0.1:27017, connection attempt failed :
connect@src/mongo/shell/mongo.js:229:14
@(connect):1:6
exception: connect failed
编辑3:
$ pm2 logs
[TAILING] Tailing last 15 lines for [all] processes (change the value with --lines option)
/home/tealou/.pm2/pm2.log last 15 lines:
PM2 | 2017-03-29 07:29:48: Time : Wed Mar 29 2017 07:29:48 GMT+0100 (BST)
PM2 | 2017-03-29 07:29:48: PM2 version : 2.4.2
PM2 | 2017-03-29 07:29:48: Node.js version : 6.2.2
PM2 | 2017-03-29 07:29:48: Current arch : x64
PM2 | 2017-03-29 07:29:48: PM2 home : /home/citizensense/.pm2
PM2 | 2017-03-29 07:29:48: PM2 PID file : /home/tealou/.pm2/pm2.pid
PM2 | 2017-03-29 07:29:48: RPC socket file : /home/tealou/.pm2/rpc.sock
PM2 | 2017-03-29 07:29:48: BUS socket file : /home/tealou/.pm2/pub.sock
PM2 | 2017-03-29 07:29:48: Application log path : /home/tealou/.pm2/logs
PM2 | 2017-03-29 07:29:48: Process dump file : /home/tealou/.pm2/dump.pm2
PM2 | 2017-03-29 07:29:48: Concurrent actions : 2
PM2 | 2017-03-29 07:29:48: SIGTERM timeout : 1600
PM2 | 2017-03-29 07:29:48: ===============================================================================
PM2 | 2017-03-29 07:29:49: Starting execution sequence in -fork mode- for app name:www id:0
PM2 | 2017-03-29 07:29:49: App name:www id:0 online
/home/tealou/.pm2/logs/www-error-0.log last 15 lines:
0|www | MongoError: failed to connect to server [localhost:27017] on first connect [MongoError: connect ECONNREFUSED 127.0.0.1:27017]
0|www | at .<anonymous> (/usr/local/chroot/project-1/node_modules/mongodb-core/lib/topologies/server.js:327:35)
0|www | at emitOne (events.js:96:13)
0|www | at emit (events.js:188:7)
0|www | at .<anonymous> (/usr/local/chroot/project-1/node_modules/mongodb-core/lib/connection/pool.js:274:12)
0|www | at g (events.js:286:16)
0|www | at emitTwo (events.js:106:13)
0|www | at emit (events.js:191:7)
0|www | at Socket.<anonymous> (/usr/local/chroot/project-1/node_modules/mongodb-core/lib/connection/connection.js:177:49)
0|www | at Socket.g (events.js:286:16)
0|www | at emitOne (events.js:96:13)
0|www | at Socket.emit (events.js:188:7)
0|www | at emitErrorNT (net.js:1272:8)
0|www | at _combinedTickCallback (internal/process/next_tick.js:74:11)
0|www | at process._tickDomainCallback (internal/process/next_tick.js:122:9)
编辑4:
$ pm2 logs
[PM2] Spawning PM2 daemon with pm2_home=/home/tealou/.pm2
这是什么!?
最佳答案
仅从端口号(27017)(MongoDB 的默认端口)来看,您似乎无法连接到服务器上的 MongoDB。试试installing it并确保它在端口 27017 上运行。
关于javascript - NodeJS Express JS - MongoError : failed to connect to server,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43085397/
我的问题是关于 mongo 未连接到服务器?为什么它说在第一次连接时无法连接到服务器 [localhost:27017] [MongoError: connect ECONNREFUSED 127.0
我有一个新安装的 MongoDB 服务器在 AWS Ubuntu EC2 上运行。 服务器上没有安装其他任何东西。 该数据库当前包含 35 个文档,每个文档大小为 3 MB,这意味着不到 110 MB
我有我的docker-compose业务流程,但出现此错误: connection error: { MongoError: failed to connect to server [172.17.0
我们最近升级到了 Play 2.7.0,并使用 play2-reactivemongo 版本 0.16.2 和reactivemongo 0.16.3。我们使用reactivemongo-shaded
我第一次使用 Mongoose 事务。按照文档和一些文章,我能够使用 让它运行起来。运行-rs 对于本地副本。但是,我遇到了两个问题, 即使事务反射(reflect)在副本集上, Mongoose 总
问题是,我的控制台出现错误: { [MongoError: $regex has to be a string] name: 'MongoError', message: '$regex ha
我正在尝试将 node.js 应用程序连接到具有副本集的 MongoDB,但是在执行任何写入操作时它会引发错误。 它抛出 MongoError: not master。 它尝试在辅助 mongo 实例
我正在尝试从数组中获取数据,并希望将其传递给 $in 运算符内的查找查询。但它给出了一个错误说 $in needs an array const fileIds = _.get(result, 'fi
我正在为 NodeJS 使用 MongoDb 驱动程序。 我在使用聚合时遇到问题。错误是 {"name":"MongoError","message":"unknown group operator
当我试图将太大的数据推送到 mongoDb 时,我收到此错误:MongoError: document is larger than the maximum size 16777216 我知道,这是正
当我这样做时: return scores.updateQ({_id:score._id}, { $set:{"partId":partId,"activityId":activityId},
我有 2 个应用程序服务器,它们连接到一个副本集(主要、次要和仲裁者)。 我面临的问题是 [ 'MongoError: no primary found in replicaset', '
我正在创建一个使用 Mongoose 与 MongoDb 交互的简单应用程序,独特的验证错误处理一直困扰着我。 UserSchema = new Schema({
我正在构建一个 REST API,但每次加载我的网站时,我都会收到 MongoError:拓扑已损坏。有人可以帮我解决这个问题吗?我感觉异步运行有问题。 const client = new Mong
我使用的是 Mongoose 5.1.5 版,Mongodb 3.0.10 版当我使用 mongoose Model.geoSearch 方法时,它给我一个错误,说 MongoError: No ge
当我尝试连接 node.js 应用程序时,我得到: MongoError: connection 0 to 127.0.0.1:27017 closed var MongoClient = requi
我正在研究 Node.js,我找不到任何解决方案。我的控制台向我发送了很多消息,其中一条更特别奇怪:GET/signup - - ms - -有人对此有任何想法吗?提前致谢! ////////////
在 Heroku 上运行应用程序时,将 Parse-Server 与 mLab 结合使用,我在日志中收到以下错误: app[web.1]: /app/node_modules/parse-server
我在尝试连接 mongoDB 时不断收到错误消息。我知道有很多问题与此类似,我已经检查了所有问题,但没有找到解决我的问题的方法。 这是确切的错误: 连接错误:{ MongoError: connect
我升级了我的 Mongoose ,所以我当然开始得到这些: DeprecationWarning: Mongoose: mpromise (mongoose's default promise lib
我是一名优秀的程序员,十分优秀!