这是我第一次尝试使用 MongoDB。我让 Mongo 运行:
ps -ef | grep [m]ongo
mongodb 11023 1 0 Jun24 ? 00:00:03 /usr/lib/mongodb/mongod --config /etc/mongodb.conf
错误是由于做
Datastore.save( stuff ); // (pseudo code)
错误:
Jun 27, 2011 3:20:29 PM com.mongodb.DBTCPConnector fetchMaxBsonObjectSize WARNING: Exception determining maxBSON size using0 java.io.IOException: couldn't connect to [russ-elite-book/127.0.1.1:27017] bc:java.net.ConnectException: Connection refused at com.mongodb.DBPort._open(DBPort.java:206) at com.mongodb.DBPort.go(DBPort.java:94) at com.mongodb.DBPort.go(DBPort.java:75) at com.mongodb.DBPort.findOne(DBPort.java:129) at com.mongodb.DBPort.runCommand(DBPort.java:138) ...
请注意,我使用127.0.0.1:27017进行连接,它适用于 Mongo shell。另外,我在浏览器中使用http://localhost:28017
.
非常感谢任何和所有的想法!