2016-08-24 4 views
0

は私が.....解析・サーバー - 内部サーバーエラー

$ npm install -g parse-server mongodb-runner 
$ mongodb-runner start 
$ parse-server --appId APPLICATION_ID --masterKey MASTER_KEY 

を次のように私は次のコマンドを使用してアクセスしようとしたときに、NPM解析は、サーブインストール完了

$ curl -X POST -H "X-Parse-Application-Id: AppID123" -H "Content-Type: application/json" -d '{"score":1337,"playerName":"Sean Plott","cheatMode":false}' http://localhost:1337/parse/classes/GameScore 

私は、次のエラーを得た:ここ

{"code":1,"message":"Internal server error."} 

は、構文解析サーバを実行してからの結果である....

$ parse-server --appId AppID123 --masterKey Master123 

appId: AppID8Rasp 
masterKey: ***REDACTED*** 
port: 1337 
mountPath: /parse 
maxUploadSize: 20mb 
serverURL: http://localhost:1337/parse 

parse-server running on http://localhost:1337/parse 
warn: Unable to ensure uniqueness for usernames: MongoError: failed to connect to server [localhost:27017] on first connect 
    at null.<anonymous> (/usr/local/lib/node_modules/parse-server/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/server.js:311:35) 
    at emitOne (events.js:77:13) 
    at emit (events.js:169:7) 
    at null.<anonymous> (/usr/local/lib/node_modules/parse-server/node_modules/mongodb/node_modules/mongodb-core/lib/connection/pool.js:254:12) 
    at g (events.js:260:16) 
    at emitTwo (events.js:87:13) 
    at emit (events.js:172:7) 
    at Socket.<anonymous> (/usr/local/lib/node_modules/parse-server/node_modules/mongodb/node_modules/mongodb-core/lib/connection/connection.js:158:49) 
    at Socket.g (events.js:260:16) 
    at emitOne (events.js:77:13) 
warn: Unable to ensure uniqueness for user email addresses: MongoError: failed to connect to server [localhost:27017] on first connect 
    at null.<anonymous> (/usr/local/lib/node_modules/parse-server/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/server.js:311:35) 
    at emitOne (events.js:77:13) 
    at emit (events.js:169:7) 
    at null.<anonymous> (/usr/local/lib/node_modules/parse-server/node_modules/mongodb/node_modules/mongodb-core/lib/connection/pool.js:254:12) 
    at g (events.js:260:16) 
    at emitTwo (events.js:87:13) 
    at emit (events.js:172:7) 
    at Socket.<anonymous> (/usr/local/lib/node_modules/parse-server/node_modules/mongodb/node_modules/mongodb-core/lib/connection/connection.js:158:49) 
    at Socket.g (events.js:260:16) 
    at emitOne (events.js:77:13) 
error: Error generating response. { [MongoError: failed to connect to server [localhost:27017] on first connect] 
    name: 'MongoError', 
    message: 'failed to connect to server [localhost:27017] on first connect' } name=MongoError, message=failed to connect to server [localhost:27017] on first connect 
error: Uncaught internal server error. { [MongoError: failed to connect to server [localhost:27017] on first connect] 
    name: 'MongoError', 
    message: 'failed to connect to server [localhost:27017] on first connect' } MongoError: failed to connect to server [localhost:27017] on first connect 
    at null.<anonymous> (/usr/local/lib/node_modules/parse-server/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/server.js:311:35) 
    at emitOne (events.js:77:13) 
    at emit (events.js:169:7) 
    at null.<anonymous> (/usr/local/lib/node_modules/parse-server/node_modules/mongodb/node_modules/mongodb-core/lib/connection/pool.js:254:12) 
    at g (events.js:260:16) 
    at emitTwo (events.js:87:13) 
    at emit (events.js:172:7) 
    at Socket.<anonymous> (/usr/local/lib/node_modules/parse-server/node_modules/mongodb/node_modules/mongodb-core/lib/connection/connection.js:158:49) 
    at Socket.g (events.js:260:16) 
    at emitOne (events.js:77:13) 
MongoError: failed to connect to server [localhost:27017] on first connect 
    at null.<anonymous> (/usr/local/lib/node_modules/parse-server/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/server.js:311:35) 
    at emitOne (events.js:77:13) 
    at emit (events.js:169:7) 
    at null.<anonymous> (/usr/local/lib/node_modules/parse-server/node_modules/mongodb/node_modules/mongodb-core/lib/connection/pool.js:254:12) 
    at g (events.js:260:16) 
    at emitTwo (events.js:87:13) 
    at emit (events.js:172:7) 
    at Socket.<anonymous> (/usr/local/lib/node_modules/parse-server/node_modules/mongodb/node_modules/mongodb-core/lib/connection/connection.js:158:49) 
    at Socket.g (events.js:260:16) 
    at emitOne (events.js:77:13) 

確かにいくつかのポインタを使用することができます!ありがとう。

+0

エラーが、それはDBに接続するので、DBが実行されていることを確認することができないと言います。 –

+0

私はとても厚くて謝っていますが、どうすればいいですか? – hypermiler

+0

試しました。 sudoサービスの解析サーバのステータス。それは実行されていないと言う。それが実行されていない場合は、ジーゼー、何ですか? parse-serverコマンドが動作しているようです..... – hypermiler

答えて