mongodump gives segmentation fault
Asked Answered
C

2

5

I have MongoDB v3.2.6 installed on my mac macOs High Sierra v10.13.1 and I am trying to make a backup before I upgrade.

I have an instance of $ mongod running in one window using defaut db location and default port.

It is my local database, it is not protected by a password and does not require ssl conncetions.

I can access my databases find using $ mongo or Robomongo but when I run $ mongodump or $ mongodump --db mydatabase I get the following error

[1] 1815 segmentation fault mongodump

UPDATE: I have tried to run mongostat and now I get the following error :

[1] 2404 bus error mongodump

Here is the log I get when starting the db with $ mongod :

2017-12-25T12:36:26.642+0000 I CONTROL  [initandlisten] MongoDB starting : pid=3216 port=27017 dbpath=/data/db 64-bit host=MBP-de-Kevin.home
2017-12-25T12:36:26.643+0000 I CONTROL  [initandlisten] db version v3.2.6
2017-12-25T12:36:26.643+0000 I CONTROL  [initandlisten] git version: 05552b562c7a0b3143a729aaa0838e558dc49b25
2017-12-25T12:36:26.643+0000 I CONTROL  [initandlisten] OpenSSL version: OpenSSL 1.0.2m  2 Nov 2017
2017-12-25T12:36:26.643+0000 I CONTROL  [initandlisten] allocator: system
2017-12-25T12:36:26.643+0000 I CONTROL  [initandlisten] modules: none
2017-12-25T12:36:26.643+0000 I CONTROL  [initandlisten] build environment:
2017-12-25T12:36:26.643+0000 I CONTROL  [initandlisten]     distarch: x86_64
2017-12-25T12:36:26.643+0000 I CONTROL  [initandlisten]     target_arch: x86_64
2017-12-25T12:36:26.643+0000 I CONTROL  [initandlisten] options: {}
2017-12-25T12:36:26.644+0000 I -        [initandlisten] Detected data files in /data/db created by the 'mmapv1' storage engine, so setting the active storage engine to 'mmapv1'.
2017-12-25T12:36:26.653+0000 I JOURNAL  [initandlisten] journal dir=/data/db/journal
2017-12-25T12:36:26.654+0000 I JOURNAL  [initandlisten] recover : no journal files present, no recovery needed
2017-12-25T12:36:26.674+0000 I JOURNAL  [durability] Durability thread started
2017-12-25T12:36:26.675+0000 I JOURNAL  [journal writer] Journal writer thread started
2017-12-25T12:36:26.894+0000 I FTDC     [initandlisten] Initializing full-time diagnostic data capture with directory '/data/db/diagnostic.data'
2017-12-25T12:36:26.894+0000 I NETWORK  [HostnameCanonicalizationWorker] Starting hostname canonicalization worker
2017-12-25T12:36:26.894+0000 I NETWORK  [initandlisten] waiting for connections on port 27017

What am I doing wrong and How can I debug?

Cowitch answered 25/12, 2017 at 0:59 Comment(2)
Additional details may be important. What does your mongodump command look like? Is your mongo config set to require SSL connections? Is your database username and password protected? I would encourage you to provide these kinds of details in case this is a configuration-related issue. They should aid in narrowing down the issue.Unbalanced
Thanks. I have updated my questions. There is no password and ssl connections are not required.Cowitch
H
7

I was experiencing the same problem. I am on macOS High Sierra 10.13.3. My mongo version was mongodb 3.2.7. I read this in the documentation of mongodump:

MAC OSX SIERRA AND GO 1.6 INCOMPATIBILITY
Users running on Mac OSX Sierra require the 3.2.10 or newer version of mongodump.

I upgraded to mongodb 3.6.2 and I my issue was resolved.

Hawger answered 22/2, 2018 at 20:32 Comment(2)
Sounds like the most likely reason.Cowitch
brew install [email protected]Fidelia
C
6

I fixed my error using brew upgrade mongodb. Still dont know what was the issue.

That said it is better to follow one of these guide upgrade mongodb to avoid other issues.

Cowitch answered 20/2, 2018 at 0:56 Comment(1)
brew install [email protected]Fidelia

© 2022 - 2024 — McMap. All rights reserved.