在Redat7.1上启动后,KeyStoneJs挂起

时间:2016-12-08 16:17:03

标签: node.js mongodb mongoose keystonejs

KeyStoneJS在启动后挂起,即它没有做任何事情。它没有打印" KeyStone启动端口没有xxxx"

Environment :- Redhat 7.1
NodeJs version :- v7.2.0
MongoDB community verion :- 3.2 

所以我并没有调试任何东西。为了获得更多信息,我启用了keystoneJS的调试日志。

这是命令的输出: -      DEBUG = keystone:* node keystone.js

keystone:core:mount mount exported  +0ms
  keystone:core:init initializing app +1s
  keystone:core:options settings options +1ms
  keystone:core:options setting session for auth +1ms
{ Error: Cannot find module '../build/Release/bson'
at Function.Module._resolveFilename (module.js:470:15)
at Function.Module._load (module.js:418:25)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Object.<anonymous> ~/node_modules/keystone/node_modules/bson/ext/index.js:15:10)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (~/node_modules/keystone/node_modules/bson/lib/bson/index.js:3:24)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (~/CEC/node_modules/keystone/node_modules/mongodb/lib/mongodb/index.js:2:22)
    at Module._compile (module.js:571:32) code: 'MODULE_NOT_FOUND' }
js-bson: Failed to load c++ bson extension, using pure JS version
  keystone:core:importer importing  ./views +232ms
  keystone:core:importer recur +1ms
  keystone:core:importer importing  ./views/admin +0ms
  keystone:core:importer recur +0ms
  keystone:core:importer recur +0ms
  keystone:core:importer recur +0ms
  keystone:core:importer recur +1ms
  keystone:core:importer recur +0ms
  keystone:core:importer recur +1ms
  keystone:core:importer recur +0ms
  keystone:core:importer recur +0ms
  keystone:core:importer recur +34ms
  keystone:core:importer recur +19ms
  keystone:core:importer recur +17ms
  keystone:core:importer recur +188ms
  keystone:core:options setting nav +0ms
  keystone:core:initNav init nav +1ms
  keystone:core:start mount the express app +25ms
  keystone:core:mount mounting +2ms
  keystone:core:mount setting DB URI to : mongodb://localhost/test +0ms
  keystone:core:mount using mongo for session store +0ms
  keystone:core:mount adding request logger +80ms
  keystone:core:mount adding file limit +1ms
  keystone:core:mount enabling frame guard +16ms
  keystone:core:mount adding keystone routes to express app +0ms
  keystone:core:routes setting keystone Admin Route +4ms
configuring app routes
  keystone:core:mount connecting to mongo +26ms

1)首先想到的是MongoDB没有启动或工作,但精确的mongodb启动&amp;工作。

2)我安装了Robomongo以查看我的本地数据库是否可以连接。我能够看到我的数据库

3)由于这是SELinux,我已经按照/ etc / selinux / config SELINUX = disabled的步骤进行操作。并重新启动我的系统。 我启动我的mongod后立即输出。

2016-12-08T11:07:11.832-0500 I CONTROL  [initandlisten] MongoDB starting : pid=21353 port=27017 dbpath=/data/db 64-bit host=pbany1gc.ott.ciena.com
2016-12-08T11:07:11.832-0500 I CONTROL  [initandlisten] db version v3.2.11
2016-12-08T11:07:11.832-0500 I CONTROL  [initandlisten] git version: 009580ad490190ba33d1c6253ebd8d91808923e4
2016-12-08T11:07:11.832-0500 I CONTROL  [initandlisten] OpenSSL version: OpenSSL 1.0.1e-fips 11 Feb 2013
2016-12-08T11:07:11.832-0500 I CONTROL  [initandlisten] allocator: tcmalloc
2016-12-08T11:07:11.832-0500 I CONTROL  [initandlisten] modules: none
2016-12-08T11:07:11.832-0500 I CONTROL  [initandlisten] build environment:
2016-12-08T11:07:11.832-0500 I CONTROL  [initandlisten]     distmod: rhel70
2016-12-08T11:07:11.832-0500 I CONTROL  [initandlisten]     distarch: x86_64
2016-12-08T11:07:11.832-0500 I CONTROL  [initandlisten]     target_arch: x86_64
2016-12-08T11:07:11.832-0500 I CONTROL  [initandlisten] options: {}
2016-12-08T11:07:11.866-0500 I -        [initandlisten] Detected data files in /data/db created by the 'wiredTiger' storage engine, so setting the active storage engine to 'wiredTiger'.
2016-12-08T11:07:11.866-0500 I STORAGE  [initandlisten] wiredtiger_open config: create,cache_size=36G,session_max=20000,eviction=(threads_max=4),config_base=false,statistics=(fast),log=(enabled=true,archive=true,path=journal,compressor=snappy),file_manager=(close_idle_time=100000),checkpoint=(wait=60,log_size=2GB),statistics_log=(wait=0),
2016-12-08T11:07:12.023-0500 I CONTROL  [initandlisten] ** WARNING: You are running this process as the root user, which is not recommended.
2016-12-08T11:07:12.023-0500 I CONTROL  [initandlisten] 
2016-12-08T11:07:12.023-0500 I CONTROL  [initandlisten] 
2016-12-08T11:07:12.023-0500 I CONTROL  [initandlisten] ** WARNING: You are running on a NUMA machine.
2016-12-08T11:07:12.023-0500 I CONTROL  [initandlisten] **          We suggest launching mongod like this to avoid performance problems:
2016-12-08T11:07:12.023-0500 I CONTROL  [initandlisten] **              numactl --interleave=all mongod [other options]
2016-12-08T11:07:12.023-0500 I CONTROL  [initandlisten] 
2016-12-08T11:07:12.023-0500 I CONTROL  [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/enabled is 'always'.
2016-12-08T11:07:12.023-0500 I CONTROL  [initandlisten] **        We suggest setting it to 'never'
2016-12-08T11:07:12.023-0500 I CONTROL  [initandlisten] 
2016-12-08T11:07:12.023-0500 I CONTROL  [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/defrag is 'always'.
2016-12-08T11:07:12.023-0500 I CONTROL  [initandlisten] **        We suggest setting it to 'never'
2016-12-08T11:07:12.023-0500 I CONTROL  [initandlisten] 
2016-12-08T11:07:12.024-0500 I FTDC     [initandlisten] Initializing full-time diagnostic data capture with directory '/data/db/diagnostic.data'
2016-12-08T11:07:12.024-0500 I NETWORK  [HostnameCanonicalizationWorker] Starting hostname canonicalization worker
2016-12-08T11:07:12.025-0500 I NETWORK  [initandlisten] waiting for connections on port 27017
2016-12-08T11:07:34.616-0500 I NETWORK  [initandlisten] connection accepted from 127.0.0.1:48696 #1 (1 connection now open)
2016-12-08T11:07:34.618-0500 I NETWORK  [initandlisten] connection accepted from 127.0.0.1:48697 #2 (2 connections now open)
2016-12-08T11:07:34.620-0500 I NETWORK  [initandlisten] connection accepted from 127.0.0.1:48698 #3 (3 connections now open)
2016-12-08T11:07:34.629-0500 I NETWORK  [conn2] end connection 127.0.0.1:48697 (2 connections now open)
2016-12-08T11:07:34.633-0500 I NETWORK  [initandlisten] connection accepted from 127.0.0.1:48699 #4 (3 connections now open)
2016-12-08T11:07:34.656-0500 I NETWORK  [initandlisten] connection accepted from 127.0.0.1:48700 #5 (4 connections now open)
2016-12-08T11:07:34.656-0500 I NETWORK  [initandlisten] connection accepted from 127.0.0.1:48701 #6 (5 connections now open)
2016-12-08T11:07:34.656-0500 I NETWORK  [initandlisten] connection accepted from 127.0.0.1:48702 #7 (6 connections now open)
2016-12-08T11:07:34.657-0500 I NETWORK  [initandlisten] connection accepted from 127.0.0.1:48703 #8 (7 connections now open)
2016-12-08T11:07:34.657-0500 I NETWORK  [initandlisten] connection accepted from 127.0.0.1:48704 #9 (8 connections now open)
2016-12-08T11:07:34.657-0500 I NETWORK  [initandlisten] connection accepted from 127.0.0.1:48705 #10 (9 connections now open)
2016-12-08T11:07:34.657-0500 I NETWORK  [initandlisten] connection accepted from 127.0.0.1:48706 #11 (10 connections now open)

任何进一步调试的帮助或任何修复建议似乎都不起作用。

1 个答案:

答案 0 :(得分:0)

  1. 与猫鼬有问题。 在我的机器上,Mongoose无法连接到导致问题的MongoDB。 在Mongoose提出的问题还没有回复。但问题正在缩小。