[CXX-2589] it failed when I use C++ program to connect to mongoDB ,error message is "mongocxx::v_noabi::bulk_write_exception" Created: 08/Oct/22  Updated: 27/Oct/23  Resolved: 10/Oct/22

Status: Closed
Project: C++ Driver
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Blocker - P1
Reporter: yang zhao Assignee: Unassigned
Resolution: Gone away Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File test1.cpp    

 Description   

Summary

it failed when I use C++ program to connect to mongoDB ,error message is 

terminate called after throwing an instance of 'mongocxx::v_noabi::bulk_write_exception'
  what():  : generic server error
Aborted (core dumped)

Environment

Please provide the version of the C / CXX driver.

mongo-cxx-driver-r3.6.7

mongo-cxx-driver-r3.6.7

host OS :ubuntu 18.04 x86

cmake version 3.10.2

If applicable, please attach the full output of the cmake command used to configure the C / CXX driver.

zhaoy10@zhaoy10:/media/zhaoy10/ACAD44B84EA1A705/fullmap/mongoDB$ c++ --std=c++11 test1.cpp $(pkg-config --cflags --libs libmongocxx)
zhaoy10@zhaoy10:/media/zhaoy10/ACAD44B84EA1A705/fullmap/mongoDB$ ./test
terminate called after throwing an instance of 'mongocxx::v_noabi::bulk_write_exception'
  what():  : generic server error
Aborted (core dumped)

If applicable, please provide the MongoDB server version and topology (standalone, replica set, or sharded cluster).

How to Reproduce

you can use the below test1.cpp to reproduce the issue, I deleted the mongoDB url because it contains the user name and password

Additional Background

Please provide any additional background information that may be helpful in diagnosing the bug.



 Comments   
Comment by yang zhao [ 10/Oct/22 ]

the problem has been resolved,thanks!

Comment by yang zhao [ 09/Oct/22 ]

I tried to add the catch the exception , it gave the below error code ,please kindly help me check

 

zhaoy10@zhaoy10:/media/zhaoy10/ACAD44B84EA1A705/fullmap/mongoDB$ ./test
code=mongodb:13053
message=No suitable servers found (`serverSelectionTryOnce` set): generic server error
error reply={ }
terminate called after throwing an instance of 'mongocxx::v_noabi::query_exception'
  what():  No suitable servers found (`serverSelectionTryOnce` set): generic server error
Aborted (core dumped)
zhaoy10@zhaoy10:/media/zhaoy10/ACAD44B84EA1A705/fullmap/mongoDB$ 

Generated at Wed Feb 07 22:06:25 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.