English 中文(简体)
RabbitMQ 在Centos 5.5安装问题
原标题:RabbitMQ install issue on Centos 5.5

I ve been trying to get rabbitmq-server-2.4.0 up and running on Centos 5.5 on an Amazon AWS instance.

我的发言使用了以下格言: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)

希望得到任何帮助。

问题回答

The problem

在开始lang时,电文pthread/ethr_event.c:98: 等待__()(以英语发言):没有执行的职能(38),在现代动乱中,很可能是预设的Erlang binary与执行FUTEX_WAIT_PRIVATE和FUTEX_WAKE_PRIVATE的ker子互动的结果。 亚马孙煤油管公司规定,EC2不执行这些FUTEX_PRIVATE_宏观产品。

如果拆卸装置的舱面头板进入/usr/include/linux作为其他包裹的要求,则试图从来源建造Erlang可能失败。 (E.g.,Centos要求将Ckernel-headers 包裹作为获得、gcc-c++、glibc-devel和glibc-headers等的先决条件。) 由于包裹所安装的头盔与EC2图像制作文字所安装的纸浆不符,Errlang错误地假设FUTEX_WAIT_PRIVATE和FUTEX_WAKE_PRIVATE。

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:

#if defined(FUTEX_WAIT_PRIVATE) && defined(FUTEX_WAKE_PRIVATE)
#  define ETHR_FUTEX_WAIT__ FUTEX_WAIT_PRIVATE
#  define ETHR_FUTEX_WAKE__ FUTEX_WAKE_PRIVATE
#else
#  define ETHR_FUTEX_WAIT__ FUTEX_WAIT
#  define ETHR_FUTEX_WAKE__ FUTEX_WAKE
#endif

......

//#if defined(FUTEX_WAIT_PRIVATE) && defined(FUTEX_WAKE_PRIVATE)
//#  define ETHR_FUTEX_WAIT__ FUTEX_WAIT_PRIVATE
//#  define ETHR_FUTEX_WAKE__ FUTEX_WAKE_PRIVATE  
//#else
#  define ETHR_FUTEX_WAIT__ FUTEX_WAIT
#  define ETHR_FUTEX_WAKE__ FUTEX_WAKE
//#endif

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:

#include <sys/syscall.h>
#include <unistd.h>
#include <sys/time.h>
#include <errno.h>
#include <stdio.h>
#include <string.h>
#include <stdint.h>
typedef uint32_t u32; /* required on older kernel headers to fix a bug in futex.h Delete this line if it causes problems. */
#include <linux/futex.h>

int main(int argc, char *argv[])
{
#if defined(FUTEX_WAIT) && defined(FUTEX_WAKE) 
        uint32_t i = 1;
        int res = 0;
        res = syscall(__NR_futex, (void *) &i, FUTEX_WAKE, 1,
                        (void*)0,(void*)0, 0);
        if (res != 0)
        {
                printf("FUTEX_WAKE HAD ERR %i: %s
", errno, strerror(errno));
        } else {
                printf("FUTEX_WAKE SUCCESS
");
        }

        res = syscall(__NR_futex, (void *) &i, FUTEX_WAIT, 0,
                        (void*)0,(void*)0, 0);
        if (res != 0)
        {
                printf("FUTEX_WAIT HAD ERR %i: %s
", errno, strerror(errno));
        } else {
                printf("FUTEX_WAIT SUCCESS
");
        }
#else
        printf("FUTEX_WAKE and FUTEX_WAIT are not defined.
");
#endif

#if defined(FUTEX_WAIT_PRIVATE) && defined(FUTEX_WAKE_PRIVATE) 
        uint32_t j = 1;
        int res_priv = 0;
        res_priv = syscall(__NR_futex, (void *) &j, FUTEX_WAKE_PRIVATE, 1,
                        (void*)0,(void*)0, 0);
        if (res_priv != 0)
        {
                printf("FUTEX_WAKE_PRIVATE HAD ERR %i: %s
", errno, strerror(errno));
        } else {
                printf("FUTEX_WAKE_PRIVATE SUCCESS
");
        }

        res_priv = syscall(__NR_futex, (void *) &j, FUTEX_WAIT_PRIVATE, 0,
                        (void*)0,(void*)0, 0);
        if (res_priv != 0)
        {
                printf("FUTEX_WAIT_PRIVATE HAD ERR %i: %s
", errno, strerror(errno));
        } else {
                printf("FUTEX_WAIT_PRIVATE SUCCESS
");
        }
#else
        printf("FUTEX_WAKE_PRIVATE and FUTEX_WAIT_PRIVATE are not defined.
");
#endif


        return 0;
}

Paste it into futextest.c, 然后,gcc futextest.c and .a.out

如果你执行私人 f子,请见

FUTEX_WAKE SUCCESS
FUTEX_WAIT SUCCESS
FUTEX_WAKE_PRIVATE SUCCESS
FUTEX_WAIT_PRIVATE SUCCESS

如果你有没有职能,就请见

FUTEX_WAKE SUCCESS
FUTEX WAIT SUCCESS
FUTEX_WAKE_PRIVATE HAD ERR 38: Function not implemented
FUTEX_WAIT_PRIVATE HAD ERR 38: Function not implemented

这一固定办法应使埃尔兰能够汇编并产生一种环境,由你在上安装rabbitmq 。

我安装了该电梯,首先从源头安装了er:

sudo yum -y install make gcc gcc-c++ kernel-devel m4 ncurses-devel openssl-devel
wget http://www.erlang.org/download/otp_src_R13B04.tar.gz
tar xfvz otp_src_R13B04.tar.gz
cd otp_src_R13B04/
./configure
sudo make install

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(5月过期检查最新释放):

wget http://www.rabbitmq.com/releases/rabbitmq-server/v2.4.1/rabbitmq-server-2.4.1-1.noarch.rpm
rpm -Uvh rabbitmq-server-2.4.1-1.noarch.rpm

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

Seems that this kernel is notili with Erlang 14B, 14B01, or 14B02

由于Erlang 13B04公司串通,成功安装了Libbitmq-server

For people in the future finding this answer, the RabbitMQ site itself has a potential answer for you:

Installing on RPM-based-030 (CentOS, Fedora, OpenSuse, RedHat)

Erlang on RHEL 5 (and CentOS 5)

Due to the EPEL package update policy, EPEL 5 contains Erlang version R12B-5, which is relatively old. rabbitmq-server supports R12B-5, but performance may be lower than for more recent Erlang versions, and certain non-core features are not supported (SSL support, HTTP-based plugins including the management plugin). Therefore, we recommend that you install the most recent stable version of Erlang. The easiest way to do this is to use a package repository provided for this purpose by the owner of the EPEL Erlang package. Enable it by invoking (as root):

wget -O /etc/yum.repos.d/epel-erlang.repo http://repos.fedorapeople.org/repos/peter/erlang/epel-erlang.repo

and then install or update erlang with yum install erlang.

如果你在最低的监文安装上手法地踏上Erlang的路,你还可以发现,你需要安装WxGTK &wxGTK-devel,以便所有测试都能够正确进行建造和运行。





相关问题
How big can Erlang DETS be and what to do if its too small?

All I need is a large persistent lookup table in Erlang and dets seems like just the thing though I need a definative answer to: just how big the total size of the binaries in the table can be. how ...

passing events from erlang to Clojure

I m looking for a way to pass events back and forth between Clojure and erlang. has someone done this before? how should I encode the (immutable) messages in a flaxable general way? Should IPC be ...

How to send a push notification using Erlang?

I m trying to send a push notification to APNs using Erlang. This is the code I came up with so far: -module(apnstest2). -export([connect/0]). connect() -> application:start(ssl), ssl:...

How do I build a DNS Query record in Erlang?

I am building a native Bonjour / Zeroconf library and need to build DNS query records to broadcast off to the other machines. I have tried looking thru the Erlang source code but as I am relatively ...

AccessViolation when calling unmanaged dll

When calling an unmanaged Dll from a c# application I get an AccessViolationException. The strange thing is that the exported function has no arguments, so the problem is not in the Marshalling of ...

How to enable active sockets in a Mochiweb application?

Does anyone know how to enable active instead of passive sockets in a Mochiweb application. Specifically, I am trying to adapt http://www.metabrew.com/article/a-million-user-comet-application-with-...

How to convert numbers to words in Erlang?

I found this interesting question about converting numbers into "words": Code Golf: Number to Words I would really like to see how you would implement this efficiently in Erlang.