[rabbitmq-discuss] Missing dependency in management plugin/mochiweb
Alvaro Videla
videlalvaro at gmail.com
Wed Apr 25 13:24:14 BST 2012
Hi,
So let's start again because my first error report was wrong. I shouldn't
have mentioned mochiweb or the management plugin. I did so because the
first time this error happened to me I was trying to enable those plugins.
So, yes. The release is created based on the dependencies from the
rabbit.app which doesn't declare inets as one if its dependencies:
http://hg.rabbitmq.com/rabbitmq-server/file/89d34c362862/ebin/rabbit_app.in#l13
So when the Erlang release is generated the inets is not shipped with the
.tar created.
Actually I think any app used by the project which also appears here: ls
/usr/local/lib/erlang/lib/ should be declared as a dependency. (kernel and
stdlib are required anyway, same thing with erts and sasl if used).
Declaring the app dependency is not required to generate a release per-se,
but is required by the rabbit_prelaunch.erl script that generates the
release file automatically: See:
http://hg.rabbitmq.com/rabbitmq-server/file/89d34c362862/src/rabbit_prelaunch.erl#l72
So when generating a .rel file you can actually write all the app
dependencies manually but I automated the process by "borrowing" code from
the rabbit_prelaunch script.
So in my case to fix the issue I just added some extra apps here:
https://github.com/videlalvaro/tamedrabbit/blob/master/erlang/rabbit_release.erl#L9(Note
that rabbit_prelaunch.erl has the same erlang macro on top). By
adding inets and xmerl there I made sure that those apps are shipped with
my custom release.
So I use my own rabbit_release.erl to generate the release .tar and what
not. Then rabbitmq-server uses rabbit_prelaunch.erl to generate it's own
release file that is loaded during server startup. That release file
generated by the prelaunch script is based on the target system, that of
course will not include inets.
Does it make sense now?
Regards,
Alvaro
On Wed, Apr 25, 2012 at 1:57 PM, Simon MacMullen <simon at rabbitmq.com> wrote:
> On 25/04/12 12:52, Alvaro Videla wrote:
>
>> I tried to reproduce the problem. Actually *rabbitmq-server* needs to
>> declare *inets* in its app dependencies.
>>
>
> I still don't get it - does the release build thing that you have check
> only the rabbit.app descriptor, or those of all the plugins too?
>
> If the former, why did adding xmerl to rabbitmq-management fix anything?
> (it was the right thing to do anyway, but why did it not cause this
> problem?)
>
> If the latter, why is inets not being picked up due to its presence in
> mochiweb.app?
>
> Cheers, Simon
>
> --
> Simon MacMullen
> RabbitMQ, VMware
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20120425/521fe727/attachment.htm>
More information about the rabbitmq-discuss
mailing list