put gridfs error -> "filemd5 failed"

52 views
Skip to first unread message

zipan

unread,
Aug 9, 2010, 5:13:14 AM8/9/10
to mongodb-user
use 1.6.0

Gridfs+replSet+sharding

After configuring, the config statu is bellow

==================================
> db.printShardingStatus()
--- Sharding Status ---
sharding version: { "_id" : 1, "version" : 3 }
shards:
{
"_id" : "shard0000",
"host" : "youku_imag/b05_mongodb.yoqoo:27017,b06_mongodb.yoqoo:
27017,b07_mongodb.yoqoo:27017",
"maxSize" : NumberLong( 10000 )
}
{
"_id" : "shard0001",
"host" : "youku_imag2/b08_mongodb.yoqoo:
27018,b09_mongodb.yoqoo:27018,b10_mongodb.yoqoo:27018",
"maxSize" : NumberLong( 4000 )
}
databases:
{ "_id" : "admin", "partitioned" : false, "primary" :
"config" }
{ "_id" : "youkufile", "partitioned" : true, "primary" :
"shard0000" }
youkufile.fs.chunks chunks:
{ "files_id" : { $minKey : 1 } } -->>
{ "files_id" : { $maxKey : 1 } } on : shard0000 { "t" : 1000, "i" :
0 }
============================================

But mongos log:

============================================
Mon Aug 9 17:10:42 [Balancer] dist_lock unlock: { _id: "balancer",
process: "b02_mongodb.yoqoo:1281344269:1804289383", state: 0, ts:
ObjectId('4c5fc60850bfd59f97871dbb'), when: new Date(1281345032959),
who: "b02_mongodb.yoqoo:1281344269:1804289383:Balancer:846930886",
why: "doing balance round" }
Mon Aug 9 17:10:43 [Balancer] dist_lock lock gotLock: 1 now: { _id:
"balancer", process: "b02_mongodb.yoqoo:1281344269:1804289383", state:
1, ts: ObjectId('4c5fc61250bfd59f97871dbc'), when: new
Date(1281345042997), who: "b02_mongodb.yoqoo:
1281344269:1804289383:Balancer:846930886", why: "doing balance
round" }
Mon Aug 9 17:10:43 [Balancer] *** start balancing round
Mon Aug 9 17:10:43 [Balancer] no availalable shards to take chunks
Mon Aug 9 17:10:43 [Balancer] no need to move any chunk
Mon Aug 9 17:10:43 [Balancer] *** end of balancing round
=============================================

when I execute:

mongofiles put MongoGridfsGet -h 10.102.251.22:30000 -d youkufile

error returned:

connected to: 10.102.251.22:30000
assertion: 9008 filemd5 failed

what means is it???

thanks.

zipan

unread,
Aug 9, 2010, 5:58:37 AM8/9/10
to mongodb-user
mongos log bellow:

============================================
Mon Aug 9 17:54:12 [conn6] .system.indexes write for:
youkufile.system.indexes
Mon Aug 9 17:54:12 [conn6] .system.indexes write for:
youkufile.system.indexes
Mon Aug 9 17:54:12 [conn6] UserException: can't find shard for:
youku_imag/b05_mongodb.yoqoo:27017,b06_mongodb.yoqoo:
27017,b07_mongodb.yoqoo:
27017,b05_mongodb.yoqoo,b07_mongodb.yoqoo,b06_mongodb.yoqoo
Mon Aug 9 17:54:12 [conn6] ~ScopedDBConnection: _conn != null
============================================

Alberto Lerner

unread,
Aug 9, 2010, 8:43:32 AM8/9/10
to mongod...@googlegroups.com
You have determined maxSize for your shards. The balancer would not
move to a shard that's already using it's quota and emits the "no
available shard" message. Is that the case?

Alberto.

> --
> You received this message because you are subscribed to the Google Groups "mongodb-user" group.
> To post to this group, send email to mongod...@googlegroups.com.
> To unsubscribe from this group, send email to mongodb-user...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/mongodb-user?hl=en.
>
>

霍子磐

unread,
Aug 9, 2010, 10:16:57 PM8/9/10
to mongod...@googlegroups.com
HI Alberto,
 
I have not input any data into database. This is the first input. The database should be empty now. Why "no available shard"???
 
By the way. In replSet, I use mongod -f /etc/mongo/mongo.conf. In mongo.conf, I write the config:
"shardsvr = true"
 
instead of commandline options such as "--shardsvr"。

2010/8/9 Alberto Lerner <ale...@10gen.com>

Alberto Lerner

unread,
Aug 9, 2010, 10:39:28 PM8/9/10
to mongod...@googlegroups.com
Could you send the output of listdatabases?

> use admin
switched to db admin
> db.runCommand( { listdatabases : 1 } )

Alberto.

霍子磐

unread,
Aug 9, 2010, 11:18:20 PM8/9/10
to mongod...@googlegroups.com
Hi,
 
the output is bellow
==========================
> use admin                                                              
switched to db admin
> db.runCommand( { listdatabases : 1 } )
{
        "databases" : [
                {
                        "name" : "admin",
                        "size" : 1,
                        "empty" : true,
                        "shards" : {
                                "shard0000" : 1,
                                "shard0001" : 1
                        }
                },
                {
                        "name" : "local",
                        "size" : 30486298624,
                        "empty" : false,
                        "shards" : {
                                "shard0000" : 15243149312,
                                "shard0001" : 15243149312
                        }
                },
                {
                        "name" : "youkufile",
                        "size" : 218103808,
                        "empty" : false,
                        "shards" : {
                                "shard0000" : 218103808
                        }
                }
        ],
        "totalSize" : 30704402433,
        "totalSizeMb" : 29282,
        "ok" : 1
}
>
======================================

2010/8/10 Alberto Lerner <ale...@10gen.com>

霍子磐

unread,
Aug 10, 2010, 2:22:05 AM8/10/10
to mongod...@googlegroups.com
and the error log in mongos.log
============================
Tue Aug 10 14:20:12 connection accepted from 10.102.251.23:1464 #2
Tue Aug 10 14:20:12 [conn2]  .system.indexes write for: youkufile.system.indexes
Tue Aug 10 14:20:12 [conn2]  .system.indexes write for: youkufile.system.indexes
Tue Aug 10 14:20:12 [conn2] UserException: can't find shard for: youku_imag/b05_mongodb.yoqoo:27017,b06_mongodb.yoqoo:27017,b07_mongodb.yoqoo:27017,b05_mongodb.yoqoo,b07_mongodb.yoqoo,b06_mongodb.yoqoo
Tue Aug 10 14:20:12 [conn2] ~ScopedDBConnection: _conn != null
=============================

Reply all
Reply to author
Forward
0 new messages