[MacPorts] #49290: mongodb does not start after upgrade to El Capitan
#49290: mongodb does not start after upgrade to El Capitan --------------------------+-------------------------------- Reporter: coviex@… | Owner: macports-tickets@… Type: defect | Status: new Priority: High | Milestone: Component: ports | Version: 2.3.4 Keywords: start dbpath | Port: mongodb --------------------------+-------------------------------- I'm new to mongo so I'm sorry if solution is obvious. but it was working out of the box before. {{{ $ mongo MongoDB shell version: 3.0.6 connecting to: test 2015-10-15T09:52:06.325+0300 W NETWORK Failed to connect to 127.0.0.1:27017, reason: errno:61 Connection refused 2015-10-15T09:52:06.327+0300 E QUERY Error: couldn't connect to server 127.0.0.1:27017 (127.0.0.1), connection attempt failed at connect (src/mongo/shell/mongo.js:179:14) at (connect):1:6 at src/mongo/shell/mongo.js:179 exception: connect failed $ mongod 2015-10-15T09:52:34.208+0300 E NETWORK [initandlisten] Failed to unlink socket file /tmp/mongodb-27017.sock errno:13 Permission denied 2015-10-15T09:52:34.208+0300 I - [initandlisten] Fatal Assertion 28578 2015-10-15T09:52:34.208+0300 I - [initandlisten] ***aborting after fassert() failure $ sudo mongod 2015-10-15T09:50:35.930+0300 I STORAGE [initandlisten] exception in initAndListen: 29 Data directory /data/db not found., terminating 2015-10-15T09:50:35.930+0300 I CONTROL [initandlisten] dbexit: rc: 100 }}} -- Ticket URL: <https://trac.macports.org/ticket/49290> MacPorts <https://www.macports.org/> Ports system for OS X
#49290: mongodb does not start after upgrade to El Capitan -----------------------+-------------------------- Reporter: coviex@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: elcapitan Port: mongodb | -----------------------+-------------------------- Changes (by ryandesign@…): * keywords: start dbpath => elcapitan * owner: macports-tickets@… => ryandesign@… * priority: High => Normal -- Ticket URL: <https://trac.macports.org/ticket/49290#comment:1> MacPorts <https://www.macports.org/> Ports system for OS X
#49290: mongodb does not start after upgrade to El Capitan -----------------------+-------------------------- Reporter: coviex@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: elcapitan Port: mongodb | -----------------------+-------------------------- Comment (by ryandesign@…): Does the directory /data/db actually exist? -- Ticket URL: <https://trac.macports.org/ticket/49290#comment:2> MacPorts <https://www.macports.org/> Ports system for OS X
#49290: mongodb does not start after upgrade to El Capitan -----------------------+-------------------------- Reporter: coviex@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: elcapitan Port: mongodb | -----------------------+-------------------------- Comment (by coviex@…): no /data, no /opt/local/data. and I did not delete it. -- Ticket URL: <https://trac.macports.org/ticket/49290#comment:3> MacPorts <https://www.macports.org/> Ports system for OS X
#49290: mongodb does not start after upgrade to El Capitan -----------------------+-------------------------- Reporter: coviex@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: elcapitan Port: mongodb | -----------------------+-------------------------- Comment (by ryandesign@…): Ok, then the error message that /data/db was not found is correct. Did you configure your mongodb to look there, or is that where it decided to look on its own? Where would you like to store your databases? -- Ticket URL: <https://trac.macports.org/ticket/49290#comment:4> MacPorts <https://www.macports.org/> Ports system for OS X
#49290: mongodb does not start after upgrade to El Capitan -----------------------+-------------------------- Reporter: coviex@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: elcapitan Port: mongodb | -----------------------+-------------------------- Comment (by ryandesign@…): Looking into this a little further, it looks like /data/db is the default directory where mongod looks for databases, if not told otherwise. You just ran "mongod" without any arguments, so it used the default database directory /data/db. In MacPorts, you're not intended to run "mongod" manually. Instead, you're intended to use "sudo port load mongod" which will launch mongod with a number of arguments, one of which specifies that databases should go in /opt/local/var/db/mongodb. The port has already created this directory for you with the correct ownership. -- Ticket URL: <https://trac.macports.org/ticket/49290#comment:5> MacPorts <https://www.macports.org/> Ports system for OS X
#49290: mongodb does not start after upgrade to El Capitan -----------------------+-------------------------- Reporter: coviex@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: elcapitan Port: mongodb | -----------------------+-------------------------- Comment (by coviex@…): I guess my bug report is misleading. I do use {{{ sudo port load mongodb }}} but then I get {{{ $ mongo MongoDB shell version: 3.0.6 connecting to: test 2015-10-15T11:30:31.052+0300 W NETWORK Failed to connect to 127.0.0.1:27017, reason: errno:61 Connection refused 2015-10-15T11:30:31.053+0300 E QUERY Error: couldn't connect to server 127.0.0.1:27017 (127.0.0.1), connection attempt failed at connect (src/mongo/shell/mongo.js:179:14) at (connect):1:6 at src/mongo/shell/mongo.js:179 exception: connect failed }}} so I unload mongodb and launch it manually. I did not know that port's and mongodb's default data paths were different. I do have /opt/local/var/db/mongodb. So I guess the only problem is I cannot connect to mongod whatever is the reason. -- Ticket URL: <https://trac.macports.org/ticket/49290#comment:6> MacPorts <https://www.macports.org/> Ports system for OS X
#49290: mongodb does not start after upgrade to El Capitan -----------------------+-------------------------- Reporter: coviex@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: elcapitan Port: mongodb | -----------------------+-------------------------- Comment (by ryandesign@…): After running "sudo port load mongodb", try running "ps auxww | grep [m]ongod" to see if any mongod processes are actually running. Also, check if there's anything notable in the log file, which is at /opt/local/var/log/mongodb/mongodb.log -- Ticket URL: <https://trac.macports.org/ticket/49290#comment:7> MacPorts <https://www.macports.org/> Ports system for OS X
#49290: mongodb does not start after upgrade to El Capitan -----------------------+-------------------------- Reporter: coviex@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: elcapitan Port: mongodb | -----------------------+-------------------------- Comment (by coviex@…): Replying to [comment:7 ryandesign@…]:
After running "sudo port load mongodb", try running "ps auxww | grep [m]ongod" to see if any mongod processes are actually running. Also, check if there's anything notable in the log file, which is at /opt/local/var/log/mongodb/mongodb.log no mongod, nothing in log since like 2 weeks ago
-- Ticket URL: <https://trac.macports.org/ticket/49290#comment:8> MacPorts <https://www.macports.org/> Ports system for OS X
#49290: mongodb does not start after upgrade to El Capitan -----------------------+-------------------------- Reporter: coviex@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: elcapitan Port: mongodb | -----------------------+-------------------------- Comment (by coviex@…): this is the only way I could make it work: {{{ $ sudo mongod --port=27017 --bind_ip=127.0.0.1 --logpath=/opt/local/var/log/mongodb/mongodb.log --dbpath=/opt/local/var/db/mongodb --logappend }}} {{{ $ mongo MongoDB shell version: 3.0.6 connecting to: test Server has startup warnings: 2015-10-16T18:39:48.602+0300 I CONTROL [initandlisten] ** WARNING: You are running this process as the root user, which is not recommended. 2015-10-16T18:39:48.602+0300 I CONTROL [initandlisten] 2015-10-16T18:39:48.602+0300 I CONTROL [initandlisten] 2015-10-16T18:39:48.602+0300 I CONTROL [initandlisten] ** WARNING: soft rlimits too low. Number of files is 256, should be at least 1000
}}} -- Ticket URL: <https://trac.macports.org/ticket/49290#comment:9> MacPorts <https://www.macports.org/> Ports system for OS X
#49290: mongodb does not start after upgrade to El Capitan -----------------------+-------------------------- Reporter: coviex@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: elcapitan Port: mongodb | -----------------------+-------------------------- Comment (by coviex@…): update to new port mongodb@3.0.7 does not help. still {{{ $ ls -la /opt/local/var/db/ total 0 drwxr-xr-x 5 root admin 170 Oct 26 23:00 . drwxr-xr-x 8 root admin 272 Oct 10 09:37 .. drwxr-xr-x 11 _mongo _mongo 374 Oct 26 23:08 mongodb drwxr-xr-x 14 _mysql _mysql 476 Oct 26 14:40 mysql56 $ ls -la /opt/local/var/db/mongodb/ total 327696 drwxr-xr-x 11 _mongo _mongo 374 Oct 26 23:08 . drwxr-xr-x 5 root admin 170 Oct 26 23:00 .. -rw-r--r-- 1 root _mongo 0 Oct 26 23:00 .turd_mongodb $ id _mongo uid=500(_mongo) gid=504(_mongo) groups=504(_mongo),12(everyone),61(localaccounts),702(com.apple.sharepoint.group.1),100(_lpoperator) }}} -- Ticket URL: <https://trac.macports.org/ticket/49290#comment:10> MacPorts <https://www.macports.org/> Ports system for OS X
#49290: mongodb does not start after upgrade to El Capitan -----------------------+-------------------------- Reporter: coviex@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: elcapitan Port: mongodb | -----------------------+-------------------------- Comment (by ryandesign@…): Replying to [comment:10 coviex@…]:
update to new port mongodb@3.0.7 does not help.
I agree, but I do not know what the solution is. -- Ticket URL: <https://trac.macports.org/ticket/49290#comment:11> MacPorts <https://www.macports.org/> Ports system for OS X
#49290: mongodb does not start after upgrade to El Capitan -----------------------+-------------------------- Reporter: coviex@… | Owner: ryandesign@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.3.4 Resolution: | Keywords: elcapitan Port: mongodb | -----------------------+-------------------------- Comment (by marc@…): I have the exact same problem every time I upgrade the `mongodb` port. Here is how I fix it: {{{ sudo port unload mongodb cd /opt/local/var/db/mongodb/ sudo chown _mongo idp.ns sudo chown _mongo idp.0 sudo chown _mongo local.0 sudo chown _mongo local.ns sudo port load mongodb }}} I suspect there is a problem with the port installation. -- Ticket URL: <https://trac.macports.org/ticket/49290#comment:12> MacPorts <https://www.macports.org/> Ports system for OS X
participants (1)
-
MacPorts