If you start up a mongocryptd, and then another one in the same working directory, it sees the pid file and exits with a nice message:
2019-05-29T13:08:57.322-0400 I CONTROL [initandlisten] Using lock file: /Users/jeff/mongocryptd.pid 2019-05-29T13:08:57.322-0400 E CONTROL [initandlisten] Failed to open pid file, exiting
All good. But if you start up another one in a different working directory, it's able to create a new pid file, but then terminates with a backtrace:
2019-05-29T13:42:25.952-0400 I CONTROL [initandlisten] Using lock file: /Users/jeff/mongo-java-driver/mongocryptd.pid
2019-05-29T13:42:25.954-0400 F - [initandlisten] terminate() called. An exception is active; attempting to gather more information
2019-05-29T13:42:25.955-0400 F - [initandlisten] DBException::toString(): SocketException: Address already in use
Actual exception type: mongo::error_details::ExceptionForImpl<(mongo::ErrorCodes::Error)9001, mongo::ExceptionForCat<(mongo::ErrorCategory)0> >
0x1085e1a09 0x1085e0d37 0x7fff7470019e 0x7fff746fff86 0x7fff746f2f99 0x10858e322 0x1085d680b 0x107c5bec0 0x107c5b029 0x7fff776963d5 0x1
----- BEGIN BACKTRACE -----
{"backtrace":[{"b":"107C5A000","o":"987A09","s":"_ZN5mongo15printStackTraceERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEE"}, ...
...
mongocryptd(_ZN5mongo15printStackTraceERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEE+0x39) [0x1085e1a09]
mongocryptd(_ZN5mongo12_GLOBAL__N_111myTerminateEv+0x87) [0x1085e0d37]
libc++abi.dylib(_ZSt11__terminatePFvvE+0x8) [0x7fff7470019e]
libc++abi.dylib(__cxa_get_exception_ptr+0x0) [0x7fff746fff86]
libc++abi.dylib(__cxa_get_globals+0x0) [0x7fff746f2f99]
mongocryptd(_ZN5mongo13error_details23throwExceptionForStatusERKNS_6StatusE+0x37A2) [0x10858e322]
mongocryptd(_ZN5mongo21uassertedWithLocationERKNS_6StatusEPKcj+0x20B) [0x1085d680b]
mongocryptd(_ZN5mongo12_GLOBAL__N_110CryptDMainEiPPcS2_+0xE90) [0x107c5bec0]
mongocryptd(main+0x9) [0x107c5b029]
libdyld.dylib(start+0x1) [0x7fff776963d5]
??? [0x1]
----- END BACKTRACE -----
Abort trap: 6
- is related to
-
SERVER-80269 Mongo finished after a Backtrace
-
- Closed
-