Ubuntu rabbitmq-server启动时遇到过的5种错误

    xiaoxiao2022-07-03  177

    这里用的erlang版本 21.1,openssl 版本1.1.0g,RabbitMQ版本 3.7.15

    1 undef

    Error description: init:do_boot/3 init:start_em/1 rabbit:start_it/1 line 478 rabbit:'-boot/0-fun-0-'/0 line 329 rabbit_node_monitor:prepare_cluster_status_files/0 line 106 rabbit_mnesia:ensure_mnesia_dir/0 line 571 mnesia:system_info(directory) error:undef

    undef错误为没安装erlang或各类依赖没安装全

    erlang安装步骤

    在erlang官网下载otp_src_21.1.tar.gzrz导入Ubuntu后 tar -xvf otp_src_21.1.tar.gz cd otp_src_21.1 ./configure --prefix=/usr/local/erlang21 --with-ssl --enable-threads --enable-smp-support --enable-kernel-poll --enable-hipe --without-javac make -j 4 make install

    各种依赖

    sudo apt-get install build-essential sudo apt-get install libncurses5-dev sudo apt-get install libssl-dev sudo apt-get install m4 sudo apt-get install unixodbc unixodbc-dev sudo apt-get install xsltproc sudo apt-get install fop sudo apt-get install tk8.5

    2 找不见erl命令

    解决:修改环境变量

    sudo vi /etc/profile

    添上一行安装位置:

    export PATH=$PATH:/usr/local/erlang21/bin

    3 cannot connect to host/port

    ERROR: epmd error for host ubuntu-server: address (cannot connect to host/port)

    解决:

    sudo vi /etc/hosts

    在里面添上一行

    127.0.0.1 ubuntu-server(你的主机名)

    4 erlang版本太低

    卸载:https://blog.csdn.net/wudixiaotie/article/details/84719722 然后按上面的步骤安装新的

    5 missing_dependencies,[crypto,ssl]

    Error description: init:do_boot/3 init:start_em/1 rabbit:start_it/1 line 478 rabbit:broker_start/0 line 352 rabbit_plugins:prepare_plugins/1 line 307 rabbit_plugins:ensure_dependencies/1 line 282 throw:{error,{missing_dependencies,[crypto,ssl], [amqp10_client,cowboy,cowlib,rabbitmq_aws, rabbitmq_management, rabbitmq_management_agent,rabbitmq_shovel, rabbitmq_trust_store]}}

    首先看是否安装openssl

    openssl version

    查看版本看看 openssl安装步骤

    sudo apt-get install openssl

    wget http://www.openssl.org/source/openssl-1.1.0g.tar.gz tar -zxf openssl-1.1.0g.tar.gz cd openssl-1.1.0g ./config --prefix=/usr/bin/ssl sed -i "s|CFLAG= |CFLAG= -fPIC |" Makefile make make install

    安装完后重新做安装erlang21操作,带上ssl

    ./configure --prefix=/usr/local/erlang21 --with-ssl --enable-threads --enable-smp-support --enable-kernel-poll --enable-hipe --without-javac

    若已安装的出错,同样做安装erlang21操作,带上ssl 若还出错,可能是版本过低

    最新回复(0)