[SERVER-9219] init script is not working after upgrade Created: 02/Apr/13  Updated: 09/Apr/13  Resolved: 05/Apr/13

Status: Closed
Project: Core Server
Component/s: Packaging
Affects Version/s: 2.4.1
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Luciano Issoe Assignee: Ernie Hershey
Resolution: Duplicate Votes: 0
Labels: init, scripts
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Ubuntu 12.04 LTS, mongodb 2.2.2 upgrade to 2.4.1


Issue Links:
Duplicate
duplicates SERVER-9032 mongod fails when launched with misco... Closed
Operating System: Linux
Steps To Reproduce:

apt-get update
apt-get upgrade
/etc/init.d/mongodb restart

Tried both mongodb 2.4.1 init-script and older 2.2.2. Both fail.

Participants:

 Description   

Installation fails.

Then init scripts does not work anymore. The only way to restart is rebooting server.

Then the secondary won´t catch up to the master, claiming it´s too far behind.

Cleaned the data dir and then the secondary begins to do initial sync.



 Comments   
Comment by Ernie Hershey [ 05/Apr/13 ]

That's great! I'm glad to hear it. I'll close this ticket and you can track the bug itself here: https://jira.mongodb.org/browse/SERVER-9032

Comment by Luciano Issoe [ 05/Apr/13 ]

Thanks, Ernie.

Did that and also included LC_CTYPE=en_US.UTF-8 in ~/.bashrc.

Now restarts are working.

Comment by Ernie Hershey [ 04/Apr/13 ]

Hi Luciano,

This may also be the issue from SERVER-9032. To help determine if that might be the case can you send the output of the "locale" and "locale -a" commands?

Also these steps may help correct the issue:
sudo dpkg-reconfigure locales
sudo locale-gen locale-name to install one not mentioned in locale -a, e.g. "sudo locale-gen fr_FR.UTF-8"

Thanks,
Ernie

Comment by Ernie Hershey [ 03/Apr/13 ]

Hi,

That doesn't look like an init script issue since it's occurring outside of the init script. Are you familiar with the considerations in our 2.4 upgrade documentation? (http://docs.mongodb.org/manual/release-notes/2.4-upgrade/) In particular, what are the versions of your other instances and did you shut down the running instance before upgrading?

Comment by Luciano Issoe [ 03/Apr/13 ]

Hi Ernie,

There´s almost nothing happening...

1- [Fail]
2- no output
3- no output
4-

port = 27017
replSet = rs3
dbpath=/var/lib/mongodb
logpath=/var/log/mongodb/mongodb.log
logappend=true
auth = true
keyFile = /etc/secret
rest = true
quiet = true
slowms = 20
oplogSize = 150000

But here is what happens when I try to run mongod in the shell without the init wrapper:

ubuntu@rs3-ssd03:/data$ /usr/bin/mongod --dbpath /data/db --logpath /var/log/mongodb/mongodb2.log run --config /etc/mongodb2.conf
Wed Apr 3 17:43:53.557 terminate() called, printing stack (if implemented for platform):
0xdc7f71 0x6cd30e 0x7fa188043846 0x7fa188043873 0x7fa18804396e 0x7fa187ff0a07 0x7fa188000284 0x7fa187ff4a74 0x7fa187ff5b6b 0xde584f 0xde619b 0xde2e40 0x9e356f 0x6db623 0x6dd3c9 0x7fa1876de76d 0x6cd0f9
/usr/bin/mongod(_ZN5mongo15printStackTraceERSo+0x21) [0xdc7f71]
/usr/bin/mongod(_ZN5mongo11myterminateEv+0x3e) [0x6cd30e]
/usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0xb5846) [0x7fa188043846]
/usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0xb5873) [0x7fa188043873]
/usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0xb596e) [0x7fa18804396e]
/usr/lib/x86_64-linux-gnu/libstdc++.so.6(ZSt21_throw_runtime_errorPKc+0x57) [0x7fa187ff0a07]
/usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0x72284) [0x7fa188000284]
/usr/lib/x86_64-linux-gnu/libstdc++.so.6(_ZNSt6locale5_ImplC1EPKcm+0x44) [0x7fa187ff4a74]
/usr/lib/x86_64-linux-gnu/libstdc++.so.6(_ZNSt6localeC1EPKc+0x73b) [0x7fa187ff5b6b]
/usr/bin/mongod(_ZN5boost11filesystem34path21wchar_t_codecvt_facetEv+0x4f) [0xde584f]
/usr/bin/mongod(_ZNK5boost11filesystem34path14root_directoryEv+0xbb) [0xde619b]
/usr/bin/mongod(ZN5boost11filesystem38absoluteERKNS0_4pathES3+0x40) [0xde2e40]
/usr/bin/mongod(_ZN5mongo27initializeServerGlobalStateEb+0x15f) [0x9e356f]
/usr/bin/mongod() [0x6db623]
/usr/bin/mongod(main+0x9) [0x6dd3c9]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed) [0x7fa1876de76d]
/usr/bin/mongod() [0x6cd0f9]
Wed Apr 3 17:43:53.572 Got signal: 6 (Aborted).

Wed Apr 3 17:43:53.575 Backtrace:
0xdc7f71 0x6ce459 0x7fa1876f34a0 0x7fa1876f3425 0x7fa1876f6b8b 0x6cd313 0x7fa188043846 0x7fa188043873 0x7fa18804396e 0x7fa187ff0a07 0x7fa188000284 0x7fa187ff4a74 0x7fa187ff5b6b 0xde584f 0xde619b 0xde2e40 0x9e356f 0x6db623 0x6dd3c9 0x7fa1876de76d
/usr/bin/mongod(_ZN5mongo15printStackTraceERSo+0x21) [0xdc7f71]
/usr/bin/mongod(_ZN5mongo10abruptQuitEi+0x399) [0x6ce459]
/lib/x86_64-linux-gnu/libc.so.6(+0x364a0) [0x7fa1876f34a0]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0x35) [0x7fa1876f3425]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x17b) [0x7fa1876f6b8b]
/usr/bin/mongod(_ZN5mongo11myterminateEv+0x43) [0x6cd313]
/usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0xb5846) [0x7fa188043846]
/usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0xb5873) [0x7fa188043873]
/usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0xb596e) [0x7fa18804396e]
/usr/lib/x86_64-linux-gnu/libstdc++.so.6(ZSt21_throw_runtime_errorPKc+0x57) [0x7fa187ff0a07]
/usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0x72284) [0x7fa188000284]
/usr/lib/x86_64-linux-gnu/libstdc++.so.6(_ZNSt6locale5_ImplC1EPKcm+0x44) [0x7fa187ff4a74]
/usr/lib/x86_64-linux-gnu/libstdc++.so.6(_ZNSt6localeC1EPKc+0x73b) [0x7fa187ff5b6b]
/usr/bin/mongod(_ZN5boost11filesystem34path21wchar_t_codecvt_facetEv+0x4f) [0xde584f]
/usr/bin/mongod(_ZNK5boost11filesystem34path14root_directoryEv+0xbb) [0xde619b]
/usr/bin/mongod(ZN5boost11filesystem38absoluteERKNS0_4pathES3+0x40) [0xde2e40]
/usr/bin/mongod(_ZN5mongo27initializeServerGlobalStateEb+0x15f) [0x9e356f]
/usr/bin/mongod() [0x6db623]
/usr/bin/mongod(main+0x9) [0x6dd3c9]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed) [0x7fa1876de76d]

Comment by Ernie Hershey [ 03/Apr/13 ]

Hi Luciano,

To help me diagnose the problem you're having, can you paste a few things here?

1) The output you get when you run /etc/init.d/mongodb restart and it doesn't work?
2) Pertinent info from /var/log/mongodb/mongodb.log (if it exists)
3) Pertinent info from /var/log/upstart/mongodb.log (if it exists)
4) /etc/mongodb.conf (if it exists)

Thanks,
Ernie

Generated at Thu Feb 08 03:19:44 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.