Closed mforde84 closed 2 years ago
Compile i'm getting so close I can taste it:
10.128.3.228 :: root -> make
erlang.mk:30: Please upgrade to GNU Make 4 or later: https://erlang.mk/guide/installation.html
erlang.mk:5087: warning: overriding recipe for target `/root/rabbitmq-email/deps/gen_smtp'
erlang.mk:5087: warning: ignoring old recipe for target `/root/rabbitmq-email/deps/gen_smtp'
erlang.mk:5537: warning: overriding recipe for target `/root/rabbitmq-email/deps/amqp_client'
erlang.mk:5087: warning: ignoring old recipe for target `/root/rabbitmq-email/deps/amqp_client'
make[1]: Entering directory `/root/rabbitmq-email/deps/gen_smtp'
===> Verifying dependencies...
===> Analyzing applications...
===> Compiling gen_smtp
make[1]: Leaving directory `/root/rabbitmq-email/deps/gen_smtp'
make[1]: Entering directory `/root/rabbitmq-email/deps/rabbit_common'
make[2]: Entering directory `/root/rabbitmq-email/deps/rabbitmq_codegen'
make[2]: Leaving directory `/root/rabbitmq-email/deps/rabbitmq_codegen'
make[1]: Leaving directory `/root/rabbitmq-email/deps/rabbit_common'
make[1]: Entering directory `/root/rabbitmq-email/deps/amqp_client'
make[1]: Leaving directory `/root/rabbitmq-email/deps/amqp_client'
make[1]: Entering directory `/root/rabbitmq-email/deps/rabbit'
make[2]: Entering directory `/root/rabbitmq-email/.erlang.mk/rabbitmq-server/deps/rabbitmq_amqp1_0'
make[3]: Entering directory `/root/rabbitmq-email/.erlang.mk/rabbitmq-server/deps/amqp10_common'
make[3]: Leaving directory `/root/rabbitmq-email/.erlang.mk/rabbitmq-server/deps/amqp10_common'
make[2]: Leaving directory `/root/rabbitmq-email/.erlang.mk/rabbitmq-server/deps/rabbitmq_amqp1_0'
make[2]: Entering directory `/root/rabbitmq-email/.erlang.mk/rabbitmq-server/deps/rabbitmq_auth_backend_cache'
make[2]: Leaving directory `/root/rabbitmq-email/.erlang.mk/rabbitmq-server/deps/rabbitmq_auth_backend_cache'
make[2]: Entering directory `/root/rabbitmq-email/.erlang.mk/rabbitmq-server/deps/rabbitmq_auth_backend_http'
make[2]: Leaving directory `/root/rabbitmq-email/.erlang.mk/rabbitmq-server/deps/rabbitmq_auth_backend_http'
make[2]: Entering directory `/root/rabbitmq-email/.erlang.mk/rabbitmq-server/deps/rabbitmq_auth_backend_ldap'
make[2]: Leaving directory `/root/rabbitmq-email/.erlang.mk/rabbitmq-server/deps/rabbitmq_auth_backend_ldap'
make[2]: Entering directory `/root/rabbitmq-email/.erlang.mk/rabbitmq-server/deps/rabbitmq_auth_backend_oauth2'
make[2]: Leaving directory `/root/rabbitmq-email/.erlang.mk/rabbitmq-server/deps/rabbitmq_auth_backend_oauth2'
make[2]: Entering directory `/root/rabbitmq-email/.erlang.mk/rabbitmq-server/deps/rabbitmq_auth_mechanism_ssl'
make[2]: Leaving directory `/root/rabbitmq-email/.erlang.mk/rabbitmq-server/deps/rabbitmq_auth_mechanism_ssl'
make[2]: Entering directory `/root/rabbitmq-email/.erlang.mk/rabbitmq-server/deps/rabbitmq_consistent_hash_exchange'
make[2]: Leaving directory `/root/rabbitmq-email/.erlang.mk/rabbitmq-server/deps/rabbitmq_consistent_hash_exchange'
make[2]: Entering directory `/root/rabbitmq-email/.erlang.mk/rabbitmq-server/deps/rabbitmq_event_exchange'
make[2]: Leaving directory `/root/rabbitmq-email/.erlang.mk/rabbitmq-server/deps/rabbitmq_event_exchange'
make[2]: Entering directory `/root/rabbitmq-email/.erlang.mk/rabbitmq-server/deps/rabbitmq_federation'
make[2]: Leaving directory `/root/rabbitmq-email/.erlang.mk/rabbitmq-server/deps/rabbitmq_federation'
make[2]: Entering directory `/root/rabbitmq-email/.erlang.mk/rabbitmq-server/deps/rabbitmq_federation_management'
make[3]: Entering directory `/root/rabbitmq-email/.erlang.mk/rabbitmq-server/deps/rabbitmq_management'
make[4]: Entering directory `/root/rabbitmq-email/.erlang.mk/rabbitmq-server/deps/rabbitmq_web_dispatch'
make[4]: Leaving directory `/root/rabbitmq-email/.erlang.mk/rabbitmq-server/deps/rabbitmq_web_dispatch'
make[4]: Entering directory `/root/rabbitmq-email/.erlang.mk/rabbitmq-server/deps/rabbitmq_management_agent'
make[4]: Leaving directory `/root/rabbitmq-email/.erlang.mk/rabbitmq-server/deps/rabbitmq_management_agent'
make[3]: Leaving directory `/root/rabbitmq-email/.erlang.mk/rabbitmq-server/deps/rabbitmq_management'
make[2]: Leaving directory `/root/rabbitmq-email/.erlang.mk/rabbitmq-server/deps/rabbitmq_federation_management'
make[2]: Entering directory `/root/rabbitmq-email/.erlang.mk/rabbitmq-server/deps/rabbitmq_jms_topic_exchange'
make[2]: Leaving directory `/root/rabbitmq-email/.erlang.mk/rabbitmq-server/deps/rabbitmq_jms_topic_exchange'
make[2]: Entering directory `/root/rabbitmq-email/.erlang.mk/rabbitmq-server/deps/rabbitmq_mqtt'
make[2]: Leaving directory `/root/rabbitmq-email/.erlang.mk/rabbitmq-server/deps/rabbitmq_mqtt'
make[2]: Entering directory `/root/rabbitmq-email/.erlang.mk/rabbitmq-server/deps/rabbitmq_peer_discovery_aws'
make[3]: Entering directory `/root/rabbitmq-email/.erlang.mk/rabbitmq-server/deps/rabbitmq_peer_discovery_common'
make[3]: Leaving directory `/root/rabbitmq-email/.erlang.mk/rabbitmq-server/deps/rabbitmq_peer_discovery_common'
make[3]: Entering directory `/root/rabbitmq-email/.erlang.mk/rabbitmq-server/deps/rabbitmq_aws'
make[3]: Leaving directory `/root/rabbitmq-email/.erlang.mk/rabbitmq-server/deps/rabbitmq_aws'
make[2]: Leaving directory `/root/rabbitmq-email/.erlang.mk/rabbitmq-server/deps/rabbitmq_peer_discovery_aws'
make[2]: Entering directory `/root/rabbitmq-email/.erlang.mk/rabbitmq-server/deps/rabbitmq_peer_discovery_consul'
make[2]: Leaving directory `/root/rabbitmq-email/.erlang.mk/rabbitmq-server/deps/rabbitmq_peer_discovery_consul'
make[2]: Entering directory `/root/rabbitmq-email/.erlang.mk/rabbitmq-server/deps/rabbitmq_peer_discovery_etcd'
make[2]: Leaving directory `/root/rabbitmq-email/.erlang.mk/rabbitmq-server/deps/rabbitmq_peer_discovery_etcd'
make[2]: Entering directory `/root/rabbitmq-email/.erlang.mk/rabbitmq-server/deps/rabbitmq_peer_discovery_k8s'
make[2]: Leaving directory `/root/rabbitmq-email/.erlang.mk/rabbitmq-server/deps/rabbitmq_peer_discovery_k8s'
make[2]: Entering directory `/root/rabbitmq-email/.erlang.mk/rabbitmq-server/deps/rabbitmq_prometheus'
make[2]: Leaving directory `/root/rabbitmq-email/.erlang.mk/rabbitmq-server/deps/rabbitmq_prometheus'
make[2]: Entering directory `/root/rabbitmq-email/.erlang.mk/rabbitmq-server/deps/rabbitmq_random_exchange'
make[2]: Leaving directory `/root/rabbitmq-email/.erlang.mk/rabbitmq-server/deps/rabbitmq_random_exchange'
make[2]: Entering directory `/root/rabbitmq-email/.erlang.mk/rabbitmq-server/deps/rabbitmq_recent_history_exchange'
make[2]: Leaving directory `/root/rabbitmq-email/.erlang.mk/rabbitmq-server/deps/rabbitmq_recent_history_exchange'
make[2]: Entering directory `/root/rabbitmq-email/.erlang.mk/rabbitmq-server/deps/rabbitmq_sharding'
make[2]: Leaving directory `/root/rabbitmq-email/.erlang.mk/rabbitmq-server/deps/rabbitmq_sharding'
make[2]: Entering directory `/root/rabbitmq-email/.erlang.mk/rabbitmq-server/deps/rabbitmq_shovel'
make[3]: Entering directory `/root/rabbitmq-email/.erlang.mk/rabbitmq-server/deps/amqp10_client'
make[4]: Entering directory `/root/rabbitmq-email/deps/elvis_mk'
make[4]: Nothing to be done for `noop'.
make[4]: Leaving directory `/root/rabbitmq-email/deps/elvis_mk'
make[3]: Leaving directory `/root/rabbitmq-email/.erlang.mk/rabbitmq-server/deps/amqp10_client'
make[2]: Leaving directory `/root/rabbitmq-email/.erlang.mk/rabbitmq-server/deps/rabbitmq_shovel'
make[2]: Entering directory `/root/rabbitmq-email/.erlang.mk/rabbitmq-server/deps/rabbitmq_shovel_management'
make[2]: Leaving directory `/root/rabbitmq-email/.erlang.mk/rabbitmq-server/deps/rabbitmq_shovel_management'
make[2]: Entering directory `/root/rabbitmq-email/.erlang.mk/rabbitmq-server/deps/rabbitmq_stomp'
make[2]: Leaving directory `/root/rabbitmq-email/.erlang.mk/rabbitmq-server/deps/rabbitmq_stomp'
make[2]: Entering directory `/root/rabbitmq-email/.erlang.mk/rabbitmq-server/deps/rabbitmq_stream'
make[3]: Entering directory `/root/rabbitmq-email/.erlang.mk/rabbitmq-server/deps/rabbitmq_stream_common'
make[3]: Leaving directory `/root/rabbitmq-email/.erlang.mk/rabbitmq-server/deps/rabbitmq_stream_common'
make[2]: Leaving directory `/root/rabbitmq-email/.erlang.mk/rabbitmq-server/deps/rabbitmq_stream'
make[2]: Entering directory `/root/rabbitmq-email/.erlang.mk/rabbitmq-server/deps/rabbitmq_stream_management'
make[2]: Leaving directory `/root/rabbitmq-email/.erlang.mk/rabbitmq-server/deps/rabbitmq_stream_management'
make[2]: Entering directory `/root/rabbitmq-email/.erlang.mk/rabbitmq-server/deps/rabbitmq_top'
make[2]: Leaving directory `/root/rabbitmq-email/.erlang.mk/rabbitmq-server/deps/rabbitmq_top'
make[2]: Entering directory `/root/rabbitmq-email/.erlang.mk/rabbitmq-server/deps/rabbitmq_tracing'
make[2]: Leaving directory `/root/rabbitmq-email/.erlang.mk/rabbitmq-server/deps/rabbitmq_tracing'
make[2]: Entering directory `/root/rabbitmq-email/.erlang.mk/rabbitmq-server/deps/rabbitmq_trust_store'
make[2]: Leaving directory `/root/rabbitmq-email/.erlang.mk/rabbitmq-server/deps/rabbitmq_trust_store'
make[2]: Entering directory `/root/rabbitmq-email/.erlang.mk/rabbitmq-server/deps/rabbitmq_web_mqtt'
make[2]: Leaving directory `/root/rabbitmq-email/.erlang.mk/rabbitmq-server/deps/rabbitmq_web_mqtt'
make[2]: Entering directory `/root/rabbitmq-email/.erlang.mk/rabbitmq-server/deps/rabbitmq_web_mqtt_examples'
make[2]: Leaving directory `/root/rabbitmq-email/.erlang.mk/rabbitmq-server/deps/rabbitmq_web_mqtt_examples'
make[2]: Entering directory `/root/rabbitmq-email/.erlang.mk/rabbitmq-server/deps/rabbitmq_web_stomp'
make[2]: Leaving directory `/root/rabbitmq-email/.erlang.mk/rabbitmq-server/deps/rabbitmq_web_stomp'
make[2]: Entering directory `/root/rabbitmq-email/.erlang.mk/rabbitmq-server/deps/rabbitmq_web_stomp_examples'
make[2]: Leaving directory `/root/rabbitmq-email/.erlang.mk/rabbitmq-server/deps/rabbitmq_web_stomp_examples'
make[1]: Leaving directory `/root/rabbitmq-email/deps/rabbit'
erlang.mk:5087: warning: overriding recipe for target `/root/rabbitmq-email/deps/gen_smtp'
erlang.mk:5087: warning: ignoring old recipe for target `/root/rabbitmq-email/deps/gen_smtp'
erlang.mk:5537: warning: overriding recipe for target `/root/rabbitmq-email/deps/amqp_client'
erlang.mk:5087: warning: ignoring old recipe for target `/root/rabbitmq-email/deps/amqp_client'
erlang.mk:5087: warning: overriding recipe for target `/root/rabbitmq-email/deps/gen_smtp'
erlang.mk:5087: warning: ignoring old recipe for target `/root/rabbitmq-email/deps/gen_smtp'
erlang.mk:5537: warning: overriding recipe for target `/root/rabbitmq-email/deps/amqp_client'
erlang.mk:5087: warning: ignoring old recipe for target `/root/rabbitmq-email/deps/amqp_client'
GEN test-build
erlang.mk:5087: warning: overriding recipe for target `/root/rabbitmq-email/deps/gen_smtp'
erlang.mk:5087: warning: ignoring old recipe for target `/root/rabbitmq-email/deps/gen_smtp'
erlang.mk:5537: warning: overriding recipe for target `/root/rabbitmq-email/deps/amqp_client'
erlang.mk:5087: warning: ignoring old recipe for target `/root/rabbitmq-email/deps/amqp_client'
GEN install-cli-scripts
make: *** [install-cli-scripts] Error 1
I'll try to get some time this week for this issue.
cool thankyou. ive been able to get through most of the make file, however its failing on these install-cli-script portions for rabbitmq-server / rabbitmq in deps. when i remove these as dependencies on the respective make files and attempt to make dist on the top leve rabbitmq-email plugin, im getting an error on an erlang behavior context
compile: warnings being treated as errors
src/rabbit_email_handler.erl:13: behaviour gen_smtp_server_session undefined
make[1]: *** [ebin/rabbitmq_email.app] Error 1
make: *** [app] Error 2
[ cdvlhbqr241:rabbitmq-email ]
10.128.3.228 :: root -> cat src/rabbit_email_handler.erl
%
% This Source Code Form is subject to the terms of the Mozilla Public
% License, v. 2.0. If a copy of the MPL was not distributed with this
% file, You can obtain one at http://mozilla.org/MPL/2.0/.
%
% Copyright (C) 2014 Petr Gotthard <petr.gotthard@centrum.cz>
%
% Based on smtp_server_example
% Copyright 2009-2011 Andrew Thompson <andrew@hijacked.us>
%
-module(rabbit_email_handler).
-behaviour(gen_smtp_server_session).
...
I have been able to successfully build gen_smtp 0.15.0 with rebar3 and erl21, and that works to some extent with the precompiled rabbit-email-0.40.0.ez plugin, up to the point of a rabbitmq-server restart. at that point the plugin is unable to load due to the broker not being able to start, so I think it's definitely an erl21 - 23 compatibility issue.
I believe you guys have a call with us coming up to discuss some project work on this. Ultimately we need to compile against erl23 and will need compilation support moving forward to keep current with our vuln remediation work for rabbitmq-server. at the moment, we have a way to work around this with rabbit/otp 3.8.3/21.3.x, but id rather do this correctly then trying to obfuscate stuff.
but clearly, we want to make sure this is an equitable situation for everyone involved. and i apologize for reaching out to you directly on slack. just wanted to open lines of comms on this. so i think this might be scoping out a support contract or something like that. i dont think im on the call, but my colleagues should be able to give some details. if needed i can jump on and give more detailed information.
i wonder if it might make sense to pull the 0.15.0 branch for gen_smtp and try to compile that as the dependency with erl23
Here is where I am now. NOTE: I am using Erlang 23.3.4.8
plugins/
subdir of the above.rabbitmq_email
, and got this, which is what you reported as well:
lbakken@shostakovich ~/issues/rmq-generic-unix/rabbitmq_server-3.8.9
$ ./sbin/rabbitmq-plugins list
Listing plugins with pattern ".*" ...
Error:
Error:
{:missing_dependencies, [:gen_smtp], [:rabbitmq_email]}
https://github.com/gen-smtp/gen_smtp
and compiled via rebar3 compile
ez
archive, so I added that feature here - https://github.com/lukebakken/gen_smtp/tree/lukebakken/add-rebar3-archive-plugingen_smtp
and copied it to the plugins/
subdir.BOOT FAILED
===========
Error during startup: {error,
{rabbitmq_email,
{{shutdown,
{failed_to_start_child,email_handler,
{'EXIT',
{undef,
[{gen_smtp_server,start_link,
[rabbit_email_handler,
[[{port,2525},
{protocol,tcp},
{domain,"example.com"},
{address,{0,0,0,0}}]]],
[]},
At this point it seems like https://github.com/gotthardp/rabbitmq-email isn't compatible with the latest gen_smtp
. I'm continuing to investigate.
It appears that gen_smtp
version 0.15.0 is the last version compatible with this project. Here's what I did next:
rm -f path/to/rabbitmq_server-3.8.9/plugins/gen_smtp*
cd path/to/gen_smtp
git checkout 0.15.0
rebar3 compile
cd _build/default/lib/gen_smtp
zip gen_smtp.ez ebin/*
cp gen_smtp.ez path/to/rabbitmq_server-3.8.9/plugins/
Now when I start RabbitMQ, this is the error:
BOOT FAILED
===========
Error during startup: {error,
{rabbitmq_email,
{{shutdown,
{failed_to_start_child,message_handler_sup,
{shutdown,
{failed_to_start_child,
'message_handlerexample.com',
{{badmatch,{error,broker_not_found_on_node}},
[{rabbit_message_handler,init,1,
[{file,"src/rabbit_message_handler.erl"},
{line,25}]},
{gen_server,init_it,2,
[{file,"gen_server.erl"},{line,417}]},
{gen_server,init_it,6,
[{file,"gen_server.erl"},{line,385}]},
{proc_lib,init_p_do_apply,3,
[{file,"proc_lib.erl"},{line,226}]}]}}}}},
{rabbitmq_email_app,start,[normal,[]]}}}}
This is due to this plugin not being compatible with RabbitMQ's boot sequence. I'll continue working on it!
yeah, heres an interesting part to this one. if you disable the plugin, then start the broker, then enable the plugin it'll work so its the initial gen_server.erl compatability issue.
thankyou btw for looking at this
if you disable the plugin, then start the broker, then enable the plugin it'll work so its the initial gen_server.erl compatability issue
Great, that confirms that this plugin is not compatible with the current RabbitMQ boot sequence.
@mforde84 I'm finding a couple issues while updating this plugin and gen_smtp
for use with the latest RabbitMQ and will link them here. If you do end up with a support contract, let me know just so I'm in the loop here at VMware.
thanks @lukebakken, just spoke with our leads and the intro call with vmware went well. we are regrouping next week to discuss internally with some people on our dev side of house.
@mforde84 I've been busy with customer support but can return to this today. I've made good progress and am now just getting the test suite to work.
Great thats awesome. Thankyou for circling back. I believe we are discussing with the team about support contract today. So I'll likely have more to report back there soon.
Thanks again, it's much appreciated.
On November 11, 2021 11:00:26 AM Luke Bakken @.***> wrote:
@mforde84 I've been busy with customer support but can return to this today. I've made good progress and am now just getting the test suite to work. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.
@mforde84 I have this plugin updated and working with the latest gen_smtp
code. Tests pass as well.
Question for you - currently gen-smtp/gen_smtp
has a dependency on eiconv
. eiconv
is a wrapper for your system's iconv
library and as such must be compiled using the same environment as which RabbitMQ will be running. Since there are too many variables we can't distribute a pre-compiled package.
We do have a fork of gen_smtp
that removes this dependency but it does mean that if your emails have non-ASCII text encoding / decoding may not work as expected. If eiconv
has been built and placed in the RabbitMQ plugins/
directory, it will be used.
If you have a second, would you mind cloning and building the eiconv
project? I'm interested in if it's tricky for users. Thanks!
I'm still seeing build errors. And it seems to be the same install-cli-scripts issues
``make[1]: Leaving directory
/root/rabbitmq-email/deps/cth_styledout'
erlang.mk:5087: warning: overriding recipe for target /root/rabbitmq-email/deps/gen_smtp' erlang.mk:5087: warning: ignoring old recipe for target
/root/rabbitmq-email/deps/gen_smtp'
erlang.mk:5537: warning: overriding recipe for target /root/rabbitmq-email/deps/amqp_client' erlang.mk:5087: warning: ignoring old recipe for target
/root/rabbitmq-email/deps/amqp_client'
DEPEND rabbitmq_email.d
erlang.mk:5087: warning: overriding recipe for target /root/rabbitmq-email/deps/gen_smtp' erlang.mk:5087: warning: ignoring old recipe for target
/root/rabbitmq-email/deps/gen_smtp'
erlang.mk:5537: warning: overriding recipe for target /root/rabbitmq-email/deps/amqp_client' erlang.mk:5087: warning: ignoring old recipe for target
/root/rabbitmq-email/deps/amqp_client'
ERLC rabbit_email_filter.erl rabbit_email_handler.erl rabbit_email_sender.erl rabbit_message_handler.erl rabbit_message_handler_sup.erl rabbit_message_sender.erl rabbitmq_email_app.erl
APP rabbitmq_email.app.src
GEN test-build
erlang.mk:5087: warning: overriding recipe for target /root/rabbitmq-email/deps/gen_smtp' erlang.mk:5087: warning: ignoring old recipe for target
/root/rabbitmq-email/deps/gen_smtp'
erlang.mk:5537: warning: overriding recipe for target /root/rabbitmq-email/deps/amqp_client' erlang.mk:5087: warning: ignoring old recipe for target
/root/rabbitmq-email/deps/amqp_client'
DEPEND rabbitmq_email.d
ERLC system_SUITE.erl
GEN install-cli-scripts
make: *** [install-cli-scripts] Error 1
not sure if its because I'm building off rabbitmq-server tag v3.8.9 . Not to be an imposition but do you have a play by play on this build, because I think I'm recovering old ground and I'm not sure my build process was valid in the first place. thanks.
let me investigate the eiconv dependancies, I assume that I can compile against whatever lib version my base cent7 system has?
or it looks like a separate plugin, let me see if i can compile that real quick
So the eiconv git you linked compiles successfully under my current installations:
[ cdvlhbqr241:_build ]
10.128.3.228 :: root -> pwd
/root/eiconv/_build
[ cdvlhbqr241:_build ]
10.128.3.228 :: root -> tree .
.
└── default
├── lib
│ └── eiconv
│ ├── ebin
│ │ ├── eiconv.app
│ │ ├── eiconv.beam
│ │ └── iconv.beam
│ ├── include -> ../../../../include
│ ├── priv -> ../../../../priv
│ └── src -> ../../../../src
└── plugins
└── pc
├── ebin
│ ├── pc.app
│ ├── pc.beam
│ ├── pc_compilation.beam
│ ├── pc_port_env.beam
│ ├── pc_port_specs.beam
│ ├── pc_prv_clean.beam
│ ├── pc_prv_compile.beam
│ └── pc_util.beam
├── hex_metadata.config
├── LICENSE
├── README.md
├── rebar.config
├── rebar.lock
└── src
├── pc.app.src
├── pc_compilation.erl
├── pc.erl
├── pc_port_env.erl
├── pc_port_specs.erl
├── pc_prv_clean.erl
├── pc_prv_compile.erl
└── pc_util.erl
however it doesn't generate the typical .ez package. is there a make option or something similar to repackage?
Not to be an imposition but do you have a play by play on this build
git clone https://github.com/gotthardp/rabbitmq-email.git
cd rabbitmq-email.git
git checkout -b update-for-rmq
make
however it doesn't generate the typical .ez package. is there a make option or something similar to repackage?
It doesn't do that out of the box, unfortunately. An ez
package is just a zip file of some of the build artifacts. The easiest way to create this file is to add the rebar3_archive_plugin
plugin to the rebar.config
file in your eiconv
clone:
$ git diff
diff --git a/rebar.config b/rebar.config
index 3a8734d..25ba466 100644
--- a/rebar.config
+++ b/rebar.config
@@ -1,4 +1,4 @@
-{plugins, [pc]}.
+{plugins, [pc, rebar3_archive_plugin]}.
{provider_hooks, [
{pre, [
Then, run the following command:
rebar3 do clean,compile,archive
You should see output similar to the following:
lbakken@shostakovich ~/development/zotonic/eiconv (master *%=)
$ rebar3 do clean,compile,archive
===> Verifying dependencies...
===> Cleaning out eiconv...
===> Verifying dependencies...
===> Compiling c_src/eiconv_nif.c
===> Linking /home/lbakken/development/zotonic/eiconv/priv/eiconv_nif.so
===> Analyzing applications...
===> Compiling eiconv
===> Verifying dependencies...
===> Analyzing applications...
===> Compiling eiconv
===> Building archive...
lbakken@shostakovich ~/development/zotonic/eiconv (master *%=)
$ unzip -t eiconv-git.ez
Archive: eiconv-git.ez
testing: eiconv-git/ebin/eiconv.app OK
testing: eiconv-git/ebin/eiconv.beam OK
testing: eiconv-git/ebin/iconv.beam OK
testing: eiconv-git/priv/eiconv_nif.so OK
No errors detected in compressed data of eiconv-git.ez.
I am working on the "best way" to put all of this together since, as you can see, it's not obvious! Prior to my work our fork of gen-smtp
had code to not require eiconv
but then character conversion features were left out.
@mforde84 I have finalized installation instructions here:
https://github.com/gotthardp/rabbitmq-email/tree/update-for-rmq#installation
Let me know how that works in your environment.
Note that ez
packages will not be built.
ONE MORE THING: these updates require the next releases of RabbitMQ that have this PR in them. I'm going to see if I can work around that.
Dude you're awesome 👌. Sorry got sidetracked today. I'm going to run through the upgrade tomorrow. Thankyou again.
On November 15, 2021 2:45:59 PM Luke Bakken @.***> wrote:
@mforde84 I have finalized installation instructions here: https://github.com/gotthardp/rabbitmq-email/tree/update-for-rmq#installation Let me know how that works in your environment. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.
hey ran into a compile issue
rabbit_ct_broker_helpers.erl:1532: Warning: function filter_ct_helpers_and_testsuites_paths/1 is unused
make[2]: *** [ebin/rabbitmq_ct_helpers.app] Error 1
make[1]: *** [app] Error 2
make[1]: Leaving directory `/opt/rabbitmq-email/.erlang.mk/rabbitmq-server/deps/rabbitmq_ct_helpers'
make: *** [test-deps] Error 2
i was able to compile yesterday, maybe it was the addition of eiconv hmm
let me check
Please start with a fresh clone and use the instructions to which I linked here.
Do NOT paste large amounts of text into a comment! Save all output into a file and attach the file.
Sorry, but yea followed the steps that were linked, and ended up with this error. This is a fresh clone as well. I'll try again.
Im getting the same error. I tried building off both the master and the branch.
The master
branch is the old version of this plugin, there is no need to try it.
Without seeing what you tried and the output, I can't help. Save all the commands you run and their output into a file, and attach the file to your next comment.
Sorry for all the back and forth. I'll get that to you momentarily.
ERLC rabbit_control_helper.erl rabbit_ct_broker_helpers.erl rabbit_ct_config_schema.erl rabbit_ct_helpers.erl rabbit_ct_proper_helpers.erl rabbit_ct_vm_helpers.erl rabbit_mgmt_test_util.erl
rabbit_ct_broker_helpers.erl:10: can't find include lib "common_test/include/ct.hrl"
You have something amiss with your Erlang installation because it appears that Common Test is not available. What OS are you using and how, exactly, is Erlang being installed?
10.128.3.228 :: root -> cat /etc/redhat-release CentOS Linux release 7.9.2009 (Core)
library support is installed through package cloud
I assume I dont have appropriate devels with those packages
[ cqplhbqr001:~ ]
10.131.128.231 :: root -> yum info erlang
Loaded plugins: fastestmirror, priorities, versionlock
Loading mirror speeds from cached hostfile
298 packages excluded due to repository priority protections
Excluding 2 updates due to versionlock (use "yum versionlock status" to show them)
Installed Packages
Name : erlang
Arch : x86_64
Version : 23.2.1
Release : 1.el7
Size : 34 M
Repo : installed
From repo : rabbitmq_erlang
Summary : Minimalistic Erlang/OTP distribution that provides just enough for running RabbitMQ
URL : https://www.erlang.org
License : ASL 2.0
Description : This is a minimal packaging of Erlang produced by Pivotal to support
: running RabbitMQ. Compared to the community Erlang packaging it is
: monolithic, has fewer dependencies, and has lower disk and memory
: overhead. Many applications from Erlang Open Telecom Platform (OTP)
: have been removed. The following applications remain: asn1, compiler,
: crypto, erl_interface, erts, hipe, inets, kernel, mnesia, os_mon,
: public_key, reltool, runtime_tools, sasl, snmp, ssl, stdlib,
: syntax_tools and xmerl.
[ cqplhbqr001:~ ]
10.131.128.231 :: root -> yum info rabbitmq-server
Loaded plugins: fastestmirror, priorities, versionlock
Loading mirror speeds from cached hostfile
298 packages excluded due to repository priority protections
Excluding 2 updates due to versionlock (use "yum versionlock status" to show them)
Installed Packages
Name : rabbitmq-server
Arch : noarch
Version : 3.8.9
Release : 1.el7
Size : 15 M
Repo : installed
From repo : rabbitmq_server
Summary : The RabbitMQ server
URL : https://www.rabbitmq.com/
License : MPLv2.0 and MIT and ASL 2.0 and BSD
Description : RabbitMQ is an open source multi-protocol messaging broker.
Im going to attempt to install erl/otp from source and try building off of that
OK. You could also just use a full Erlang package, like from ESL (Erlang Solutions).
Great took your advice with the ESL packaging. Seems to have worked well. I'm going to do they upgrade tomorrow and confirm everything looks good. Thankyou again. I assume this ticket is clear to close. If i run into any issues, I can just reopen.
Martin
On Tue, Nov 16, 2021 at 2:28 PM Luke Bakken @.***> wrote:
OK. You could also just use a full Erlang package, like from ESL (Erlang Solutions).
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/gotthardp/rabbitmq-email/issues/45#issuecomment-970605981, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE7QUTRCVI3NHCHWBB6TFHLUMKWGLANCNFSM5GYQXU6Q . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
Hey Luke,
So after some initial testing is looks like the plugin is blocking the rabbitmq-server boot sequence.
It enables with an active service, but on service restart or cold start, the plugin is causing a crash.
boot_sequence_fail.txt erl_crash_1.txt
Sorry the dump file is quiet large so I'm not entirely sure where to look for issues but generally it appears to be with:
Slogan: init terminating in do_boot ({error,{rabbitmq_email,{{shutdown,{_}},{rabbitmq_email_app,start,[_]}}}})
im going to retry compiling
I need the full RabbitMQ log file. Re-compiling probably won't change anything.
More than likely you're hitting the issue fixed here:
https://github.com/rabbitmq/rabbitmq-server/pull/3685
I will know when I get the full RabbitMQ log. If that's the case, you will have to wait for the next RabbitMQ release if I can't figure out a workaround.
Let me turn on more verbose logging as well.
Could this be related to compiling against esl-erlang, and but running the rabbitmq-server with the packagecloud rpm? Maybe some missing library support dependancies between those.
Yes, you are hitting the issue to which I linked:
{error,broker_not_found_on_node}
Let me see what I can do.
@mforde84 please update your clone (ensure the update-for-rmq
branch is being used), recompile, and re-copy the plugins to your installation. I added a workaround in this commit https://github.com/gotthardp/rabbitmq-email/pull/46/commits/5b7828d8a3e15296e9fe8b50e9018041893558de.
cool, will do
alright, looks good. confirmed server v3.8.9 / erlang v23.2.1 successfully boots with the plugin
many thankyous
martin
@mforde84 I am wrapping up PR #46. Please note that I have only tested the changes using RabbitMQ v3.9.x
versions. I suggest upgrading ASAP!
Ok thankyou
On November 22, 2021 3:28:30 PM Luke Bakken @.***> wrote:
@mforde84 I am wrapping up PR #46. Please note that I have only tested the changes using RabbitMQ v3.9.x versions. I suggest upgrading ASAP! — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.
I'll schedule our upgrade
On November 22, 2021 3:28:30 PM Luke Bakken @.***> wrote:
@mforde84 I am wrapping up PR #46. Please note that I have only tested the changes using RabbitMQ v3.9.x versions. I suggest upgrading ASAP! — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.
I've been trying to get rabbitmq-email to run on our rabbit stack, and am running into some issue.
Currently we are running: rabbitmq-server 3.8.9 erl/otp - 23 - Erlang/OTP 23 [erts-11.1.5] [source] [64-bit] [smp:2:2] [ds:2:2:10] [async-threads:1] [hipe]
First thing I tried was moving the precompiled ez package to the plugins directory for rabbitmq-server
The service hangs and returns a dependancy error on gen_smtp
So I build gen_smtp from git
The resulting build is as follows:
So what I had assumed here was that the library support was important for gen_smtp server functionality so I copied the following build directories to the erland library path:
Now when I restart rabbitmq-server it successfully compeltes and offers the plugin for activation
Next I update the advanced rabbit config to include the sample server config listed in the git
Service restarts appropriately with the new configs, however when I go to enable the plugin it appears that rabbitmq-email plugin can not start the gen_smtp server
However when I attempt to start the gen_smtp server from a erl shell it successfully completes:
This is also successful from the /bin/erl
My current thinking is that there is a erl/otp compatibality issue between the plugin that was compiled with otp/21 and the gen_smtp libraries that are compiled against otp/23
So currently, I'm working on trying to compile the rabbitmq-email plugin with otp/23, and am running into some issues with build. But before I get into that, I think next steps I will be taking is trying to downgrade, erl/otp to 21 and trying to start the precompiled plugin. Until I can test, I'd like to ask if you have any suggestions or recommendation on anything I've currently outlined.