Rabbitmq /usr/local/etc/rabbitmq/rabbitmq-env.conf丢失 [英] Rabbitmq /usr/local/etc/rabbitmq/rabbitmq-env.conf Missing

查看:891
本文介绍了Rabbitmq /usr/local/etc/rabbitmq/rabbitmq-env.conf丢失的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚使用以下命令在AWS EC2-Instance(CentOS)上安装RabbitMQ

I just installed RabbitMQ on an AWS EC2-Instance (CentOS) using the following,

sudo yum install erlang

sudo yum install rabbitmq-server

我随后能够成功打开它使用,

I was then able to successfully turn it on using,

sudo chkconfig rabbitmq-server on

sudo /sbin/service rabbitmq-server start

...and

sudo /sbin/service rabbitmq-server stop

sudo sudo rabbitmq-server run in foreground;

但是现在我试图修改 / usr / local / etc /rabbitmq/rabbitmq-env.conf 文件,因此我可以更改 NODE_IP_ADDRESS ,但该文件在哪里都找不到。

But now I'm trying to modify the /usr/local/etc/rabbitmq/rabbitmq-env.conf file so I can change the NODE_IP_ADDRESS but the file is no where to be found.

没有rabbitmq文件夹,

No rabbitmq folder under,

[ec2-user@ip-0-0-0-0 sbin]$ ls /usr/local/etc
[ec2-user@ip-0-0-0-0 sbin]$

/ etc 下有一个Rabbitmq文件夹,但是里面什么也没有,

There's a rabbitmq folder under /etc but there's nothing in it,

[ec2-user@ip-0-0-0-0 rabbitmq]$ pwd
/etc/rabbitmq
[ec2-user@ip-0-0-0-0 rabbitmq]$ ls
[ec2-user@ip-0-0-0-0 rabbitmq]$

在我的Rabbitmq环境变量中唯一的事情是

And the only thing in my environment variables for rabbitmq is this

[ec2-user@ip-0-0-0-0 rabbitmq]$ printenv | grep rabbit
PWD=/etc/rabbitmq

我能够去到Rabbitmq日志并找到此信息,

I was able to go to the location of the rabbitmq logs and find this information,

root@ip-0-0-0-0
[/var/log/rabbitmq]# pwd
/var/log/rabbitmq
root@ip-0-0-0-0
[/var/log/rabbitmq]# ls -al
total 20
drwxr-x---  2 rabbitmq rabbitmq 4096 Jun  7 17:28 .
drwxr-xr-x 10 root     root     4096 Jun  7 17:23 ..
-rw-r--r--  1 rabbitmq rabbitmq 3638 Jun  7 17:33 rabbit@ip-0-0-0-0.log
-rw-r--r--  1 rabbitmq rabbitmq    0 Jun  7 17:25 rabbit@ip-0-0-0-0-sasl.log
-rw-r--r--  1 root     root        0 Jun  7 17:28 shutdown_err
-rw-r--r--  1 root     root       65 Jun  7 17:28 shutdown_log
-rw-r--r--  1 root     root        0 Jun  7 17:25 startup_err
-rw-r--r--  1 root     root      385 Jun  7 17:28 startup_log


cat rabbit@ip-0-0-0-0.log

=INFO REPORT==== 7-Jun-2018::17:29:01 ===
node           : rabbit@ip-0-0-0-0
home dir       : /var/lib/rabbitmq
config file(s) : (none)
cookie hash    : W/uaA12+PF+KOIbCmdKTkw==
log            : /var/log/rabbitmq/rabbit@ip-0-0-0-0.log
sasl log       : /var/log/rabbitmq/rabbit@ip-0-0-0-0-sasl.log
database dir   : /var/lib/rabbitmq/mnesia/rabbit@ip-0-0-0-0

/ var / lib / rabbitmq 包含此内容,

[/var/lib/rabbitmq/mnesia]# cd /var/lib/rabbitmq/
root@ip-0-0-0-0
[/var/lib/rabbitmq]# ls
mnesia

[/var/lib/rabbitmq/mnesia]# pwd
/var/lib/rabbitmq/mnesia
root@ip-0-0-0-0
[/var/lib/rabbitmq/mnesia]# ls -al
total 20
drwxr-xr-x 4 rabbitmq rabbitmq 4096 Jun  7 17:29 .
drwxr-x--- 3 rabbitmq rabbitmq 4096 Jun  7 17:25 ..
drwxr-xr-x 4 rabbitmq rabbitmq 4096 Jun  7 17:35 rabbit@ip-0-0-0-0
-rw-r--r-- 1 rabbitmq rabbitmq    5 Jun  7 17:28 rabbit@ip-0-0-0-0.pid
drwxr-xr-x 2 rabbitmq rabbitmq 4096 Jun  7 17:29 rabbit@ip-0-0-0-0-plugins-expand
root@ip-0-0-0-0

然后,

[/var/lib/rabbitmq/mnesia/rabbit@ip-0-0-0-0]# pwd
/var/lib/rabbitmq/mnesia/rabbit@ip-0-0-0-0
root@ip-0-0-0-0
[/var/lib/rabbitmq/mnesia/rabbit@ip-0-0-0-0]# ls -al
total 100
drwxr-xr-x 4 rabbitmq rabbitmq  4096 Jun  7 17:35 .
drwxr-xr-x 4 rabbitmq rabbitmq  4096 Jun  7 17:29 ..
-rw-r--r-- 1 rabbitmq rabbitmq    59 Jun  7 17:29 cluster_nodes.config
-rw-r--r-- 1 rabbitmq rabbitmq   160 Jun  7 17:35 DECISION_TAB.LOG
-rw-r--r-- 1 rabbitmq rabbitmq    99 Jun  7 17:35 LATEST.LOG
drwxr-xr-x 2 rabbitmq rabbitmq  4096 Jun  7 17:29 msg_store_persistent
drwxr-xr-x 2 rabbitmq rabbitmq  4096 Jun  7 17:29 msg_store_transient
-rw-r--r-- 1 rabbitmq rabbitmq    29 Jun  7 17:29 nodes_running_at_shutdown
-rw-r--r-- 1 rabbitmq rabbitmq  1123 Jun  7 17:29 rabbit_durable_exchange.DCD
-rw-r--r-- 1 rabbitmq rabbitmq  2422 Jun  7 17:32 rabbit_durable_exchange.DCL
-rw-r--r-- 1 rabbitmq rabbitmq     8 Jun  7 17:25 rabbit_durable_queue.DCD
-rw-r--r-- 1 rabbitmq rabbitmq     8 Jun  7 17:25 rabbit_durable_route.DCD
-rw-r--r-- 1 rabbitmq rabbitmq     8 Jun  7 17:25 rabbit_runtime_parameters.DCD
-rw-r--r-- 1 rabbitmq rabbitmq     3 Jun  7 17:29 rabbit_serial
-rw-r--r-- 1 rabbitmq rabbitmq   344 Jun  7 17:35 rabbit_user.DCD
-rw-r--r-- 1 rabbitmq rabbitmq   193 Jun  7 17:29 rabbit_user_permission.DCD
-rw-r--r-- 1 rabbitmq rabbitmq   461 Jun  7 17:35 rabbit_user_permission.DCL
-rw-r--r-- 1 rabbitmq rabbitmq   134 Jun  7 17:29 rabbit_vhost.DCD
-rw-r--r-- 1 rabbitmq rabbitmq   289 Jun  7 17:32 rabbit_vhost.DCL
-rw-r--r-- 1 rabbitmq rabbitmq 19108 Jun  7 17:25 schema.DAT
-rw-r--r-- 1 rabbitmq rabbitmq   233 Jun  7 17:25 schema_version

最后但并非最不明显的是,日志显示没有't一个配置文件,

And last but not least apparently the logs say there isn't a config file,

[/var/log/rabbitmq]# cat rabbit\@ip-0-0-0-0.log | grep config
config file(s) : (none)
config file(s) : (none)

RabbitMQ版本: {rabbit, RabbitMQ, 3.1.5}

RabbitMQ Version: {rabbit,"RabbitMQ","3.1.5"}

有人知道这是怎么回事吗?我很惊讶,当我启动 rabbitmq-server 时没有看到任何错误。我只是自己创建配置文件吗?

Does anyone know what's going on here? I'm surprised I didn't see any errors when I started the rabbitmq-server. Do I just create the config files myself?

更新:

我当时是为我的Apache Airflow设置集群环境,因此我使用CeleryExecutor对其进行了配置,并将Queue设置为RabbitMQ。原来我正在使用不包含 systemd ,所以我无法正确安装RabbitMQ。如果我使用Amazon Linux 2或Ubuntu或任何其他性能不错的Linux制造服务器,那么我可能会在安装RabbitMQ并使其与Airflow一起使用方面获得进一步的发展。因此,我继续使用AWS SQS作为队列,然后运行此错误。因此,到现在为止,我已经浪费了超过两天半的时间,试图让一个队列来处理Celery和Airflow,我读到这篇文章指出,Airbnb(Airflow的创建者)正在将Celery和Redis用作队列。所以我尝试了一下,花了我三分钟的时间,它才能正常工作....我所做的就是使用 sudo yum install redis 下载Redis,然后我得到了bam Redis已安装。 我使用 redis服务器启动Redis。然后我将 airflow.cfg broker_url字段更改为 broker_url = redis:// ,运行 airflow initdb ,重新启动调度程序 airflow Scheduler ,然后启动工作程序 airflow worker 和BAM我的DAG开始使用Redis队列和CeleryExecutor运行。 HALLELUJAH仅将Redis用作您的队列...。

I was setting up a cluster environment for my Apache Airflow and so I was configuring it with the CeleryExecutor and setting up the Queue to be RabbitMQ. Turns out I'm running my EC2-Instance with Amazon Linux 1 which doesn't include systemd so I wasn't able to get RabbitMQ properly installed. Had I made my server using Amazon Linux 2 or Ubuntu, or any other Linux that doesn't suck I could have potentially gotten further in installing RabbitMQ and getting it to work with Airflow. So I went on to using AWS SQS for my queue and then I ran into this error. So by now I've wasted over two and a half days trying to just get a queue to work with Celery and Airflow and I read this article which says that Airbnb (the creators of Airflow) are using Celery with Redis as their Queue. So I tried it out and it literally took me three minutes to do and it's working flawlessly.... All I did was download Redis using sudo yum install redis then bam I had Redis installed. I started Redis using redis-server. Then I changed my airflow.cfg broker_url field to broker_url = redis://, ran airflow initdb, restarted the scheduler airflow scheduler, then started a worker airflow worker and BAM my DAGs started running using the Redis queue and CeleryExecutor. HALLELUJAH just use Redis as your queue....

推荐答案

RabbitMQ团队监控 rabbitmq-users 邮件列表有时仅回答关于StackOverflow的问题。

The RabbitMQ team monitors the rabbitmq-users mailing list and only sometimes answers questions on StackOverflow.

您应该使用的是RabbitMQ的最新版本( 3.7.5 )和Erlang 19.3 或更高版本。版本 3.1.5 非常老。请参阅此文件,以获取有关如何在基于rpm的计算机上安装最新RMQ的说明。发行版。

You should be using the latest version of RabbitMQ (3.7.5) and Erlang 19.3 or later. Version 3.1.5 is very, very, very old. Please see this document for instructions on how to install a recent RMQ on an rpm-based distro.

之后,您将自己创建 rabbitmq-env.conf

这篇关于Rabbitmq /usr/local/etc/rabbitmq/rabbitmq-env.conf丢失的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆