Mongodb closed connection after some time with exception: MongoSocketOpenException: Exception opening socket

0

Os is Windows 10 x64. I'm using db and Spring REST services on localhost.

Mongodb closed connection after some time (few minutes or 30 minutes, I don't know what the trigger for closing connection). It mins that my services make CRUD actions with DB till mongodb will close connection with exception.

Exception on service side:

com.mongodb.MongoSocketOpenException: Exception opening socket
    at com.mongodb.internal.connection.SocketStream.open(SocketStream.java:67) ~[mongodb-driver-core-3.8.2.jar:na]
    at com.mongodb.internal.connection.InternalStreamConnection.open(InternalStreamConnection.java:126) ~[mongodb-driver-core-3.8.2.jar:na]
    at com.mongodb.internal.connection.DefaultServerMonitor$ServerMonitorRunnable.run(DefaultServerMonitor.java:131) ~[mongodb-driver-core-3.8.2.jar:na]
    at java.base/java.lang.Thread.run(Thread.java:835) ~[na:na]
Caused by: java.net.ConnectException: Connection refused: connect
    at java.base/java.net.PlainSocketImpl.waitForConnect(Native Method) ~[na:na]
    at java.base/java.net.PlainSocketImpl.socketConnect(PlainSocketImpl.java:107) ~[na:na]
    at java.base/java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:399) ~[na:na]
    at java.base/java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:242) ~[na:na]
    at java.base/java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:224) ~[na:na]
    at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:403) ~[na:na]
    at java.base/java.net.Socket.connect(Socket.java:591) ~[na:na]
    at com.mongodb.internal.connection.SocketStreamHelper.initialize(SocketStreamHelper.java:64) ~[mongodb-driver-core-3.8.2.jar:na]
    at com.mongodb.internal.connection.SocketStream.open(SocketStream.java:62) ~[mongodb-driver-core-3.8.2.jar:na]
    ... 3 common frames omitted

and exception in system console where mongod was runed

2020-01-03T16:30:12.887+0200 E  STORAGE  [WTCheckpointThread] WiredTiger error (16) [1578061812:886660][7016:140714739850832], file:WiredTiger.wt, WT_SESSION.checkpoint: __win_fs_rename, 125: C:\data\db\\WiredTiger.turtle.set to C:\data\db\\WiredTiger.turtle: file-rename: MoveFileExW: ������� �� ����� �������� ������ � �����, ��� ��� ���� ���� ����� ������ ���������.
: Resource device Raw: [1578061812:886660][7016:140714739850832], file:WiredTiger.wt, WT_SESSION.checkpoint: __win_fs_rename, 125: C:\data\db\\WiredTiger.turtle.set to C:\data\db\\WiredTiger.turtle: file-rename: MoveFileExW: ������� �� ����� �������� ������ � �����, ��� ��� ���� ���� ����� ������ ���������.
: Resource device
2020-01-03T16:30:12.888+0200 E  STORAGE  [WTCheckpointThread] WiredTiger error (16) [1578061812:887657][7016:140714739850832], file:WiredTiger.wt, WT_SESSION.checkpoint: __wt_turtle_update, 394: WiredTiger.turtle: fatal turtle file update error: Resource device Raw: [1578061812:887657][7016:140714739850832], file:WiredTiger.wt, WT_SESSION.checkpoint: __wt_turtle_update, 394: WiredTiger.turtle: fatal turtle file update error: Resource device
2020-01-03T16:30:12.889+0200 E  STORAGE  [WTCheckpointThread] WiredTiger error (-31804) [1578061812:888655][7016:140714739850832], file:WiredTiger.wt, WT_SESSION.checkpoint: __wt_panic, 490: the process must exit and restart: WT_PANIC: WiredTiger library panic Raw: [1578061812:888655][7016:140714739850832], file:WiredTiger.wt, WT_SESSION.checkpoint: __wt_panic, 490: the process must exit and restart: WT_PANIC: WiredTiger library panic
2020-01-03T16:30:12.891+0200 F  -        [WTCheckpointThread] Fatal Assertion 50853 at src\mongo\db\storage\wiredtiger\wiredtiger_util.cpp 414
2020-01-03T16:30:12.891+0200 F  -        [WTCheckpointThread]

***aborting after fassert() failure


2020-01-03T16:30:13.379+0200 F  -        [WTCheckpointThread] Got signal: 22 (SIGABRT).
mongod.exe    ...\src\mongo\util\stacktrace_windows.cpp(246)                                                                       mongo::printStackTrace+0x43
mongod.exe    ...\src\mongo\util\signal_handlers_synchronous.cpp(239)                                                              mongo::`anonymous namespace'::abruptQuit+0x81
ucrtbase.dll                                                                                                                       raise+0x1dd
ucrtbase.dll                                                                                                                       abort+0x31
mongod.exe    ...\src\mongo\util\assert_util.cpp(145)                                                                              mongo::fassertFailedWithLocation+0xd6
mongod.exe    ...\src\mongo\db\storage\wiredtiger\wiredtiger_util.cpp(414)                                                         mongo::`anonymous namespace'::mdb_handle_error_with_startup_suppression+0x2d1
mongod.exe    ...\src\third_party\wiredtiger\src\support\err.c(263)                                                                __eventv+0x38d
mongod.exe    ...\src\third_party\wiredtiger\src\support\err.c(312)                                                                __wt_err_func+0x2a
mongod.exe    ...\src\third_party\wiredtiger\src\support\err.c(507)                                                                __wt_panic+0x40
mongod.exe    ...\src\third_party\wiredtiger\src\meta\meta_turtle.c(394)                                                           __wt_turtle_update+0x38b
mongod.exe    ...\src\third_party\wiredtiger\src\meta\meta_table.c(211)                                                            __wt_metadata_update+0x35b
mongod.exe    ...\src\third_party\wiredtiger\src\meta\meta_ckpt.c(140)                                                             __ckpt_set+0xf1
mongod.exe    ...\src\third_party\wiredtiger\src\meta\meta_ckpt.c(602)                                                             __wt_meta_ckptlist_set+0x22f
mongod.exe    ...\src\third_party\wiredtiger\src\txn\txn_ckpt.c(1588)                                                              __checkpoint_tree+0x1d0
mongod.exe    ...\src\third_party\wiredtiger\src\txn\txn_ckpt.c(1721)                                                              __wt_checkpoint+0x94
mongod.exe    ...\src\third_party\wiredtiger\src\txn\txn_ckpt.c(911)                                                               __txn_checkpoint+0x70a
mongod.exe    ...\src\third_party\wiredtiger\src\txn\txn_ckpt.c(1043)                                                              __txn_checkpoint_wrapper+0x189
mongod.exe    ...\src\third_party\wiredtiger\src\txn\txn_ckpt.c(1101)                                                              __wt_txn_checkpoint+0x112
mongod.exe    ...\src\third_party\wiredtiger\src\session\session_api.c(1970)                                                       __session_checkpoint+0x336
mongod.exe    ...\src\mongo\db\storage\wiredtiger\wiredtiger_kv_engine.cpp(345)                                                    mongo::WiredTigerKVEngine::WiredTigerCheckpointThread::run+0x3f6
mongod.exe    ...\src\mongo\util\background.cpp(151)                                                                               mongo::BackgroundJob::jobBody+0x145
mongod.exe    c:\program files (x86)\microsoft visual studio\2017\professional\vc\tools\msvc\14.16.27023\include\thr\xthread(230)  std::_LaunchPad<std::unique_ptr<std::tuple<<lambda_8929d5e2502e4de5883694c1a7a329eb> >,std::default_delete<std::tuple<<lambda_8929d5e2502e4de5883694c1a7a329eb> > > > >::_Go+0x6b
mongod.exe    c:\program files (x86)\microsoft visual studio\2017\professional\vc\tools\msvc\14.16.27023\include\thr\xthread(209)  std::_Pad::_Call_func+0x9
ucrtbase.dll                                                                                                                       beginthreadex+0x142
KERNEL32.DLL                                                                                                                       BaseThreadInitThunk+0x14
2020-01-03T16:30:13.384+0200 F  CONTROL  [WTCheckpointThread] *** unhandled exception 0x0000000E at 0x00007FFAB250A839, terminating
2020-01-03T16:30:13.384+0200 F  CONTROL  [WTCheckpointThread] *** stack trace for unhandled exception:
2020-01-03T16:30:13.386+0200 I  -        [WTCheckpointThread] KERNELBASE.dll                                                                                                                       RaiseException+0x69
mongod.exe      ...\src\mongo\util\signal_handlers_synchronous.cpp(241)                                                              mongo::`anonymous namespace'::abruptQuit+0x9e
ucrtbase.dll                                                                                                                         raise+0x1dd
ucrtbase.dll                                                                                                                         abort+0x31
mongod.exe      ...\src\mongo\util\assert_util.cpp(145)                                                                              mongo::fassertFailedWithLocation+0xd6
mongod.exe      ...\src\mongo\db\storage\wiredtiger\wiredtiger_util.cpp(414)                                                         mongo::`anonymous namespace'::mdb_handle_error_with_startup_suppression+0x2d1
mongod.exe      ...\src\third_party\wiredtiger\src\support\err.c(263)                                                                __eventv+0x38d
mongod.exe      ...\src\third_party\wiredtiger\src\support\err.c(312)                                                                __wt_err_func+0x2a
mongod.exe      ...\src\third_party\wiredtiger\src\support\err.c(507)                                                                __wt_panic+0x40
mongod.exe      ...\src\third_party\wiredtiger\src\meta\meta_turtle.c(394)                                                           __wt_turtle_update+0x38b
mongod.exe      ...\src\third_party\wiredtiger\src\meta\meta_table.c(211)                                                            __wt_metadata_update+0x35b
mongod.exe      ...\src\third_party\wiredtiger\src\meta\meta_ckpt.c(140)                                                             __ckpt_set+0xf1
mongod.exe      ...\src\third_party\wiredtiger\src\meta\meta_ckpt.c(602)                                                             __wt_meta_ckptlist_set+0x22f
mongod.exe      ...\src\third_party\wiredtiger\src\txn\txn_ckpt.c(1588)                                                              __checkpoint_tree+0x1d0
mongod.exe      ...\src\third_party\wiredtiger\src\txn\txn_ckpt.c(1721)                                                              __wt_checkpoint+0x94
mongod.exe      ...\src\third_party\wiredtiger\src\txn\txn_ckpt.c(911)                                                               __txn_checkpoint+0x70a
mongod.exe      ...\src\third_party\wiredtiger\src\txn\txn_ckpt.c(1043)                                                              __txn_checkpoint_wrapper+0x189
mongod.exe      ...\src\third_party\wiredtiger\src\txn\txn_ckpt.c(1101)                                                              __wt_txn_checkpoint+0x112
mongod.exe      ...\src\third_party\wiredtiger\src\session\session_api.c(1970)                                                       __session_checkpoint+0x336
mongod.exe      ...\src\mongo\db\storage\wiredtiger\wiredtiger_kv_engine.cpp(345)                                                    mongo::WiredTigerKVEngine::WiredTigerCheckpointThread::run+0x3f6
mongod.exe      ...\src\mongo\util\background.cpp(151)                                                                               mongo::BackgroundJob::jobBody+0x145
mongod.exe      c:\program files (x86)\microsoft visual studio\2017\professional\vc\tools\msvc\14.16.27023\include\thr\xthread(230)  std::_LaunchPad<std::unique_ptr<std::tuple<<lambda_8929d5e2502e4de5883694c1a7a329eb> >,std::default_delete<std::tuple<<lambda_8929d5e2502e4de5883694c1a7a329eb> > > > >::_Go+0x6b
mongod.exe      c:\program files (x86)\microsoft visual studio\2017\professional\vc\tools\msvc\14.16.27023\include\thr\xthread(209)  std::_Pad::_Call_func+0x9
ucrtbase.dll                                                                                                                         beginthreadex+0x142
KERNEL32.DLL                                                                                                                         BaseThreadInitThunk+0x14
2020-01-03T16:30:13.388+0200 I  CONTROL  [WTCheckpointThread] writing minidump diagnostic file C:\Program Files\MongoDB\Server\4.2020-01-03T14-30-13.mdmp
2020-01-03T16:30:13.496+0200 F  CONTROL  [WTCheckpointThread] *** immediate exit due to unhandled exception

So please explaine what does it exception mins and what I need to do for fix it? Thanks.

mongodb
asked on Stack Overflow Jan 3, 2020 by Ker Laeda • edited Jan 5, 2020 by Ker Laeda

1 Answer

0

I think I am very late to answer this, but it might help someone else. Most probably I think you will be installing the latest version (i.e 4.4.2) For some cases, this will not work as the new versions may have some unresolved issues, which just happened in my case. So plz install lower version i.e 4.2.1, Hope that works for you as well.

answered on Stack Overflow Dec 29, 2020 by Akansha Saxena

User contributions licensed under CC BY-SA 3.0