Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#32441 - [mongodb] mongod.service doesn't run mongodb

Attached to Project: Community Packages
Opened by Alexander (heaven) - Sunday, 04 November 2012, 07:33 GMT
Last edited by Felix Yan (felixonmars) - Monday, 05 November 2012, 07:08 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Felix Yan (felixonmars)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Hi, can't run mongo using systemctl.
But when running an old rc.d script it runs fine.

Description:
$ sudo systemctl start mongodb.service
$ mongo
[code]
MongoDB shell version: 2.2.1
connecting to: test
Sun Nov 4 09:11:08 Error: couldn't connect to server 127.0.0.1:27017 src/mongo/shell/mongo.js:91
exception: connect failed
[/code]

$ sudo systemctl status mongodb.service
[code]
mongodb.service - High-performance, schema-free document-oriented database
Loaded: loaded (/usr/lib/systemd/system/mongodb.service; enabled)
Active: inactive (dead) since Sun, 2012-11-04 09:11:07 EET; 45s ago
Process: 1935 ExecStart=/usr/bin/mongod --quiet --config /etc/mongodb.conf (code=exited, status=0/SUCCESS)
CGroup: name=systemd:/system/mongodb.service

Nov 04 09:11:07 arch systemd[1]: Starting High-performance, schema-free document-oriented database...
Nov 04 09:11:07 arch systemd[1]: Started High-performance, schema-free document-oriented database.
Nov 04 09:11:07 arch mongod[1935]: warning: remove or comment out this line by starting it with '#', skipping now : logappend = false
Nov 04 09:11:07 arch mongod[1935]: warning: remove or comment out this line by starting it with '#', skipping now : notablescan = false
Nov 04 09:11:07 arch mongod[1935]: forked process: 1938
Nov 04 09:11:07 arch mongod[1935]: all output going to: /var/log/mongodb/mongod.log
Nov 04 09:11:07 arch mongod[1935]: log file [/var/log/mongodb/mongod.log] exists; copied to temporary file [/var/log/mongodb/mongod.log.2012-11-04T07-11-07]
Nov 04 09:11:07 arch mongod[1935]: child process started successfully, parent exiting
[/code]

$ sudo /etc/rc.d/mongodb start
[code]
:: Starting mongodb [DONE]
[/code]

$ mongo
[code]
MongoDB shell version: 2.2.1
connecting to: test
>
[/code]

Full log output when using systemctl:
[code]
Sun Nov 4 09:30:37 [initandlisten] MongoDB starting : pid=4163 port=27017 dbpath=/var/lib/mongodb 64-bit host=arch
Sun Nov 4 09:30:37 [initandlisten] db version v2.2.1, pdfile version 4.5
Sun Nov 4 09:30:37 [initandlisten] git version: nogitversion
Sun Nov 4 09:30:37 [initandlisten] build info: Linux svenstaro 3.6.2-1-ARCH #1 SMP PREEMPT Fri Oct 12 23:58:58 CEST 2012 x86_64 BOOST_LIB_VERSION=1_50
Sun Nov 4 09:30:37 [initandlisten] options: { config: "/etc/mongodb.conf", dbpath: "/var/lib/mongodb", fork: "true", logpath: "/var/log/mongodb/mongod.log", noauth: "true", nohttpinterface: "true", port: 27017, quiet: true, smallfiles: "true" }
Sun Nov 4 09:30:37 [initandlisten] journal dir=/var/lib/mongodb/journal
Sun Nov 4 09:30:37 [initandlisten] recover : no journal files present, no recovery needed
Sun Nov 4 09:30:37 [initandlisten] waiting for connections on port 27017
Sun Nov 4 09:30:37 got signal 15 (Terminated), will terminate after current cmd ends
Sun Nov 4 09:30:37 [interruptThread] now exiting
Sun Nov 4 09:30:37 dbexit:
Sun Nov 4 09:30:37 [interruptThread] shutdown: going to close listening sockets...
Sun Nov 4 09:30:37 [interruptThread] closing listening socket: 6
Sun Nov 4 09:30:37 [interruptThread] closing listening socket: 7
Sun Nov 4 09:30:37 [interruptThread] removing socket file: /tmp/mongodb-27017.sock
Sun Nov 4 09:30:37 [interruptThread] shutdown: going to flush diaglog...
Sun Nov 4 09:30:37 [interruptThread] shutdown: going to close sockets...
Sun Nov 4 09:30:37 [interruptThread] shutdown: waiting for fs preallocator...
Sun Nov 4 09:30:37 [interruptThread] shutdown: lock for final commit...
Sun Nov 4 09:30:37 [interruptThread] shutdown: final commit...
Sun Nov 4 09:30:37 [interruptThread] shutdown: closing all files...
Sun Nov 4 09:30:37 [interruptThread] closeAllFiles() finished
Sun Nov 4 09:30:37 [interruptThread] journalCleanup...
Sun Nov 4 09:30:37 [interruptThread] removeJournalFiles
Sun Nov 4 09:30:37 [interruptThread] shutdown: removing fs lock...
Sun Nov 4 09:30:37 dbexit: really exiting now
[/code]
This task depends upon

Closed by  Felix Yan (felixonmars)
Monday, 05 November 2012, 07:08 GMT
Reason for closing:  Not a bug
Comment by Felix Yan (felixonmars) - Monday, 05 November 2012, 00:55 GMT
Hi, I cannot reproduce the problem:

$ mongo
MongoDB shell version: 2.2.1
connecting to: test
>

Did you have something like "fork = True" in your /etc/mongodb.conf? Remove it and try again if there is :)
Comment by Alexander (heaven) - Monday, 05 November 2012, 07:00 GMT
Oh, yes, that fixed the problem. Thank you!

Loading...