<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Le 20/10/2016 à 17:36, Aaron Ogle a
écrit :<br>
</div>
<blockquote
cite="mid:CAGX5j1y7KNihcAvHGpXRrs9emHPXxSGteY5AWUOrm=SsxyCsAQ@mail.gmail.com"
type="cite">
<div dir="ltr">Hey guys,<br>
</div>
</blockquote>
<br>
Hey Aaron,<br>
<blockquote
cite="mid:CAGX5j1y7KNihcAvHGpXRrs9emHPXxSGteY5AWUOrm=SsxyCsAQ@mail.gmail.com"
type="cite">
<div dir="ltr"><br>
With our Rocket.Chat server snap. We've had several cases now
where users come to us trying to figure out why it hasn't
started yet after installing.<br>
<br>
Our snap: <a moz-do-not-send="true"
href="https://github.com/RocketChat/Rocket.Chat/blob/develop/.snapcraft/stable/snapcraft.yaml">https://github.com/RocketChat/Rocket.Chat/blob/develop/.snapcraft/stable/snapcraft.yaml</a><br>
<br>
rocketchat-mongo:<br>
command: env LC_ALL=C mongod --smallfiles --dbpath=$SNAP_COMMON
<br>
</div>
</blockquote>
<br>
This is correct, and the generated wrapper (just checked, downloaded
it from the store) is doing:<br>
exec "env" LC_ALL=C mongod --smallfiles --dbpath=$SNAP_COMMON "$@"<br>
<br>
<blockquote
cite="mid:CAGX5j1y7KNihcAvHGpXRrs9emHPXxSGteY5AWUOrm=SsxyCsAQ@mail.gmail.com"
type="cite">
<div dir="ltr"><br>
After explaining to them how to get logs, it will say our mongo
install is missing the dbpath.<br>
<br>
The exact error they are getting:<br>
<div>
<div><span
style="color:rgb(68,68,68);font-family:-apple-system,blinkmacsystemfont,roboto,'helvetica
neue',arial,sans-serif,'apple color emoji','segoe
ui','segoe ui emoji','segoe ui symbol','meiryo
ui';font-size:14px;line-height:20px;background-color:rgb(249,249,249)">Error
parsing command line: the argument for option '--dbpath'
should follow immediately after the equal sign</span><br>
</div>
<div><span
style="color:rgb(68,68,68);font-family:-apple-system,blinkmacsystemfont,roboto,'helvetica
neue',arial,sans-serif,'apple color emoji','segoe
ui','segoe ui emoji','segoe ui symbol','meiryo
ui';font-size:14px;line-height:20px;background-color:rgb(249,249,249)"><br>
</span></div>
This seems like for some reason SNAP_COMMON isn't getting set.
<div><br>
</div>
<div>I've confirmed that they are using version 2.15 of snap /
snapd.</div>
<div><br>
</div>
I also asked them to drop into the snap: sudo snap run --shell
rocketchat-server<br>
<br>
Then do an: env to see if SNAP_COMMON is even set. From there
it does seem to be set. <br>
</div>
</div>
</blockquote>
Is it the case as well for you? I just tried this and:<br>
<br>
didrocks@tidus:~$ sudo snap run --shell rocketchat-server<br>
root@tidus:/home/didrocks# env | grep SNAP_COMMON<br>
SNAP_COMMON=/var/snap/rocketchat-server/common<br>
<br>
So, it's set for me, CCing Zyga who might have an idea if there are
some cases where snap-confine doesn't set those variables…<br>
<br>
Cheers,<br>
Didier<br>
</body>
</html>