2016-08-24 7 views
0

나는 .....구문 분석 - 서버 - 내부 서버 오류

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

을 다음과 같이 나는 다음과 명령에 액세스하려고 할 때 고궁 박물원 구문 분석이-봉사 설치 완료

$ 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

답변