Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

esl-erlang-compat is not needed for 'esl install method' #360

Closed
chrisduong opened this issue Apr 28, 2016 · 5 comments
Closed

esl-erlang-compat is not needed for 'esl install method' #360

chrisduong opened this issue Apr 28, 2016 · 5 comments

Comments

@chrisduong
Copy link

chrisduong commented Apr 28, 2016

Hi,

It happened accidentally when I installed RabbitMQ v3.6.1, and I saw the repeated error in the startup_log.

Error in log handler

Event: {info_report,<0.9.0>,
{<0.32.0>,progress,
[{supervisor,{local,kernel_safe_sup}},
{started,[{pid,<0.313.0>},
{name,pg_local},
{mfargs,{pg_local,start_link,[]}},
{restart_type,permanent},
{shutdown,4294967295},
{child_type,worker}]}]}}
Error: function_clause
Stack trace: [{error_logger_file_h,write_event,
[{<0.46.0>,"/var/log/rabbitmq/[email protected]",[]},
{info_report,<0.9.0>,
{<0.32.0>,progress,
[{supervisor,{local,kernel_safe_sup}},
{started,
[{pid,<0.313.0>},
{name,pg_local},
{mfargs,{pg_local,start_link,[]}},
{restart_type,permanent},
{shutdown,4294967295},
{child_type,worker}]}]}}],
[{file,"error_logger_file_h.erl"},{line,113}]},
{error_logger_file_h,handle_event,2,
[{file,"error_logger_file_h.erl"},{line,78}]},
{rabbit_error_logger_file_h,safe_handle_event,3,
[{file,"src/rabbit_error_logger_file_h.erl"},{line,121}]},
{gen_event,server_update,4,[{file,"gen_event.erl"},{line,522}]},
{gen_event,server_notify,4,[{file,"gen_event.erl"},{line,504}]},
{gen_event,server_notify,4,[{file,"gen_event.erl"},{line,506}]},
{gen_event,handle_msg,5,[{file,"gen_event.erl"},{line,266}]},
{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,239}]}]

And the log is never written into RABBITMQ_LOGS, it is alway empty.

I suspect that the version of Erlang in Epel repo is not updated as 'esl-erlang' repo. So I switch to use the repo by overriding the attribute ['erlang']['install_method'] = 'esl'. And RabbitMQ starting without an error message with the latest Erlang version 18.3, not the old one R16B-03.16 from Epel repo.

Interestingly, I think I find an unnecessary snippet in this cookbook (which can cause trouble later).

if node['erlang']['install_method'] == 'esl'
    remote_file "#{Chef::Config[:file_cache_path]}/esl-erlang-compat.rpm" do
      source "#{node['rabbitmq']['esl-erlang_package_url']}#{node['rabbitmq']['esl-erlang_package']}"
    end
    rpm_package "#{Chef::Config[:file_cache_path]}/esl-erlang-compat.rpm"
  end

We actually don't need to install esl-erlang-compat, since the package esl-erlang from esl-erlang repo already provides the erlang package.

[root@node1 ~]# rpm -qf /bin/erl
esl-erlang-18.3-1.x86_64

I think it is because the RabbitMQ docs for installing Erlang is not updated with 'esl-erlang' packaging system. And it is true, the package esl-erlang-compat-R16B03.noarch from the above snippet contains no files.

[root@node1 ~]# rpm -ql esl-erlang-compat-R16B03.noarch
(contains no files)

I don't have much time to dig deeper but I think we can remove the code to install esl-erlang-compat when using install_method is esl.

@chrisduong chrisduong changed the title default **erlang** version of Epel can break RabbitMQ v3.6.1 logging. esl-erlang-compat is not needed for 'esl install method' Apr 28, 2016
@michaelklishin
Copy link
Member

esl-erlang-compat is necessary because the ESL RPM package provides a package named esl-erlang (or at least it used to do that) and RabbitMQ expects it to be erlang.

In a somewhat related note, this cookbook should consider supporting RabbitMQ provided RPM packages of Erlang.

@chrisduong
Copy link
Author

Hi,

The erlang-solution repo actually install erlang package for RabbitMQ also.

[root@node1 ~]# yum info erlang
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile

  • base: centos-hcm.viettelidc.com.vn
  • epel: ftp.cuhk.edu.hk
  • extras: centos-hcm.viettelidc.com.vn
  • updates: centos-hcm.viettelidc.com.vn
    Available Packages
    Name : erlang
    Arch : x86_64
    Version : 18.3
    Release : 1.el7.centos
    Size : 16 k
    Repo : erlang_solutions/7/x86_64
    Summary : General-purpose programming language and runtime environment
    URL : http://www.erlang.org
    License : ERPL
    Description : Erlang is a general-purpose programming language and runtime
    : environment. Erlang has built-in support for concurrency,
    : distribution and fault tolerance. Erlang is used in several large
    : telecommunication systems from Ericsson.

As from RabbitMQ official docs.

Install Erlang

Before installing RabbitMQ, you must install Erlang. We strongly recommend using a packaged version. There are three suggested sources for Erlang packages:

Erlang Solutions produces packages that are usually up to date. They produce two sets of packages - ones which are split up and are more convenient to use if you can add a yum repository, and a monolithic package which might be easier if you have to download manually.

We can simple use yum repository to install all erlang packages for RabbitMQ. This way is more simple.

@chrisduong
Copy link
Author

Sorry, I clicked the wrong button.

@michaelklishin
Copy link
Member

@chrisduong have you actually tried using the split up RPM package? It's an endless stream of headaches and dependency woes. That's the only reason why our team provides Erlang RPM builds in the first place.

@chrisduong
Copy link
Author

@michaelklishin, thanks for clearing my mind. Since we are using erlang cookbook - going with ''esl-erlang" package (instead of split-up erlang packages). that's the reason we have to install 'esl-erlang-compat' so we can install RabbitMQ later.

Thanks for supporting esl-erlang-compat package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants