1

我正在为 mongodb 运行 YCSB 并遵循文档。

加载数据时使用:

./bin/ycsb 加载 mongodb -s -P 工作负载/workloada > outputLoad.txt

单个文档被插入到 mongodb 中。但是得到以下与主机名和连接字符串相关的奇怪名称:

 0 sec: 0 operations; 
Found server connection string 
Found server connection string l
Found server connection string o
Found server connection string c
Found server connection string a
Found server connection string l
Found server connection string h
Found server connection string o
Found server connection string s
Found server connection string t
Found server connection string :
Found server connection string 2
Found server connection string 7
Found server connection string 0
Found server connection string 1
Found server connection string 7
 10 sec: 1 operations; 0.1 current ops/sec; [INSERT AverageLatency(us)=1106185] 
Couldn't insert key user8517097267634966620
com.mongodb.MongoTimeoutException: Timed out after 10000 ms while waiting for a server that matches AnyServerSelector{}. Client view of cluster state is {type=Unknown, servers=[{address=l:27017, type=Unknown, state=Connecting, exception={com.mongodb.MongoException$Network: Exception opening the socket}, caused by {java.net.UnknownHostException: l: Name or service not known}}]
    at com.mongodb.BaseCluster.getServer(BaseCluster.java:82)
    at com.mongodb.DBTCPConnector.getServer(DBTCPConnector.java:656)
    at com.mongodb.DBTCPConnector.access$500(DBTCPConnector.java:40)
    at com.mongodb.DBTCPConnector$MyPort.getConnection(DBTCPConnector.java:505)
    at com.mongodb.DBTCPConnector$MyPort.get(DBTCPConnector.java:448)
    at com.mongodb.DBTCPConnector.getPrimaryPort(DBTCPConnector.java:407)
    at com.mongodb.DBCollectionImpl.insert(DBCollectionImpl.java:184)
    at com.mongodb.DBCollectionImpl.insert(DBCollectionImpl.java:167)
    at com.mongodb.DBCollection.insert(DBCollection.java:93)
    at com.mongodb.DBCollection.insert(DBCollection.java:78)
    at com.mongodb.DBCollection.insert(DBCollection.java:120)
    at com.yahoo.ycsb.db.MongoDbClient.insert(MongoDbClient.java:254)
    at com.yahoo.ycsb.DBWrapper.insert(DBWrapper.java:148)
    at com.yahoo.ycsb.workloads.CoreWorkload.doInsert(CoreWorkload.java:461)
    at com.yahoo.ycsb.ClientThread.run(Client.java:269)
 11 sec: 1 operations; 0 current ops/sec; [INSERT AverageLatency(us)=10005522] [CLEANUP AverageLatency(us)=10127]

另外,我在堆栈跟踪中看到l: Name or service not known其中l似乎是从localhost中提取的。

我试图找到一个问题,但这个代码测试对我不起作用。

有人可以找到连接字符串的问题吗?mongodb服务器正常运行。出现问题时,mongo 日志中没有记录错误。我用 bind_ip:0.0.0.0 和localhost的不同主机名对其进行了测试。

Mongodb 版本 3.0.4、mmapv1、Apache Maven 3.0.5。

4

0 回答 0