<div dir="ltr">Kieran,<div><br></div><div> Hmm, we could probably improve the error handling here and make the message a bit more useful.</div><div><br></div><div> The problem is probably one of:</div><div><br></div><div> 1) Permission problems accessing /tmp/osrm.lock</div><div> 2) Permission problems creating shared memory</div><div><br></div><div> Code 21 is:</div><div><br></div><div><div><font face="monospace, monospace">$ errno 21</font></div><div><font face="monospace, monospace">EISDIR 21 Is a directory</font></div></div><div><br></div><div> So I'd suspect some bad filesystem permissions somewhere. You can try running the `osrm-datastore` command under `strace` and see if you can spot the syscal that's failing with - that might give a hint as to what's going wrong.</div><div><br></div><div>daniel</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jan 26, 2018 at 8:57 AM, Kieran Caplice <span dir="ltr"><<a href="mailto:kieran.caplice@temetra.com" target="_blank">kieran.caplice@temetra.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
<br>
I'm wondering if anyone can help out with this error I'm getting when running osrm-datastore under a non-root user:<br>
<br>
root@htzh /opt/osrm # su - osrm -c "osrm-datastore /opt/osrm/data/planet-latest/p<wbr>lanet-latest.osrm"<br>
[info] Loading data into REGION_1<br>
[info] load names from: "/opt/osrm/data/planet-latest/<wbr>planet-latest.osrm.names"<br>
[info] Allocating shared memory of 96772768369 bytes<br>
[error] Error while attempting to allocate shared memory: Invalid argument, code 21<br>
terminate called after throwing an instance of 'osrm::util::exception'<br>
what(): Invalid argumentinclude/storage/shared<wbr>_memory.hpp:308<br>
root@htzh /opt/osrm # su - osrm -c "ulimit -a | grep max"<br>
max locked memory (kbytes, -l) 128849018880<br>
max memory size (kbytes, -m) unlimited<br>
max user processes (-u) 1031189<br>
<br>
Available shared memory for the user has been increased in /etc/security/limits.conf as per the wiki page, as shown above.<br>
<br>
The server has 256GB of RAM, with at least 200GB available most of the time. I successfully ran osrm-datastore and osrm-routed as the root user earlier, but we would ideally run it under a separate user.<br>
<br>
Thanks in advance.<br>
<br>
Kind regards,<br>
Kieran Caplice<br>
<br>
<br>
______________________________<wbr>_________________<br>
OSRM-talk mailing list<br>
<a href="mailto:OSRM-talk@openstreetmap.org" target="_blank">OSRM-talk@openstreetmap.org</a><br>
<a href="https://lists.openstreetmap.org/listinfo/osrm-talk" rel="noreferrer" target="_blank">https://lists.openstreetmap.or<wbr>g/listinfo/osrm-talk</a><br>
</blockquote></div><br></div>