I've been trying to get rabbitmq-server-2.4.0 up and running on Centos 5.5 on an Amazon AWS instance.
My instance uses the following kernel: 2.6.18-xenU-ec2-v1.2
I've tried installation of erlang and rabbitmq-server using: 1) yum repos 2) direct rpm installation 3) compiling from source.
In every case, I get the following message when attempting to start the RabbitMQ-Server process:
pthread/ethr_event.c:98: Fatal error in wait__(): Function not implemented (38)
Any help would be appreciated.
Seems that this kernel is not compatible with Erlang 14B, 14B01, or 14B02
Compiling Erlang 13B04 led to a successful install of rabbitmq-server
For people in the future finding this answer, the RabbitMQ site itself has a potential answer for you:
Installing on RPM-based Linux (CentOS, Fedora, OpenSuse, RedHat)
If you go down the route of building Erlang manually on a minimal OS install, you may also find that you need to install wxGTK & wxGTK-devel in order for all of the tests to build and run correctly.
I installed it by first installing erlang by source:
After that create a symbolic link to also make erl available for root user:
sudo ln -s /usr/local/bin/erl /bin/erl
Install rabbitmq rpm (Maybe outdated check latest release yourself):
If erlang is installed from source, rpm install of rabbitmq fails to recognize erlang stating that erlang R12B-3 is required.
Use:
rpm --nodeps -Uvh rabbitmq-server-2.6.1-1.noarch.rpm
I was able to install and use RabbitMQ 2.6.1 successfully on CentOS 5.6 with Erlang R14B04
The problem
When starting erlang, the message
pthread/ethr_event.c:98: Fatal error in wait__(): Function not implemented (38)
is, on modern distros, most likely the result of a precompiled Erlang binary interacting with a kernel that doesn't implement FUTEX_WAIT_PRIVATE and FUTEX_WAKE_PRIVATE. The kernels Amazon provides for EC2 do not implement these FUTEX_PRIVATE_ macros.Attempting to build Erlang from source on an ec2 box may fail in the same way if the distro installs kernel headers into /usr/include/linux as a requirement of other packages. (E.g., Centos requires the kernel-headers package as a prerequisite for gcc, gcc-c++, glibc-devel and glibc-headers, among others). Since the headers installed by the package do not match the kernel installed by the EC2 image creation scripts, Erlang incorrectly assumes FUTEX_WAIT_PRIVATE and FUTEX_WAKE_PRIVATE are available.
The fix
To fix it, the fastest is to manually patch
erts/include/internal/pthread/ethr_event.h
to use the non-_PRIVATE futex implementation:should become
Quick test
If you suspect the private futex issue is your problem, but want to verify it before you recompile all of Erlang, the following program can pin it down:
Paste it into
futextest.c
, thengcc futextest.c
and./a.out
.If your kernel implements private futexes, you'll see
If you have a kernel without the _PRIVATE futex functions, you'll see
This fix should allow Erlang to compile, and will yield an environment you can install rabbitmq against using the --nodeps method discussed here.