noxdafox / rabbitmq-cloudwatch-exporter

RabbitMQ Plugin for publishing cluster metrics to AWS CloudWatch
Mozilla Public License 2.0
41 stars 9 forks source link

Error: plugin_built_with_incompatible_erlang #4

Closed valentinbud closed 5 years ago

valentinbud commented 5 years ago

Hi,

I am trying to use the exporter on RabbitMQ installed on Amazon Linux 2018.03.

$ cat /etc/os-release
NAME="Amazon Linux AMI"
VERSION="2018.03"
ID="amzn"
ID_LIKE="rhel fedora"
VERSION_ID="2018.03"
PRETTY_NAME="Amazon Linux AMI 2018.03"
ANSI_COLOR="0;33"
CPE_NAME="cpe:/o:amazon:linux:2018.03:ga"
HOME_URL="http://aws.amazon.com/amazon-linux-ami/"

erlang and rabbitmq versions.

# rpm -qa | grep rabbit
rabbitmq-server-3.6.11-1.el6.noarch
# rpm -qa | grep erlang
erlang-19.0.4-1.el6.x86_64

When enabling the plugin I receive the following:

# rabbitmq-plugins enable rabbitmq_cloudwatch_exporter
The following plugins have been enabled:
  poison
  unicode_util_compat
  idna
  mimerl
  certifi
  ssl_verify_fun
  metrics
  hackney
  elixir
  logger
  ex_aws
  ex_aws_cloudwatch
  rabbitmq_cloudwatch_exporter

Applying plugin configuration to rabbit@fulger... failed.
Error: {plugin_built_with_incompatible_erlang,"certifi"}

I have also tried to install from source using elixir 1.7.4. I receive the following:

# make
erlang.mk:30: Please upgrade to GNU Make 4 or later: https://erlang.mk/guide/installation.html
make[1]: Entering directory `/root/rabbitmq-cloudwatch-exporter/deps/rabbit'
erlang.mk:30: Please upgrade to GNU Make 4 or later: https://erlang.mk/guide/installation.html
make[2]: Entering directory `/root/rabbitmq-cloudwatch-exporter/deps/rabbitmq_cli'
erlang.mk:30: Please upgrade to GNU Make 4 or later: https://erlang.mk/guide/installation.html
make[3]: Entering directory `/root/rabbitmq-cloudwatch-exporter/deps/observer_cli'
/root/rabbitmq-cloudwatch-exporter/deps/rabbitmq_cli/erlang.mk:30: Please upgrade to GNU Make 4 or later: https://erlang.mk/guide/installation.html
make[4]: Entering directory `/root/rabbitmq-cloudwatch-exporter/deps/recon'
/root/rabbitmq-cloudwatch-exporter/deps/rabbitmq_cli/erlang.mk:30: Please upgrade to GNU Make 4 or later: https://erlang.mk/guide/installation.html
/root/rabbitmq-cloudwatch-exporter/deps/rabbitmq_cli/erlang.mk:30: Please upgrade to GNU Make 4 or later: https://erlang.mk/guide/installation.html
make[4]: Leaving directory `/root/rabbitmq-cloudwatch-exporter/deps/recon'
/root/rabbitmq-cloudwatch-exporter/deps/rabbitmq_cli/erlang.mk:30: Please upgrade to GNU Make 4 or later: https://erlang.mk/guide/installation.html
make[3]: Leaving directory `/root/rabbitmq-cloudwatch-exporter/deps/observer_cli'
make[2]: Leaving directory `/root/rabbitmq-cloudwatch-exporter/deps/rabbitmq_cli'
make[2]: Entering directory `/root/rabbitmq-cloudwatch-exporter/deps/syslog'
/root/rabbitmq-cloudwatch-exporter/deps/rabbit/erlang.mk:30: Please upgrade to GNU Make 4 or later: https://erlang.mk/guide/installation.html
/root/rabbitmq-cloudwatch-exporter/deps/rabbit/erlang.mk:30: Please upgrade to GNU Make 4 or later: https://erlang.mk/guide/installation.html
make[2]: Leaving directory `/root/rabbitmq-cloudwatch-exporter/deps/syslog'
make[2]: Entering directory `/root/rabbitmq-cloudwatch-exporter/deps/ranch'
/root/rabbitmq-cloudwatch-exporter/deps/rabbit/erlang.mk:30: Please upgrade to GNU Make 4 or later: https://erlang.mk/guide/installation.html
/root/rabbitmq-cloudwatch-exporter/deps/rabbit/erlang.mk:30: Please upgrade to GNU Make 4 or later: https://erlang.mk/guide/installation.html
make[2]: Leaving directory `/root/rabbitmq-cloudwatch-exporter/deps/ranch'
make[2]: Entering directory `/root/rabbitmq-cloudwatch-exporter/deps/lager'
/root/rabbitmq-cloudwatch-exporter/deps/rabbit/erlang.mk:30: Please upgrade to GNU Make 4 or later: https://erlang.mk/guide/installation.html
make[3]: Entering directory `/root/rabbitmq-cloudwatch-exporter/deps/goldrush'
/root/rabbitmq-cloudwatch-exporter/deps/rabbit/erlang.mk:30: Please upgrade to GNU Make 4 or later: https://erlang.mk/guide/installation.html
/root/rabbitmq-cloudwatch-exporter/deps/rabbit/erlang.mk:30: Please upgrade to GNU Make 4 or later: https://erlang.mk/guide/installation.html
make[3]: Leaving directory `/root/rabbitmq-cloudwatch-exporter/deps/goldrush'
/root/rabbitmq-cloudwatch-exporter/deps/rabbit/erlang.mk:30: Please upgrade to GNU Make 4 or later: https://erlang.mk/guide/installation.html
make[2]: Leaving directory `/root/rabbitmq-cloudwatch-exporter/deps/lager'
make[2]: Entering directory `/root/rabbitmq-cloudwatch-exporter/deps/ra'
/root/rabbitmq-cloudwatch-exporter/deps/rabbit/erlang.mk:30: Please upgrade to GNU Make 4 or later: https://erlang.mk/guide/installation.html
make[3]: Entering directory `/root/rabbitmq-cloudwatch-exporter/deps/elvis_mk'
make[3]: Nothing to be done for `noop'.
make[3]: Leaving directory `/root/rabbitmq-cloudwatch-exporter/deps/elvis_mk'
make[3]: Entering directory `/root/rabbitmq-cloudwatch-exporter/deps/aten'
/root/rabbitmq-cloudwatch-exporter/deps/rabbit/erlang.mk:30: Please upgrade to GNU Make 4 or later: https://erlang.mk/guide/installation.html
/root/rabbitmq-cloudwatch-exporter/deps/rabbit/erlang.mk:30: Please upgrade to GNU Make 4 or later: https://erlang.mk/guide/installation.html
make[3]: Leaving directory `/root/rabbitmq-cloudwatch-exporter/deps/aten'
make[3]: Entering directory `/root/rabbitmq-cloudwatch-exporter/deps/gen_batch_server'
/root/rabbitmq-cloudwatch-exporter/deps/rabbit/erlang.mk:30: Please upgrade to GNU Make 4 or later: https://erlang.mk/guide/installation.html
/root/rabbitmq-cloudwatch-exporter/deps/rabbit/erlang.mk:30: Please upgrade to GNU Make 4 or later: https://erlang.mk/guide/installation.html
make[3]: Leaving directory `/root/rabbitmq-cloudwatch-exporter/deps/gen_batch_server'
/root/rabbitmq-cloudwatch-exporter/deps/rabbit/erlang.mk:30: Please upgrade to GNU Make 4 or later: https://erlang.mk/guide/installation.html
 ERLC   noop.erl ra.erl ra_app.erl ra_directory.erl ra_env.erl ra_file_handle.erl ra_flru.erl ra_lib.erl ra_log.erl ra_log_ets.erl ra_log_meta.erl ra_log_segment.erl ra_log_segment_writer.erl ra_log_snapshot.erl ra_log_sup.erl ra_log_wal.erl ra_log_wal_sup.erl ra_machine.erl ra_machine_ets.erl ra_machine_simple.erl ra_metrics.erl ra_metrics_ets.erl ra_server.erl ra_server_proc.erl ra_server_sup.erl ra_server_sup_sup.erl ra_snapshot.erl ra_sup.erl ra_system_sup.erl
Inlining: inline_size=24 inline_effort=150
src/ra_server_proc.erl:953: illegal pattern
src/ra_server_proc.erl:956: variable 'S' is unbound
src/ra_server_proc.erl:957: illegal pattern
src/ra_server_proc.erl:962: variable 'E' is unbound
src/ra_server_proc.erl:962: variable 'S' is unbound
make[3]: *** [ebin/ra.app] Error 1
make[2]: *** [app] Error 2
make[2]: Leaving directory `/root/rabbitmq-cloudwatch-exporter/deps/ra'
make[1]: *** [deps] Error 2
make[1]: Leaving directory `/root/rabbitmq-cloudwatch-exporter/deps/rabbit'
make: *** [deps] Error 2

Please tell me if the plugin could functions with my installed versions, or should I update erlang and rabbitmq. Thank you :).

noxdafox commented 5 years ago

Greetings,

The plugin has been tested on RabbitMQ 3.7.x and 3.8.0. It is built against RabbitMQ 3.7.x using Erlang 20.3.x.

It has not been tested against RMQ 3.6.x and Erlang 19. You can proceed in two different ways.

valentinbud commented 5 years ago

Hi @noxdafox,

Thank you for answering me so promptly. I have already tried to install from source and I am getting the error I've specified above.

[...]
src/ra_server_proc.erl:953: illegal pattern
src/ra_server_proc.erl:956: variable 'S' is unbound
src/ra_server_proc.erl:957: illegal pattern
src/ra_server_proc.erl:962: variable 'E' is unbound
src/ra_server_proc.erl:962: variable 'S' is unbound
make[3]: *** [ebin/ra.app] Error 1
make[2]: *** [app] Error 2
make[2]: Leaving directory `/root/rabbitmq-cloudwatch-exporter/deps/ra'
make[1]: *** [deps] Error 2
make[1]: Leaving directory `/root/rabbitmq-cloudwatch-exporter/deps/rabbit'
make: *** [deps] Error 2

Since RMQ 3.6 is unsupported I'll try to follow the upgrade to a newer version of RMQ path. It's the best one.

Taking the above into consideration I'll close the issue.

Thank you :).

noxdafox commented 5 years ago

The above error is because it's trying to build rabbitmq from the master branch rather than 3.6.x.

To get it work, add the following lines to the Makefile:

override dep_rabbit = git https://github.com/rabbitmq/rabbitmq-server v3.6.x
override dep_rabbit_common = git https://github.com/rabbitmq/rabbitmq-common v3.6.x
override dep_rabbitmq_management = git https://github.com/rabbitmq/rabbitmq-management v3.6.x
override dep_rabbitmq_management_agent = git https://github.com/rabbitmq/rabbitmq-management-agent v3.6.x

Right after the line:

DEPS = rabbit_common rabbit rabbitmq_management rabbitmq_management_agent
valentinbud commented 5 years ago

Hello @noxdafox,

Thank you for getting back to me with the above clarification. My installation in on Amazon Linux AMI 2018.03.

I have done the modifications you've suggested.

# cat Makefile
PROJECT = rabbitmq_cloudwatch_exporter

DEPS = rabbit_common rabbit rabbitmq_management rabbitmq_management_agent

override dep_rabbit = git https://github.com/rabbitmq/rabbitmq-server v3.6.x
override dep_rabbit_common = git https://github.com/rabbitmq/rabbitmq-common v3.6.x
override dep_rabbitmq_management = git https://github.com/rabbitmq/rabbitmq-management v3.6.x
override dep_rabbitmq_management_agent = git https://github.com/rabbitmq/rabbitmq-management-agent v3.6.x

DEP_PLUGINS = rabbit_common/mk/rabbitmq-plugin.mk

elixir_srcs := mix.exs

app:: $(elixir_srcs) deps
    $(MIX) make_all

# FIXME: Use erlang.mk patched for RabbitMQ, while waiting for PRs to be
# reviewed and merged.

ERLANG_MK_REPO = https://github.com/rabbitmq/erlang.mk.git
ERLANG_MK_COMMIT = rabbitmq-tmp

include rabbitmq-components.mk
include erlang.mk

Now I receive another error:

erlang.mk:30: Please upgrade to GNU Make 4 or later: https://erlang.mk/guide/installation.html
make[1]: Entering directory `/root/OPS-80/rabbitmq-cloudwatch-exporter/deps/rabbit_common'
erlang.mk:30: Please upgrade to GNU Make 4 or later: https://erlang.mk/guide/installation.html
make[2]: Entering directory `/root/OPS-80/rabbitmq-cloudwatch-exporter/deps/recon'
/root/OPS-80/rabbitmq-cloudwatch-exporter/deps/rabbit_common/erlang.mk:30: Please upgrade to GNU Make 4 or later: https://erlang.mk/guide/installation.html
make[2]: Leaving directory `/root/OPS-80/rabbitmq-cloudwatch-exporter/deps/recon'
make[1]: Leaving directory `/root/OPS-80/rabbitmq-cloudwatch-exporter/deps/rabbit_common'
make[1]: Entering directory `/root/OPS-80/rabbitmq-cloudwatch-exporter/deps/rabbit'
erlang.mk:30: Please upgrade to GNU Make 4 or later: https://erlang.mk/guide/installation.html
make[2]: Entering directory `/root/OPS-80/rabbitmq-cloudwatch-exporter/deps/ranch'
/root/OPS-80/rabbitmq-cloudwatch-exporter/deps/rabbit/erlang.mk:30: Please upgrade to GNU Make 4 or later: https://erlang.mk/guide/installation.html
make[2]: Leaving directory `/root/OPS-80/rabbitmq-cloudwatch-exporter/deps/ranch'
make[1]: Leaving directory `/root/OPS-80/rabbitmq-cloudwatch-exporter/deps/rabbit'
make[1]: Entering directory `/root/OPS-80/rabbitmq-cloudwatch-exporter/deps/rabbitmq_management'
erlang.mk:30: Please upgrade to GNU Make 4 or later: https://erlang.mk/guide/installation.html
make[2]: Entering directory `/root/OPS-80/rabbitmq-cloudwatch-exporter/deps/amqp_client'
erlang.mk:30: Please upgrade to GNU Make 4 or later: https://erlang.mk/guide/installation.html
make[2]: Leaving directory `/root/OPS-80/rabbitmq-cloudwatch-exporter/deps/amqp_client'
make[2]: Entering directory `/root/OPS-80/rabbitmq-cloudwatch-exporter/deps/cowboy'
/root/OPS-80/rabbitmq-cloudwatch-exporter/deps/rabbitmq_management/erlang.mk:30: Please upgrade to GNU Make 4 or later: https://erlang.mk/guide/installation.html
make[3]: Entering directory `/root/OPS-80/rabbitmq-cloudwatch-exporter/deps/cowlib'
/root/OPS-80/rabbitmq-cloudwatch-exporter/deps/rabbitmq_management/erlang.mk:30: Please upgrade to GNU Make 4 or later: https://erlang.mk/guide/installation.html
make[3]: Leaving directory `/root/OPS-80/rabbitmq-cloudwatch-exporter/deps/cowlib'
make[2]: Leaving directory `/root/OPS-80/rabbitmq-cloudwatch-exporter/deps/cowboy'
make[2]: Entering directory `/root/OPS-80/rabbitmq-cloudwatch-exporter/deps/rabbitmq_web_dispatch'
erlang.mk:30: Please upgrade to GNU Make 4 or later: https://erlang.mk/guide/installation.html
make[2]: Leaving directory `/root/OPS-80/rabbitmq-cloudwatch-exporter/deps/rabbitmq_web_dispatch'
make[2]: Entering directory `/root/OPS-80/rabbitmq-cloudwatch-exporter/deps/rabbitmq_management_agent'
erlang.mk:30: Please upgrade to GNU Make 4 or later: https://erlang.mk/guide/installation.html
make[2]: Leaving directory `/root/OPS-80/rabbitmq-cloudwatch-exporter/deps/rabbitmq_management_agent'
make[1]: Leaving directory `/root/OPS-80/rabbitmq-cloudwatch-exporter/deps/rabbitmq_management'
make_all
make: make_all: Command not found
make: *** [app] Error 127

Anyway, I am going to migrate to 3.7.x this week so please ignore this. Once again thank you for your help.