Date: Sun, 25 Mar 2018 02:04:20 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-ports-bugs@FreeBSD.org Subject: [Bug 226907] databases/mongodb36: failed to start mongod due to "limits: NO: No such file or directory" Message-ID: <bug-226907-13@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D226907 Bug ID: 226907 Summary: databases/mongodb36: failed to start mongod due to "limits: NO: No such file or directory" Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Many People Priority: --- Component: Individual Port(s) Assignee: freebsd-ports-bugs@FreeBSD.org Reporter: 0mp@FreeBSD.org CC: dev@dudu.ro CC: dev@dudu.ro Flags: maintainer-feedback?(dev@dudu.ro) When I try to start mongod with: sudo service mongod onestart I get the following output: > Starting mongod. > limits: NO: No such file or directory > /usr/local/etc/rc.d/mongod: WARNING: failed to start mongod I've not modified any configuration files yet. It looks like it is a problem with the `mongod_limits` knob, which has the following description: "Set to "NO" by default. Set it to yes to run `limit= s -e -U mongodb`". I decided to add `set -x` to /usr/local/etc/rc.d/mongod. It turns out that `mongod_limits` is an unfortunate name because of the line 1078 in /etc/rc.subr: _doit=3D"$_cd limits -C $_login_class $_limits $_doit" `_limits` is a variable set in line 957: _limits=3D\$${name}_limits _oomprotect=3D\$${name}_oomprotect whereas `${name}_limits` is described as follows:=20 # Name Needed Purpose # ${name}_limits n limits(1) to apply to ${command}. I believe that we have a name collision here as with `set -x` we can see th= at following command is executed (resulting in "limits: NO: No such file or directory"): limits -C daemon NO su -m mongodb -c 'sh -c "/usr/local/bin/mongod --logpath /var/db/mongodb/mongod.log --logappend --config /usr/local/etc/mongodb.conf --dbpath /var/db/mongodb --fork >/dev/null 2>/dev/null"' After renaming `mongod_limits` to `mongod_run_limits` in /usr/local/etc/rc.d/mongod the service runs just fine. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-226907-13>