Here&#39;s what I&#39;ve got.  I think it is configured properly from a rabbitmq point of view.  The difference between this and make test (which works) is that i&#39;m hosting the html and js on apache, and i&#39;m using an absolute URL for the rabbitmq json-rpc service.  I may have entered the wrong values in the various URI variables in the javascript-- not really sure.<div>
<div><br></div><div><div>~ &gt; /usr/local/sbin/rabbitmqctl status</div><div>Status of node rabbit@H5Pro ...</div><div>[{running_applications,</div><div>     [{rabbit_jsonrpc_channel,&quot;RabbitMQ JSON-RPC Channels&quot;,&quot;0.01&quot;},</div>
<div>      {rabbit,&quot;RabbitMQ&quot;,&quot;1.7.2&quot;},</div><div>      {os_mon,&quot;CPO  CXC 138 46&quot;,&quot;2.2.5&quot;},</div><div>      {sasl,&quot;SASL  CXC 138 11&quot;,&quot;2.1.9&quot;},</div><div>      {rabbit_jsonrpc,&quot;Rabbit JSON-RPC&quot;,&quot;0.01&quot;},</div>
<div>      {rfc4627_jsonrpc,&quot;JSON RPC Service&quot;,&quot;0.01&quot;},</div><div>      {rabbit_mochiweb,&quot;RabbitMQ Mochiweb Embedding&quot;,&quot;0.01&quot;},</div><div>      {mochiweb,&quot;MochiMedia Web Server&quot;,&quot;0.01&quot;},</div>
<div>      {mnesia,&quot;MNESIA  CXC 138 12&quot;,&quot;4.4.13&quot;},</div><div>      {stdlib,&quot;ERTS  CXC 138 10&quot;,&quot;1.16.5&quot;},</div><div>      {kernel,&quot;ERTS  CXC 138 10&quot;,&quot;2.13.5&quot;}]},</div>
<div> {nodes,[rabbit@H5Pro]},</div><div> {running_nodes,[rabbit@H5Pro]}]</div><div>...done.</div><div><br></div><div>thanks again,</div><div>bp</div><br><div class="gmail_quote">On Thu, Apr 22, 2010 at 11:55 PM, Tony Garnock-Jones <span dir="ltr">&lt;<a href="mailto:tonyg@lshift.net">tonyg@lshift.net</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Not *quite* what is required, but a good start, is to run &quot;rabbitmqctl status&quot;.<br>
For instance, on my dev instance of RabbitMQ, I get:<br>
<br>
~/dev/rabbitmq-umbrella/rabbitmq-server$ ./scripts/rabbitmqctl status<br>
Status of node rabbit@walk ...<br>
[{running_applications,<br>
     [{rabbit_lvc_plugin,&quot;RabbitMQ last-value cache exchange plugin&quot;,&quot;0.01&quot;},<br>
      {rabbit_script_exchange,&quot;RabbitMQ Script Exchange Plugin&quot;,&quot;0.01&quot;},<br>
<div class="im">      {rfc4627_jsonrpc,&quot;JSON RPC Service&quot;,&quot;0.01&quot;},<br>
</div>      {rabbitmq_smtp_server,&quot;RabbitMQ SMTP Server&quot;,&quot;0.0&quot;},<br>
      {rabbithub,&quot;rabbithub&quot;,&quot;0.0.1&quot;},<br>
      {crypto,&quot;CRYPTO version 1&quot;,&quot;1.6.4&quot;},<br>
<div class="im">      {mochiweb,&quot;MochiMedia Web Server&quot;,&quot;0.01&quot;},<br>
</div>      {rabbit_stomp,&quot;Embedded Rabbit Stomp Adapter&quot;,&quot;0.01&quot;},<br>
      {rabbit,&quot;RabbitMQ&quot;,&quot;%%VSN%%&quot;},<br>
<div class="im">      {rabbit_mochiweb,&quot;RabbitMQ Mochiweb Embedding&quot;,&quot;0.01&quot;},<br>
</div><div class="im">      {mnesia,&quot;MNESIA  CXC 138 12&quot;,&quot;4.4.13&quot;},<br>
</div><div class="im">      {os_mon,&quot;CPO  CXC 138 46&quot;,&quot;2.2.5&quot;},<br>
      {sasl,&quot;SASL  CXC 138 11&quot;,&quot;2.1.9&quot;},<br>
</div>      {erlang_smtp,&quot;Erlang POP3 and SMTP server library code&quot;,&quot;0.0&quot;},<br>
<div class="im">      {stdlib,&quot;ERTS  CXC 138 10&quot;,&quot;1.16.5&quot;},<br>
      {kernel,&quot;ERTS  CXC 138 10&quot;,&quot;2.13.5&quot;}]},<br>
</div> {nodes,[rabbit@walk]},<br>
 {running_nodes,[rabbit@walk]}]<br>
...done.<br>
<br>
<br>
You&#39;ll see the jsonrpc-channel app in the list, if it&#39;s installed and<br>
initialised correctly.<br>
<br>
Cheers,<br>
  Tony<br>
<div class="im"><br>
<br>
Benjamin Polidore wrote:<br>
&gt; hey, i can&#39;t seem to get past this. i&#39;m probably doing something silly,<br>
&gt; but i keep getting:<br>
&gt;<br>
&gt; {&quot;version&quot;:&quot;1.1&quot;,&quot;id&quot;:null,&quot;error&quot;:{&quot;name&quot;:&quot;JSONRPCError&quot;,&quot;code&quot;:404,&quot;message&quot;:&quot;Procedure not found&quot;,&quot;error&quot;:[&quot;<a href="http://h5pro.local:55672/rpc/rabbitmq" target="_blank">http://h5pro.local:55672/rpc/rabbitmq</a>&quot;,&quot;&quot;]}}<br>

&gt;<br>
&gt; when i run the test.js from my mac&#39;s apache server.  is there a dead simple way to test that jsonrpc-channel is working when it&#39;s running as a plugin?<br>
&gt;<br>
&gt;<br>
&gt; On Sun, Apr 18, 2010 at 2:31 PM, Benjamin Polidore &lt;<a href="mailto:polidore@gmail.com">polidore@gmail.com</a><br>
</div><div class="im">&gt; &lt;mailto:<a href="mailto:polidore@gmail.com">polidore@gmail.com</a>&gt;&gt; wrote:<br>
&gt;<br>
&gt;     Thanks, Paul.  I decided not to mess with the source code, and I&#39;m<br>
&gt;     just using OS X&#39;s built in apache for my static files.<br>
&gt;<br>
&gt;     Now I&#39;m getting a different problem. I modified the test program to<br>
&gt;     work in this new context by changing the paths for loading the<br>
&gt;     javascripts and changing the urls in rabbitmq.js:<br>
&gt;<br>
&gt;        factoryServiceUrl: *&quot;<a href="http://h5pro.local:55672/rpc/rabbitmq" target="_blank">http://h5pro.local:55672/rpc/rabbitmq</a>&quot;,*<br>
&gt;       rpcServiceUrlBase*: &quot;<a href="http://h5pro.local:55672/rpc/" target="_blank">http://h5pro.local:55672/rpc/</a>&quot;,*<br>
&gt;<br>
&gt;     and in test.js:<br>
&gt;<br>
&gt;         var channelFactory = new<br>
&gt;     JsonRpc.Service(&quot;*<a href="http://h5pro.local:55672/rpc/rabbitmq" target="_blank">http://h5pro.local:55672/rpc/rabbitmq</a>&quot;, *<br>
&gt;<br>
&gt;     But it doesn&#39;t work.  When I do an ngrep on the traffic going<br>
&gt;     between my js and mochiweb, I get:<br>
&gt;<br>
</div>&gt;     T <a href="http://10.0.1.3:60988" target="_blank">10.0.1.3:60988</a> &lt;<a href="http://10.0.1.3:60988" target="_blank">http://10.0.1.3:60988</a>&gt; -&gt; <a href="http://10.0.1.3:55672" target="_blank">10.0.1.3:55672</a><br>

&gt;     &lt;<a href="http://10.0.1.3:55672" target="_blank">http://10.0.1.3:55672</a>&gt; [AP]<br>
<div class="im">&gt;       OPTIONS /rpc/rabbitmq HTTP/1.1..Host:<br>
&gt;     h5pro.local:55672..Connection: keep-alive..User-Agent: Mozilla/5.0<br>
&gt;     (Macintosh; U; Intel Mac OS X 10_6_3; e<br>
&gt;       n-US) AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0.375.9<br>
&gt;     Safari/533.4..Referer:<br>
&gt;     <a href="http://h5pro.local/~bp/rabbitTest/www-examples/test/..Access" target="_blank">http://h5pro.local/~bp/rabbitTest/www-examples/test/..Access</a><br>
&gt;       -Control-Request-Method: POST..Origin:<br>
&gt;     <a href="http://h5pro.local." target="_blank">http://h5pro.local.</a>.Access-Control-Request-Headers:<br>
&gt;     X-Requested-With, Content-Type, Accept..Accept: */*..<br>
&gt;       Accept-Encoding: gzip,deflate,sdch..Accept-Language:<br>
&gt;     en-US,en;q=0.8..Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3....<br>
&gt;<br>
&gt;     ##<br>
</div>&gt;     T <a href="http://10.0.1.3:55672" target="_blank">10.0.1.3:55672</a> &lt;<a href="http://10.0.1.3:55672" target="_blank">http://10.0.1.3:55672</a>&gt; -&gt; <a href="http://10.0.1.3:60988" target="_blank">10.0.1.3:60988</a><br>

&gt;     &lt;<a href="http://10.0.1.3:60988" target="_blank">http://10.0.1.3:60988</a>&gt; [AP]<br>
<div class="im">&gt;       HTTP/1.1 200 OK..Server: MochiWeb/1.0 (Any of you quaids got a<br>
&gt;     smint?)..Date: Sun, 18 Apr 2010 18:27:48 GMT..Content-type:<br>
&gt;     text/plain..Content-L<br>
&gt;       ength: 155....<br>
&gt;<br>
&gt;<br>
&gt;     ##<br>
</div>&gt;     T <a href="http://10.0.1.3:55672" target="_blank">10.0.1.3:55672</a> &lt;<a href="http://10.0.1.3:55672" target="_blank">http://10.0.1.3:55672</a>&gt; -&gt; <a href="http://10.0.1.3:60988" target="_blank">10.0.1.3:60988</a><br>

&gt;     &lt;<a href="http://10.0.1.3:60988" target="_blank">http://10.0.1.3:60988</a>&gt; [AP]<br>
<div class="im">&gt;       {*&quot;version&quot;:&quot;1.1&quot;,&quot;id&quot;:null,&quot;error&quot;:{&quot;name&quot;:&quot;JSONRPCError&quot;,&quot;code&quot;:404,&quot;message&quot;:&quot;Procedure<br>
&gt;     not found&quot;,&quot;error&quot;:[&quot;<a href="http://h5pro.local:55672/rpc/rabb" target="_blank">http://h5pro.local:55672/rpc/rabb</a>  itmq&quot;,&quot;&quot;]}}    *<br>
&gt;     *<br>
&gt;     *<br>
&gt;     *Thoughts?       *<br>
&gt;     *<br>
&gt;     Thanks,<br>
&gt;     bp        *<br>
&gt;<br>
&gt;     On Sat, Apr 17, 2010 at 6:46 PM, Paul Jones &lt;<a href="mailto:pauljones23@gmail.com">pauljones23@gmail.com</a><br>
</div><div><div></div><div class="h5">&gt;     &lt;mailto:<a href="mailto:pauljones23@gmail.com">pauljones23@gmail.com</a>&gt;&gt; wrote:<br>
&gt;<br>
&gt;         Hi Benjamin,<br>
&gt;<br>
&gt;         In the production mode, mochiweb doesn&#39;t really have a docroot<br>
&gt;         setup. /rabbitmq_lib will serve the files in priv/www, but that<br>
&gt;         is as far as it goes.<br>
&gt;<br>
&gt;         However... if you want to serve some other files then you could<br>
&gt;         always use code similar to what the test mode does to make it<br>
&gt;         happen. For example, if you were to add:<br>
&gt;<br>
&gt;         Handler = rabbit_mochiweb:static_context_handler(&quot;&quot;, ?MODULE,<br>
&gt;         &quot;priv/mydocroot&quot;),<br>
&gt;         ok = rabbit_mochiweb:register_global_handler(Handler),<br>
&gt;<br>
&gt;         after the line:<br>
&gt;         rabbit_mochiweb:register_static_context(ContextRoot, ?MODULE,<br>
&gt;         &quot;priv/www&quot;)<br>
&gt;<br>
&gt;         in src/rabbit_jsonrpc_channel_app.erl, then once you&#39;ve<br>
&gt;         installed the plugin into Rabbit, any file put into<br>
&gt;         priv/plugins/rabbitmq-jsonrpc-channel/priv/mydocroot should be<br>
&gt;         served from the root context of mochiweb.<br>
&gt;<br>
&gt;         BTW, I&#39;ve just noticed a bug in the packaging of the<br>
&gt;         jsonrpc-channel plugin such that if you do run that plugin by<br>
&gt;         installing it via a .ez, you&#39;ll need to copy the priv/www<br>
&gt;         directory into priv/plugins/rabbitmq-jsonrpc-channel/priv/www<br>
&gt;         (otherwise libraries such as rabbitmq.js won&#39;t be available).<br>
&gt;<br>
&gt;         Thanks,<br>
&gt;         Paul.<br>
&gt;<br>
&gt;<br>
&gt;         On Sat, Apr 17, 2010 at 11:29 PM, Benjamin Polidore<br>
</div></div><div><div></div><div class="h5">&gt;         &lt;<a href="mailto:polidore@gmail.com">polidore@gmail.com</a> &lt;mailto:<a href="mailto:polidore@gmail.com">polidore@gmail.com</a>&gt;&gt; wrote:<br>
&gt;<br>
&gt;             Hey, paul, I installed all the dependencies to<br>
&gt;             rabbitmq-jsonrpc-channel (see below).<br>
&gt;<br>
&gt;             I see that you add a little context in test mode.<br>
&gt;              Basically, I was hoping to use the plugin to host my HTML<br>
&gt;             and javascript in dev mode so I don&#39;t have to run another<br>
&gt;             webserver on my laptop.  I prefer to run rabbitmq in<br>
&gt;             &quot;production&quot; mode on my laptop, and I was curious what<br>
&gt;             mochiweb thinks the docroot is in this mode.<br>
&gt;<br>
&gt;             [{running_applications,<br>
&gt;                  [{rabbit_jsonrpc_channel,&quot;RabbitMQ JSON-RPC<br>
&gt;             Channels&quot;,&quot;0.01&quot;},<br>
&gt;                   {rabbit,&quot;RabbitMQ&quot;,&quot;1.7.2&quot;},<br>
&gt;                   {os_mon,&quot;CPO  CXC 138 46&quot;,&quot;2.2.5&quot;},<br>
&gt;                   {sasl,&quot;SASL  CXC 138 11&quot;,&quot;2.1.9&quot;},<br>
&gt;                   {rabbit_jsonrpc,&quot;Rabbit JSON-RPC&quot;,&quot;0.01&quot;},<br>
&gt;                   {rfc4627_jsonrpc,&quot;JSON RPC Service&quot;,&quot;0.01&quot;},<br>
&gt;                   {rabbit_mochiweb,&quot;RabbitMQ Mochiweb Embedding&quot;,&quot;0.01&quot;},<br>
&gt;                   {mochiweb,&quot;MochiMedia Web Server&quot;,&quot;0.01&quot;},<br>
&gt;                   {mnesia,&quot;MNESIA  CXC 138 12&quot;,&quot;4.4.13&quot;},<br>
&gt;                   {stdlib,&quot;ERTS  CXC 138 10&quot;,&quot;1.16.5&quot;},<br>
&gt;                   {kernel,&quot;ERTS  CXC 138 10&quot;,&quot;2.13.5&quot;}]},<br>
&gt;              {nodes,[rabbit@H5Pro]},<br>
&gt;              {running_nodes,[rabbit@H5Pro]}]<br>
&gt;             ...done.<br>
&gt;<br>
&gt;<br>
&gt;             On Sat, Apr 17, 2010 at 4:11 PM, Paul Jones<br>
</div></div><div class="im">&gt;             &lt;<a href="mailto:pauljones23@gmail.com">pauljones23@gmail.com</a> &lt;mailto:<a href="mailto:pauljones23@gmail.com">pauljones23@gmail.com</a>&gt;&gt; wrote:<br>
&gt;<br>
&gt;                 Hi Benjamin,<br>
&gt;<br>
&gt;                 Which plugins have you installed into RabbitMQ? The<br>
&gt;                 mochiweb plugin alone simply embeds a webserver - you&#39;ll<br>
&gt;                 need to install rabbitmq-jsonrpc and<br>
&gt;                 rabbitmq-jsonrpc-channel to get the JSON services.<br>
&gt;<br>
&gt;                 If you have done this, then you might be hitting the<br>
&gt;                 fact that when running under test, an additional context<br>
&gt;                 is installed under the root that provides all the<br>
&gt;                 various test examples. We don&#39;t activate this in the<br>
&gt;                 &quot;production&quot; mode, since we don&#39;t expect you&#39;ll want<br>
&gt;                 them in a real deployment. The scripts for doing<br>
&gt;                 JSON-RPC are still there though - under /rabbitmq_lib<br>
&gt;                 (the scripts that are made available via this can be<br>
&gt;                 found on the filesystem in priv/www).<br>
&gt;<br>
&gt;                 I hope this answers your question.<br>
&gt;<br>
&gt;                 Cheers,<br>
&gt;                 Paul<br>
&gt;<br>
&gt;                 On Sat, Apr 17, 2010 at 8:28 PM, Benjamin Polidore<br>
</div><div class="im">&gt;                 &lt;<a href="mailto:polidore@gmail.com">polidore@gmail.com</a> &lt;mailto:<a href="mailto:polidore@gmail.com">polidore@gmail.com</a>&gt;&gt; wrote:<br>
&gt;<br>
&gt;                     hi, i&#39;m trying to use the json-channel plugin, and<br>
&gt;                     it runs ok when i do make test, but it doesn&#39;t seem<br>
&gt;                     to work when i try to start up my broker.  the port<br>
&gt;                     is open, but everything returns 404.  what is<br>
&gt;                     mochiweb using as a docroot when I run it outside<br>
&gt;                     make test?  sorry if this is obvious, but i&#39;ve been<br>
&gt;                     struggling with it for a couple hours.<br>
&gt;<br>
&gt;                     thanks,<br>
&gt;                     bp<br>
&gt;<br>
&gt;                     _______________________________________________<br>
&gt;                     rabbitmq-discuss mailing list<br>
&gt;                     <a href="mailto:rabbitmq-discuss@lists.rabbitmq.com">rabbitmq-discuss@lists.rabbitmq.com</a><br>
</div>&gt;                     &lt;mailto:<a href="mailto:rabbitmq-discuss@lists.rabbitmq.com">rabbitmq-discuss@lists.rabbitmq.com</a>&gt;<br>
<div class="im">&gt;                     <a href="http://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss" target="_blank">http://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss</a><br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
</div>&gt; ------------------------------------------------------------------------<br>
<div><div></div><div class="h5">&gt;<br>
&gt; _______________________________________________<br>
&gt; rabbitmq-discuss mailing list<br>
&gt; <a href="mailto:rabbitmq-discuss@lists.rabbitmq.com">rabbitmq-discuss@lists.rabbitmq.com</a><br>
&gt; <a href="http://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss" target="_blank">http://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss</a><br>
</div></div></blockquote></div><br></div></div>