got error using mongo / java.net.ConnectException:
情報
この質問は閉じられています。 編集または回答するには再度開いてください。
古いコメントを表示
i used mongoDB from matlab. but i got error.
error log >>>
Error using mongo (line 388)
[Mongo Driver Error]:Timed out after 10000 ms while waiting to connect. Client view of cluster state is {type=UNKNOWN, servers=[{address=localhost:27017, type=UNKNOWN, state=CONNECTING,
exception={com.mongodb.MongoSocketOpenException: Exception opening socket}, caused by {java.net.ConnectException: Connection refused (Connection refused)}}].
Error in mongoDB (line 5)
conn = mongo(server,port,dbname)
my code
server = "localhost";
port = 27017;
dbname = "AAA";
conn = mongo(server,port,dbname)
isopen(conn)
employee1.employee = 26;
employee1.department = 'Sales';
employee1.salary = 100000;
documents = employee1
collection = "jse";
n = insert(conn,collection,documents)
close(conn)
0 件のコメント
回答 (0 件)
この質問は閉じられています。
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!