KeyStoneJS hängt nach dem Start, d. H. Es tut nichts. Es ist nicht druckt „KeyStone gestartet Port keine xxxx“ esKeyStoneJs hängt nach dem Start auf Redat7.1
Environment :- Redhat 7.1
NodeJs version :- v7.2.0
MongoDB community verion :- 3.2
So ist nicht, dass ich nicht alles, was es hat debuggen. Um mehr Einsicht zu bekommen, habe ich Debug-Logs für keystoneJS aktiviert.
ist hier Ausgabe des Befehls: - DEBUG = keystone: * Knoten 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) Sehr erste, was in den Sinn kam, ist MongoDB nicht gestartet oder arbeiten, sondern präzise mongodb ist gestartet & funktioniert.
2) Ich habe Robomongo installiert, um zu sehen, ob meine lokale Datenbank verbunden werden kann. Und ich kann meine Datenbank sehen
3) Da dies SELinux ist, habe ich die Schritte zu in/etc/selinux/config SELINUX = deaktiviert. Und mein System neu gestartet. Hier wird ausgegeben, sobald ich meinen Mongod gestartet habe.
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)
Jede Hilfe zum Debuggen weiterer oder Vorschläge zu beheben scheint nicht zu funktionieren.
Ich schrieb diesen Mungo-Code, aber es tut nichts, nichts wird getan. var mongoose = verlangen ('mongoose'); mongoose.connect ('mongodb: // localhost/test); var db = mongoose.connection; db.on ('Fehler', console.error.bind (Konsole, 'Verbindungsfehler:')); db.once ('open', Funktionsrückruf() { console.log ("h"); }); exports.test = funktion (req, res) { res.render ('test'); }; ~ –
Keine Ausgabe von oben kommentiert es bleibt auf die Verbindung warten –
Probleme gibt es mit Mongoose. Auf meinem Rechner kann Mongoose keine Verbindung zu MongoDB herstellen, was zu Problemen führt. Raised Problem in Mongoose noch keine Antwort. Aber das Problem ist eingegrenzt. Danke für die Hilfe. –