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!