-
Notifications
You must be signed in to change notification settings - Fork 29
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
can't enable plugin #3
Comments
I'm afraid I haven't been keeping the rabbithub codebase up-to-date with respect to RabbitMQ. It probably needs some work to run with recent releases; in particular, to run with the current RabbitMQ HTTP-server APIs. |
It seems like replacing rabbitmq_mochiweb by "mochiweb", allowed me to enable the plugin. now I'm gonna try if it actually works. |
On 8 April 2013 14:51, sonoman [email protected] wrote:
Regards, |
I helped Tony bring the code up to date to work with 2.8.x, but I must Also, you might find some of the junk in On Tue, Apr 9, 2013 at 7:11 AM, Tony Garnock-Jones <[email protected]
|
Sadly i got some errors during startup of the broker after enabling rabbithub. I tried recompiling (a recommendation i found in some blog for the same error on another component), but it got worst...that time it didn't even start the broker. Bad luck :( =ERROR REPORT==== 8-Apr-2013::14:26:23 === =ERROR REPORT==== 8-Apr-2013::14:26:23 === =ERROR REPORT==== 8-Apr-2013::14:26:23 === =ERROR REPORT==== 8-Apr-2013::14:26:23 === |
This suggests that the RabbitHub plugin was built with a higher version of On Tue, Apr 9, 2013 at 9:30 AM, sonoman [email protected] wrote:
|
This is the output when I enter erlang's interactive shell: root@ubuntu:/mnt/hgfs/Shared/aws-dev# erl Eshell V5.8.5 (abort with ^G) |
I've successfully started rabbitmq with erlang R16B, but again, when I enable rabbithub, rabbitmq stops working. this is the log with the error at startup (after enabling rabbithub). =INFO REPORT==== 9-Apr-2013::11:41:53 === Log files (may contain more information): Stack trace: =INFO REPORT==== 9-Apr-2013::11:41:54 === =INFO REPORT==== 9-Apr-2013::11:41:54 === |
Right, this is the failure I expected. Certain modules have been renamed recent(ish)ly I think. Some code changes in Rabbithub will be required. They will be minor (I hope) but they are necessary. |
Help me understand and I will give a try (though I know nothing about erlang :) )... |
It's actually the other end of the stack trace that's the innermost: |
If you just want to play around and experiment with the RabbitHub plugin, I Brett On Wed, Apr 10, 2013 at 8:57 AM, Tony Garnock-Jones <
|
actually I'm trying to execute it in our rabbitmq environment....I think I'll try to finish with the re-compilation...running into some issues now (like for example, i can't find the xmerl.hrl include file anywhere in my system :( ) |
Hi sonoman, have you had any success in your attempts to re-align rabbithub with the latest rabbitmq distribution? I'm using rabbitmq-server-3.1.4 and running into the same problem with mochiweb at the moment :( |
Try https://github.com/brc859844/rabbithub. I updated the code a few months Brett On Thu, Aug 15, 2013 at 11:53 AM, redsquare [email protected]:
|
Brett, I picked up a binary you dropped on https://region-a.geo1.objects.hpcloudsvc.com:443/v1/66395568832599/RabbitHub/rabbithub-3.1.0.ez. Is this compiled from the source on https://github.com/brc859844/rabbithub? I was able to enable rabbithub-3.1.0.ez with 3.1.4 but immediately after I restarted RabbitMQ service it terminated with "RabbitMQ: Erlang machine stopped instantly (distribution name conflict?). The service is not restarted as OnFail is set to ignore." When I disable rabbithub, RabbitMQ service is all happy and running again. Not sure I understand the problem but here is log entries: =INFO REPORT==== 15-Aug-2013::11:01:02 ===Error description: Stack trace: =INFO REPORT==== 15-Aug-2013::11:01:03 ===stopped TCP Listener on 0.0.0.0:5672 =CRASH REPORT==== 15-Aug-2013::11:01:03 === Tried downgrading to RabbitMQ 3.1.0, but still ran into similar (same?) problem when enabling plugin: =CRASH REPORT==== 15-Aug-2013::14:04:46 === =CRASH REPORT==== 15-Aug-2013::14:05:04 === I should have mentioned that the instance running on Windows Server 2012. Natalya |
Okay. I'll try to have a look at it over the weekend - it will hopefully Regards, On Fri, Aug 16, 2013 at 4:40 AM, redsquare [email protected] wrote:
|
Awesome! I noticed 3.1.5 was released in the last couple of days, will definitely want it if it works with rabbithub. Please please let me know what you find as far as the cause of a crash. Thank you! |
Okay, give Brett On Sat, Aug 17, 2013 at 3:41 AM, redsquare [email protected] wrote:
|
Brett, thank you for tweaking the plugin! I feel I'm so close but no luck :( I disabled rabbithub-3.1.0.ez and uninstalled rabbitmq 3.1.0. I then installed 3.1.5 and enabled rabbithub-3.1.5.ez. But got the same error again: =CRASH REPORT==== 19-Aug-2013::11:22:31 === I am not sure how to debug this. But I thought it might be related to a port number since rabbitmq_management was configured to use 15672 and rabbithub was trying to run on 15670. So I changed the config and put rabbitmq_management on 15670, restarted and confirmed that the mgmt web console ran on 15670, all looked good. Then enabled rabbithub and it crashed the service again with the error that looked identical to the above. I've never used Erlang and never tried the plugin development for RabbitMQ. Would I need to install the dev tools and run the source code on the machine where it crashes to get to the bottom of this? Dunno if it matters but it's a 64-bit Windows Server 2012 machine. |
That's just a bit frustrating! When I updated and tested the plugin over the weekend I was using Erlang Just out of interest, what version of Erlang are you using? Brett On Tue, Aug 20, 2013 at 7:09 AM, redsquare [email protected] wrote:
|
Heh, otp_win64_R16B01.exe :) That's great news - the Erlang version dependency you found! The worst case, I can try to downgrade :) |
With a bit of frantic hacking I've got things working with Erlang 16B01. Give Tony, FYI I'm not entirely sure what the guys have done that caused what Brett On Tue, Aug 20, 2013 at 10:10 AM, redsquare [email protected]:
|
Yay! It's definitely much happier now and no errors on startup :) Thank you so much for tweaking the code! As far as implementation goes, there is no support for hub.secret, correct? Also, the rabbithub doc notes that the exchange type can be specified with a query string param, is it also possible to mark queue/exchange/messages as durable using query string? Thank you, Brett, this is great stuff! |
No problem. You are correct; there is currently no support for hub.secret. I'll try to Regards, On Wed, Aug 21, 2013 at 4:51 AM, redsquare [email protected] wrote:
|
hub.secret is one of those nice-to-have things but I was hoping the persistence was already there since RabbitMQ supports it. Of course it may not be easy to leverage it from the plugin side, I just don't know. Will wait for the updates and try to learn Erlang meantime :) Thanks, Brett! |
Brett, it shouldn't be a problem if one or both of the URLs (pub and sub) are HTTPS? For whatever reason everything works for me as long as I don't use SSL. But I see no attempts to post to a HTTPS URL when publishing from HTTP URL. Although I always get get "Accepted" 202 response from the hub in all cases. Then nothing happens and nothing in IIS or RabbitMQ logs (not sure if rabbit logs would even show anything). Just curious. |
In terms of HTTPS, for calls to RabbitHub it would be necessary to Over the weekend I was planning to start looking at the durable/persistent Regards, On Fri, Aug 23, 2013 at 4:54 AM, redsquare [email protected] wrote:
|
Ah, I see now. The SSL question was more out of curiosity than anything else as a result of a test I ran. I think that for purely RabbitHub purposes hub.secret should do just fine without an overhead of maintaining SSL certificates. I was contemplating including the hmac digest of the entire content into the request body in the absence of hub.secret implementation. Passing the key from sub to pub would become a somewhat manual process. But I may re-think all that. On a different subject, durable queues/messages sound fantastic! :) UPDATE: just noticed when I create a queue via RabbitHub url, it gets "durable" set to True when I inspect it in web management console. Is this reflective of the actual setting? Also, it doesn't automatically mean that messages are durable, correct? |
Brett, I was wondering if you had any luck configuring durable queues/messages through RabbitHub? I noticed that the queues created using hub URLs were marked durable in the management console. So after creating two queues I wanted to see what happens if I restart the service. One of them had one unprocessed message in it but no subscribers. Another one has been passing messages to a subscriber. I couldn't start the service after stopping it. It seemed to have trouble with the queue that had a subscriber: =CRASH REPORT==== 27-Aug-2013::13:42:51 === An observation from the log above, the rabbithub_lease in the log above seems to be set to a high value of 1692656779662140 although I passed 315360000 seconds (roughly 10 years) when subscribing. Not sure how that got messed up... |
Sorry, I've not had time to work on this. In terms of the restart problem, On Wed, Aug 28, 2013 at 9:19 AM, redsquare [email protected] wrote:
|
Brett, no prob, I figured something else was up :) The subscriber, indeed, was up and running. It currently lives on the same machine. IIS was up and running but it didn't log any communication attempts to callback URL beyond Rabbit restart time. |
The restart issue should now be fixed. Please give Regards, On Wed, Aug 28, 2013 at 10:07 AM, redsquare [email protected]:
|
Thanks, Brett! Will give it a try. I've been trying to jump start myself on Erlang but have spent a lot of hours just trying to get the environment up. I was told Windows is not a good a fit for it, so I went with Ubuntu 12.04. But turns out it officially supports r14b, while the latest Ubuntu 13.10 supports r15b :( I have been trying to install r16b manually while using backports and work-arounds for RabbitMQ dependencies. So far it has been a major headache. What OS are you on if you don't mind me asking? Natalya |
Natalya, I've not really tried doing Erlang development on Windows, but I would not Regards, Brett On Tue, Sep 3, 2013 at 4:23 AM, redsquare [email protected] wrote:
|
Interesting info. I wasn't sure how swamped you were, so I just wanted to compile RabbitHub and try chasing the re-start bug you've fixed. I wasn't planning for an extensive Erlang development beyond looking at RabbitHub. I posted in rabbitmq group if plugins could be developed/built on win/cygwin and got this response from a rabbitmq guy: "At the time of writing the released plugins cannot be built by Cygwin from within the public umbrella repository due to the reasons you list (filesystem conventions and escript behavior on Win). If you have a choice then opt for a Unix/GNU platform where the existing build infrastructure will work." I tried Ubuntu with manually compiled r16b and ran into versioning problems due to rabbitmq requiring erlang-nox and Ubuntu trying to give me an old version of erlang (r14b) when I used apt-get to install erlang-nox. This problem and a workaround is described in detail here: http://blog.eriksen.com.br/en/how-install-rabbitmq-latest-erlang-release-debian And although this article explains how to work around erlang-nox dependency, there is still dependency on erlang-dev and xsltproc (libxslt) required to build an umbrella. I found and installed erlang-dev for r16b and one of the recent versions of libxslt. The latter turned out to be buggy. This is where it became annoying and I gave up late Sun night. If I knew things would have worked on Windows with cygwin I would have definitely chosen that path... I may try it sometime this week. Thank you once again, Brett! |
Interesting indeed; I must have missed that exchange on the RabbitMQ $ git clone https://github.com/brc859844/rabbithub ... and copy ./dist/rabbithub-3.1.5.ez to the RabbitMQ plugins directory, Regards, P.S. If you've not been put off Erlang and I'm right about your location, On Tue, Sep 3, 2013 at 5:32 PM, redsquare [email protected] wrote:
|
Brett, the fix worked great, thank you! As far as infrastructure, here is my question and the answers I got: http://rabbitmq.1065348.n5.nabble.com/plugin-development-on-Windows-possible-td29164.html To be fair it was noted that I could work around with my own build infrastructure. But that's not much info for a newbie :) The rebar friendly fork of rabbit_common you are using is this - https://github.com/jbrisbin/rabbit_common? I'll give it a shot. Also as far as the code goes, to mark messages persistent would it be correct to modify rabbithub_web.erl, line 504 inside of extract_message(ExchangeResource, ParsedQuery, Req) from ??? And lastly, looks like I missed my chance to attend Erlang Factory in 2013, this https://www.erlang-solutions.com/event/erlang-factory-sf-bay-area-2013 would have been closer to home :) |
Yes, that change will work. I had been thinking of allowing the delivery I probably should start trying to think of a topic for a talk at next On Wed, Sep 4, 2013 at 12:16 PM, redsquare [email protected] wrote:
|
Cool! I'll start with brute force hard-coding of delivery mode and if I feel brave enough will see about using query string which would be much nicer. Hmac is another thing I'd like to have for my project. That's if I ever get things in order and running for building :-D I saw your talk from last year's SFO Erlang factory and ppt on "The Polyglot Rabbit", very cool stuff. I very much agree that the ability to use Rabbit to publish using one protocol and consume using another is underrated. Also, as far as RabbitHub is concerned, no other PubSubHubbub implementation easily supports publishing format-independent (non-Atom, non-RSS) messages. This was big for me. Right now I'm pushing JSON and very happy about it! |
Followed your instructions for win/cygwin and couldn't believe how easy it was compared to official instructions and looking back at my struggles with Ubuntu. Made my change, compiled and will deploy and test tomorrow. Thank you so much for pointing me in the right direction! |
That's excellent news! FYI, I've been tinkering with replacing Tony's sneaky little hand-rolled Regards, On Thu, Sep 5, 2013 at 6:15 PM, redsquare [email protected] wrote:
|
Yeah, I'm so excited it finally worked :) I'm going to see about passing delivery mode in query string and, yeah, SSL support sounds terrific too! |
Brett, I noticed rabbithub uses error_logger to log errors/info messages. Do you get any rabbithub specific output from these statements? For example, register_subscription_pid in rabbithub_subscription.erl calls error_logger:info_report({startup, Result, ProcessModule, Lease}) but I see no INFO REPORT in the rabbitmq log file. I tried calling error_logger:info_report from within a function in rabbithub_web.erl but that didn't get logged either. Almost like this statement gets skipped. |
Good point. Probably the best thing to do is to update the code to leverage On Fri, Sep 6, 2013 at 5:28 PM, redsquare [email protected] wrote:
|
Got it. I thought error_logger was supposed to just work. I looked at some other rabbit plugins and all of them use error_logger almost exclusively. So I thought I was missing a reference somewhere or something like that. But rabbit_log worked just great, thank you! :) |
Yeah, with regard to the error_logger problem, we'd probably need to start Brett On Sat, Sep 7, 2013 at 7:12 AM, redsquare [email protected] wrote:
|
Agreed! And can totally relate to being inherently lazy :) |
Brett, another question. I was trying to figure out what happens to the queue/messages if subscriber, the owner of the callback URL, goes offline and becomes unreachable. From looking at the code my understanding is that if rabbithub_consumer is unable to deliver a message to a callback URL, it will throw an error and then delete a subscription? If the queue is durable, the messages will then pile up there but will never be consumed unless subscriber re-subscribes? If subscriber comes back online and re-subscribes, will queued messages then be delivered? |
If you have subscribed to a queue and the subscriber goes away (or cannot Note that with RabbitHub you can subscribe to queues or to exchanges. In On Mon, Sep 9, 2013 at 10:32 AM, redsquare [email protected] wrote:
|
This is the output of the command line. rabbithub plug-in is expecting a plugin named "rabbitmq_mochiweb", which I can't find on my rabbitmq distribution. I've tried enabling similar plugins (see below), with no success.
root@ubuntu:/mnt/hgfs/Shared# sudo rabbitmq-plugins enable rabbithub
Error: The following dependencies could not be found:
rabbitmq_mochiweb
root@ubuntu:/mnt/hgfs/Shared# sudo rabbitmq-plugins enable mochiweb
Plugin configuration unchanged.
root@ubuntu:/mnt/hgfs/Shared# sudo rabbitmq-plugins enable webmachine
Plugin configuration unchanged.
root@ubuntu:/mnt/hgfs/Shared# sudo rabbitmq-plugins enable rabbithub
Error: The following dependencies could not be found:
rabbitmq_mochiweb
Is there a way to solve this ?
The text was updated successfully, but these errors were encountered: