Step 4 : RUN mongod --fork --logpath /var/log/mongodb.log && sleep 5 && mongo foobar /tmp/create_ddbb.js ---> Running in 58ba44d02508about to fork child process, waiting until server is ready for connections.forked process: 9child process started successfully, parent exitingMongoDB shell version: 3.2.6connecting to: foobarSuccessfully added user: { "user" : "***********", "roles" : [ { "role" : "readWrite", "db" : "foobar" } ]} ---> e73b6c8c8b83Removing intermediate container 58ba44d02508Successfully built e73b6c8c8b83
لذلك يتم إنشاء المستخدم ، ولكن بعد ذلك عندما أحاول الاتصال ، أحصل على:
mongo_1 | 2016-05-13T17:44:02.159+0000 I NETWORK [initandlisten] connection accepted from 172.20.0.4:41294 #1 (1 connection now open)mongo_1 | 2016-05-13T17:44:02.160+0000 I ACCESS [conn1] SCRAM-SHA-1 authentication failed for ********* on foobar from client 172.20.0.4 ; UserNotFound: Could not find user *********@foobarmongo_1 | 2016-05-13T17:44:02.160+0000 I NETWORK [conn1] end connection 172.20.0.4:41294 (0 connections now open)
لماذا يحدث ذلك? كيف يمكنني الاستمرار على المستخدم الذي تم إنشاؤه?