部署时出现MongoDB问题



我对MongoDB还很陌生:我在mac上运行的应用程序在ubuntu上部署得不好。

我有一个非常基本的程序,它获取一个JSon文件并将其转储到MongoDB数据库中。MongoDB数据库位于名为db的远程Ubuntu服务器上。

该程序在我的Mac上运行良好,在Eclipse和命令行中运行良好。

当我在基于Ubuntu的应用服务器(不同于数据库服务器)上部署它时,我得到:

[cluster-ClusterId{value='572387cf96720e25144dce5b', description='null'}-db:27017] INFO org.mongodb.driver.cluster - Exception in monitor thread while connecting to server db:27017
com.mongodb.MongoInterruptedException: Interrupted acquiring a permit to retrieve an item from the pool

应用服务器可以ping数据库服务器。

认为这是因为我的应用程序试图将null对象保存为文档。。。

最新更新