How to install MapTiler Server on SELinux (RHEL)

This article describes the most common issues with the servers running on SELinux. It also contains tips for solving these issues.

For the process below to work MapTiler Server needs to have been successfully installed, if not, please follow How to run MapTiler Server on Linux. Following article use RHEL-8.2. as the reference system.

Issues with FUSE

MapTilerServer Linux packages use AppImage distribution format under the hood, which is based on FUSE.

If starting your server results in errors like this:

fuse: failed to exec fusermount: No such file or directory

You have to fix your FUSE setup. On reference system, this was easy to fix just with fuse install:

yum install fuse

In case you are not able to fix your FUSE setup, you can try to run the server this way

maptiler-server –appimage-extract-and-run –port=3650

Issues with tiles rasterization

Rasterization library we use in MapTiler Server requires execheap memory access. If your server is crashing with error similar to:

swiftshader-1cba0a9c3a8a1961514ac63cd3091c1a376fe84a/src/Reactor/ExecutableMemory.cpp:352 WARNING: ASSERT(result == 0)

it means that SELinux policies are preventing MapTiler Server from using this access mode.

Like with any other SELinux issues, checking the systemd journal can be helpful:

systemctl

You will find here something like:

SELinux is preventing maptiler-server from using the execheap access on a process.

You can disable this policy with:

setsebool -P selinuxuser_execheap 1

Or with help from utils you can create a local policy module to allow this access:

ausearch -c ‘maptiler-server’ –raw | audit2allow -M my-maptilerserver semodule -i my-maptilerserver.pp

You can try turning the SELinux off. But this is usually not what you want to do in production.