2013-12-13 07:31:39 +0900 [warn]: temporarily failed to flush the buffer. next_retry=2013-12-13 07:30:27 +0900 error_class="Mongo::OperationFailure" error="16460: error inserting 1 documents to shard rs1:shard1/xx:27020 at version 326|351||52394cc53b3817ecb1e07c15 :: caused by :: could not get last error from a shard shard1/xx :: caused by :: DBClientBase::findN: transport error: xx ns: admin.$cmd query: { getLastError: 1 }" instance=23456316641420
2013-12-13 07:31:39 +0900 [warn]: temporarily failed to flush the buffer. next_retry=2013-12-13 07:30:29 +0900 error_class="Mongo::OperationFailure" error="16460: error inserting 23 documents to shard rs2:shard2/xx at version 326|351||52394cc53b3817ecb1e07c15 :: caused by :: E11000 duplicate key error index: kome.actionlog.$_id_ dup key: { : \"5426d722-4dee-47c9-9ee2-d172cbb9a1bd\" }" instance=23456316641420
2013-12-13 07:31:39 +0900 [warn]: temporarily failed to flush the buffer. next_retry=2013-12-13 07:30:33 +0900 error_class="Mongo::OperationFailure" error="16460: error inserting 23 documents to shard rs2:shard2/xx at version 326|351||52394cc53b3817ecb1e07c15 :: caused by :: E11000 duplicate key error index: kome.actionlog.$_id_ dup key: { : \"5426d722-4dee-47c9-9ee2-d172cbb9a1bd\" }" instance=23456316641420
--
You received this message because you are subscribed to the Google Groups "Fluentd Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fluentd+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
This is a trade-off of NoSQL which doesn't have a transaction.
One possible solution is putting <secondary> in mongo <match> section.
Fri Dec 13 07:31:20.309 [ReplicaSetMonitorWatcher] Socket recv() timeout xxx:27020
Fri Dec 13 07:31:20.343 [ReplicaSetMonitorWatcher] SocketException: remote: xxx:27020 error: 9001 socket exception [3] server [xxx:27020]
Fri Dec 13 07:31:20.343 [ReplicaSetMonitorWatcher] DBClientCursor::init call() failed
Fri Dec 13 07:31:20.415 [ReplicaSetMonitorWatcher] Detected bad connection created at 1384144984486429 microSec, clearing pool for secondary01:27020
Fri Dec 13 07:31:25.417 [ReplicaSetMonitorWatcher] Socket recv() timeout xxx:27020
Fri Dec 13 07:31:25.417 [ReplicaSetMonitorWatcher] SocketException: remote: xxxx:27020 error: 9001 socket exception [3] server [xxx:27020]
Fri Dec 13 07:31:25.417 [ReplicaSetMonitorWatcher] DBClientCursor::init call() failed
Fri Dec 13 07:31:25.417 [ReplicaSetMonitorWatcher] Detected bad connection created at 1384144994710783 microSec, clearing pool for secondary02:27020
Fri Dec 13 07:31:39.544 [conn330291] warning: could not get last error from a shard shard1/xxx :: caused by :: DBClientBase::findN: transport error: xxx:27020 ns: admin.$cmd query: { getLastError: 1 }
Fri Dec 13 07:31:39.557 [conn330291] warning: exception during insert :: caused by :: 16460 error inserting 1 documents to shard rs1:shard1/xxxx at version 326|351||52394cc53b3817ecb1e07c15 :: caused by :: could not get last error from a shard shard1xxxx :: caused by :: DBClientBase::findN: transport error: config01.mongodb.kk.cn.gu3.jp:27020 ns: admin.$cmd query: { getLastError: 1 }
Fri Dec 13 07:31:41.722 [ReplicaSetMonitorWatcher] warning: No primary detected for set shard1
....
Fri Dec 13 07:32:15.776 [ReplicaSetMonitorWatcher] Primary for replica set shard1 changed to primary01:27020 <== this server was the original primary server, actually it did not changed but just unavaliable for a while.
==========
My acquaintance who manages over 100 mongod cluster uses same approach to recover the state.
If you want to use mongodb in log storage, removing unique index is better
and resolving duplicate problem at query phase.
Error ocurred in '_id_' filed not '_id', right?
E11000 duplicate key error index: kome.actionlog.$_id_ dup key: { : \"5426d722-4dee-47c9-9ee2-d172cbb9a1bd\" }" instance=23456316641420
2013-12-17 16:36:48 +0900 [fatal]: DUP KEY ERROR: 16460: error inserting 1 documents to shard rs2:shard2/xxx at version 326|443||52394cc53b3817ecb1e07c15 :: caused by :: E11000 duplicate key error index: kome.actionlog.$_id_ dup key: { : "d82664d2-d3d7-4448-9e85-b165e5a6c35a" }
2013-12-17 16:37:35 +0900 [fatal]: DUP KEY ERROR: 16460: error inserting 59 documents to shard rs2:shard2/xxx at version 326|443||52394cc53b3817ecb1e07c15 :: caused by :: E11000 duplicate key error index: kome.actionlog.$_id_ dup key: { : "0ca0c0b3-6ebb-4162-bfe5-5c0bc57ff87c" }
2013-12-17 16:37:40 +0900 [fatal]: DUP KEY ERROR: 16460: error inserting 13 documents to shard rs2:shard2/xxx at version 326|443||52394cc53b3817ecb1e07c15 :: caused by :: E11000 duplicate key error index: kome.actionlog.$_id_ dup key: { : "95ae8303-8dd9-4bee-be57-51e1d3f9671f" }
In fact, we inserted 52421 documents into 'DUP_KEY' collection. but from the log, we get insert errors only when inserting 1 + 59 + 13 documents.
it means that we can not count on the num of error inserted documents in log? Am I right?
--
I'm not sure. This problem seems mongodb and client error handling issue.
And I don't know the your total documents, so I couldn't judge...
BTW, why do you have same _id_ in several logs?
Does your application sometimes generate same UUID in different record?
Does your application sometimes generate same UUID in different record?
--
You received this message because you are subscribed to the Google Groups "Fluentd Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fluentd+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.