Loading [MathJax]/jax/output/HTML-CSS/config.js

Salome OSError: [Errno 13] Permission denied

I recently came across an error with Salome on CentOS7 running on an Amazon Webservice instances which dumped a mysterious “OSError: [Errno 13] Permission denied”, with the full stack trace looking like:

1runSalome running on ip-address-hidden.compute.internal
2ERROR:salomeContext:Unexpected error:
3Traceback (most recent call last):
4File "/home/centos/SALOME-8.2.0-CO7.2/BINARIES-CO7.2/SALOME/bin/salome/salomeContext.py", line 257, in _startSalome
5res = getattr(self, command)(options) # run appropriate method
6File "/home/centos/SALOME-8.2.0-CO7.2/BINARIES-CO7.2/SALOME/bin/salome/salomeContext.py", line 316, in _runAppli
7runSalome.runSalome()
8File "/home/centos/SALOME-8.2.0-CO7.2/BINARIES-CO7.2/KERNEL/bin/salome/runSalome.py", line 843, in runSalome
9clt,args = main()
10File "/home/centos/SALOME-8.2.0-CO7.2/BINARIES-CO7.2/KERNEL/bin/salome/runSalome.py", line 770, in main
11searchFreePort(args, save_config, args.get('useport'))
12File "/home/centos/SALOME-8.2.0-CO7.2/BINARIES-CO7.2/KERNEL/bin/salome/searchFreePort.py", line 117, in searchFreePort
13queue = Queue()
14File "/home/centos/SALOME-8.2.0-CO7.2/BINARIES-CO7.2/Python/lib/python2.7/multiprocessing/__init__.py", line 218, in Queue
15return Queue(maxsize)
16File "/home/centos/SALOME-8.2.0-CO7.2/BINARIES-CO7.2/Python/lib/python2.7/multiprocessing/queues.py", line 63, in __init__
17self._rlock = Lock()
18File "/home/centos/SALOME-8.2.0-CO7.2/BINARIES-CO7.2/Python/lib/python2.7/multiprocessing/synchronize.py", line 147, in __init__
19SemLock.__init__(self, SEMAPHORE, 1, 1)
20File "/home/centos/SALOME-8.2.0-CO7.2/BINARIES-CO7.2/Python/lib/python2.7/multiprocessing/synchronize.py", line 75, in __init__
21sl = self._semlock = _multiprocessing.SemLock(kind, value, maxvalue)
22OSError: [Errno 13] Permission denied

I’m still not sure what caused the error but I’d made two changes to the AMI before I noticed this:

  1. Updated CentOS7 to the latest patch release via yum
  2. Changed the AMI to a lower spec with less RAM

I suspect the second was what caused the problem but it turns out that Salome needs access to the shared RAM facility.  My temporary fix is:

1sudo chmod 777 /dev/shm

I’d like to find a better long term fix through.

Finally, thanks for reading this article and please leave a comment below. If you are interested in being updated when similar items are posted then either subscribe via RSS or sign up to my mailing list below.

Site Footer