Failed to load data into Sandbox Cluster

Hi, any clue on error - Failed to load data (loadMovieDetailsDataset.js) into Sandbox Cluster.
The error message detail says - not authorized on video to execute command

Q. Is it because the video DB already exists ? or something else ?
Please help.

Found similar existing unanswered query @ https://discourse.university.mongodb.com/t/chapter-2-the-mongodb-query-language-atlas-loading-data-into-your-sandbox-cluster/9961?u=prashant_24738

===============
MongoDB Enterprise Cluster0-shard-0:PRIMARY> show dbs
100YWeatherSmall 0.128GB
admin 0.000GB
aggregations 0.067GB
citibike 0.363GB
city 0.002GB
config 0.000GB
coursera-agg 0.083GB
local 1.043GB
mflix 0.292GB
results 0.000GB
ships 0.001GB
video 0.458GB

MongoDB Enterprise Cluster0-shard-0:PRIMARY> load(“loadMovieDetailsDataset.js”)
2019-03-02T18:18:13.048+0530 E QUERY [js] [src/mongo/shell/utils.js:25:13] Error: drop failed: {
“operationTime” : Timestamp(1551530882, 1),
“ok” : 0,
“errmsg” : “not authorized on video to execute command { drop: “movieDetails”, lsid: { id: UUID(“78172960-bb99-46e1-bfd7-2628dec7f943”) }, $clusterTime: { clusterTime: Timestamp(1551530872, 1), signature: { hash: BinData(0, 565967B590AB319DCFD120EA4F6D40CD67890A44), keyId: 6627672121604571137 } }, $db: “video” }”,
“code” : 13,
“codeName” : “Unauthorized”,
“$clusterTime” : {
“clusterTime” : Timestamp(1551530882, 1),
“signature” : {
“hash” : BinData(0,“KQl6exAOCdv81L7TyiYJlIX6DSA=”),
“keyId” : NumberLong(“6627672121604571137”)
}
}
}
Stack trace:
_getErrorWithCode@src/mongo/shell/utils.js:25:13
DBCollection.prototype.drop@src/mongo/shell/collection.js:707:1
@loadMovieDetailsDataset.js:2:1
@(shell):1:1

2019-03-02T18:18:13.049+0530 E QUERY [js] Error: error loading js file: loadMovieDetailsDataset.js @(shell):1:1
MongoDB Enterprise Cluster0-shard-0:PRIMARY> loadMovieDetailsDataset.js

Please double check which cluster you connected
Looking at the DBs appears to me you connected to class cluster which is read only
What command/connect string you used
Can you paste that?

1 Like

I have used the following command to connect to the class Atlas cluster. It is mentioned in the course M001- Chapter 2: The MongoDB Query Language + Atlas - Connecting to Our Class Atlas Cluster from the mongo Shell

https://university.mongodb.com/mercury/M001/2019_February/chapter/Chapter_2_The_MongoDB_Query_Language_Atlas/lesson/595aae2236942e83e9a361b9/tab/595aae2236942e83e9a361b8

Command string:

mongo “mongodb://cluster0-shard-00-00-jxeqq.mongodb.net:27017,cluster0-shard-00-01-jxeqq.mongodb.net:27017,cluster0-shard-00-02-jxeqq.mongodb.net:27017/test?replicaSet=Cluster0-shard-0” --authenticationDatabase admin --ssl --username m001-student --password m001-mongodb-basics


You cannot load into class cluster
Title of this issue says “Failed to load into Sandbox cluster”
Try to connect to Sandbox and load
As i mentioned before Class cluster(RO) and Sandbox are two different(RW)

Hi,
The class cluster is Read Only. You need the write access to write something.
That’s why you are getting that error.

You need to follow this lesson to create your own sandbox cluster.
Follow this link to reach out the lesson.
https://university.mongodb.com/mercury/M001/2019_February/chapter/Chapter_2_The_MongoDB_Query_Language_Atlas/lesson/595aae2236942e83e9a361ad/tab/595aae2236942e83e9a361ae

Thanks Guys, was able to connect with command string available in my sandbox cluster.
Thanks once again.