2014-10-05 3 views
1

Openshift에서 간단한 MongoDB 및 Node.js 응용 프로그램을 배포 할 때 503 오류가 발생합니다. 여기OpenShift에서 MongoDB 명령이 거부되었습니다.

note: noprealloc may hurt performance in many applications 
Sat Oct 4 21:33:07.177 [initandlisten] MongoDB starting : pid=216116 port=27017 dbpath=/var/lib/openshift/54307ba35973caa3d100078c/mongodb/data/ 64-bit host=ex-std-node240.prod.rhcloud.com 
Sat Oct 4 21:33:07.194 [initandlisten] db version v2.4.9 
Sat Oct 4 21:33:07.194 [initandlisten] git version: nogitversion 
Sat Oct 4 21:33:07.194 [initandlisten] build info: Linux x86-025.build.eng.bos.redhat.com 2.6.32-431.5.1.el6.x86_64 #1 SMP Fri Jan 10 14:46:43 EST 2014 x86_64 BOOST_LIB_VERSION=1_41 
Sat Oct 4 21:33:07.194 [initandlisten] allocator: tcmalloc 
Sat Oct 4 21:33:07.195 [initandlisten] options: { auth: true, bind_ip: "127.13.135.2", command: [ "run" ], config: "/var/lib/openshift/54307ba35973caa3d100078c/mongodb//conf/mongodb.conf", dbpath: "/var/lib/openshift/54307ba35973caa3d100078c/mongodb/data/", nohttpinterface: "true", noprealloc: "true", pidfilepath: "/var/lib/openshift/54307ba35973caa3d100078c/mongodb/pid/mongodb.pid", quiet: "true", smallfiles: "true" } 
Sat Oct 4 21:33:07.301 [initandlisten] journal dir=/var/lib/openshift/54307ba35973caa3d100078c/mongodb/data/journal 
Sat Oct 4 21:33:07.301 [initandlisten] recover : no journal files present, no recovery needed 
Sat Oct 4 21:33:07.468 [initandlisten] waiting for connections on port 27017 
Sat Oct 4 21:33:08.621 [conn1] command denied: { replSetGetStatus: 1.0, forShell: 1.0 } 

를 MongoDB의 연결에 대한 server.js 파일의 일부입니다 http://photoed-sking.rhcloud.com/

는 MongoDB.log는 읽습니다. 나에게 오류를 해결할 수 있도록 고급의

https://github.com/steven-king/photoed-server/blob/master/server.js#L12-L28

감사합니다.

답변

0

연결 문자열은 (어떤 이유로) 그런 식으로 작동하지 않습니다를 다시 시작합니다. 이 같은 내 연결 문자열을 만들고 그것을 작동 :

https://github.com/thesteve0/fluentwebmap/blob/master/server.js

난 당신이 선 (18) & (19)을 무시할 수 있다고 생각하지만 난 잠시 동안의 코드를 건드리지 않았다.

라인 130 - 139는 인증 방법을 보여줍니다.

+0

위대한 Theteveve. 이것은 효과가 있었다. 귀하의 도움과 출처에 대한 링크에 감사드립니다. –

0

mongod --repair을 실행 해, 다음 과정

+0

감사합니다. db에는 문제가 없었습니다. 방금 서버와 데이터베이스간에 연결 문제가있었습니다. –

관련 문제