[rabbitmq-discuss] How to use Presence Exchange Plugin using STOMP and RabbitMQ Server v3.2.1?

Joshua Lim joshua__lim at hotmail.com
Thu Jan 16 04:30:42 GMT 2014


Hi Emile,

Thanks.  I encountered the following error while trying to build the presence exchange plugin using MinGW/MSYS on Windows 7 (64 bit).  

escript: exception error: no match of right hand side value {error,enoent}

Note:
1. Even though I'm not able to compile the plugin, I'm able to compile rabbitmq server using the step described here -http://www.rabbitmq.com/build-server.html  One thing though, I had to downgrade from Python 3 to v2 as the print code don't work in v3.

2. I've also tried using CYGWIN but it returns another error - escript: Failed to open file: /home/Fujitsu/rabbitmq/build-source/rabbitmq-public-umbrella/generate_deps

The full error pasted below and the complete code for generate_deps can be found here -  http://pastebin.com/N4HVz8z1

Please let me know I can fix the problem.  Thank you.


Fujitsu at JoshuaNotebook /d/RabbitMQ/build-source/rabbitmq-public-umbrella/presence-exchange-master
$ make
[elided] generate deps
escript: exception error: no match of right hand side value {error,enoent}
  in function  generate_deps__escript__1389__793192__493000:detect_deps/5 (d:/RabbitMQ/build-source/rabbitmq-public-umbrella/generate_deps, line 40)
  in call from generate_deps__escript__1389__793192__493000:'-main/1-fun-0-'/6 (d:/RabbitMQ/build-source/rabbitmq-public-umbrella/generate_deps, line 19)
  in call from lists:foldl/3 (lists.erl, line 1248)
  in call from generate_deps__escript__1389__793192__493000:main/1 (d:/RabbitMQ/build-source/rabbitmq-public-umbrella/generate_deps, line 17)
  in call from escript:run/2 (escript.erl, line 747)
  in call from escript:start/1 (escript.erl, line 277)
  in call from init:start_it/1 (init.erl, line 1054)
  in call from init:start_em/1 (init.erl, line 1034)
[elided] generate deps
escript: exception error: no match of right hand side value {error,enoent}
  in function  generate_deps__escript__1389__793194__76000:detect_deps/5 (d:/RabbitMQ/build-source/rabbitmq-public-umbrella/generate_deps, line 40)
  in call from generate_deps__escript__1389__793194__76000:'-main/1-fun-0-'/6 (d:/RabbitMQ/build-source/rabbitmq-public-umbrella/generate_deps, line 19)
  in call from lists:foldl/3 (lists.erl, line 1248)
  in call from generate_deps__escript__1389__793194__76000:main/1 (d:/RabbitMQ/build-source/rabbitmq-public-umbrella/generate_deps, line 17)
  in call from escript:run/2 (escript.erl, line 747)
  in call from escript:start/1 (escript.erl, line 277)
  in call from init:start_it/1 (init.erl, line 1054)
  in call from init:start_em/1 (init.erl, line 1034)
rm -rf ../rabbitmq-erlang-client/dist
make -C ../rabbitmq-erlang-client
make[1]: Entering directory `/d/RabbitMQ/build-source/rabbitmq-public-umbrella/rabbitmq-erlang-client'
rm -f deps.mk
echo src/amqp_auth_mechanisms.erl:src/amqp_channel.erl:src/amqp_channel_sup.erl:src/amqp_channel_sup_sup.erl:src/amqp_channels_manager.erl:src/amqp_client.erl:src/amqp_connection.erl:src/amqp_connection_sup.erl:src/amqp_connection_type_sup.erl:src/amqp_direct_connecti
erl:src/amqp_gen_connection.erl:src/amqp_gen_consumer.erl:src/amqp_main_reader.erl:src/amqp_network_connection.erl:src/amqp_rpc_client.erl:src/amqp_rpc_server.erl:src/amqp_selective_consumer.erl:src/amqp_sup.erl:src/amqp_uri.erl:src/rabbit_routing_util.erl:src/uri_par
include/amqp_client_internal.hrl:include/amqp_gen_consumer_spec.hrl:include/rabbit_routing_prefixes.hrl: | escript ../rabbitmq-server/generate_deps deps.mk ebin
make[1]: Leaving directory `/d/RabbitMQ/build-source/rabbitmq-public-umbrella/rabbitmq-erlang-client'
make[1]: Entering directory `/d/RabbitMQ/build-source/rabbitmq-public-umbrella/rabbitmq-erlang-client'
escript  ../rabbitmq-server/generate_app rabbit_common.app.in rabbit_common.app src
sed 's/%%VSN%%/0.0.0/' rabbit_common.app > rabbit_common.app.tmp && mv rabbit_common.app.tmp rabbit_common.app
mkdir -p dist
rm -f dist/rabbit_common-0.0.0.ez
make -C ../rabbitmq-server
make[2]: Entering directory `/d/RabbitMQ/build-source/rabbitmq-public-umbrella/rabbitmq-server'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/d/RabbitMQ/build-source/rabbitmq-public-umbrella/rabbitmq-server'
rm -rf dist/rabbit_common-0.0.0
mkdir -p dist/rabbit_common-0.0.0/include
mkdir -p dist/rabbit_common-0.0.0/ebin
cp rabbit_common.app dist/rabbit_common-0.0.0/ebin/
( cp ../rabbitmq-server/ebin/app_utils.beam dist/rabbit_common-0.0.0/ebin/ );  ( cp ../rabbitmq-server/ebin/credit_flow.beam dist/rabbit_common-0.0.0/ebin/ );  ( cp ../rabbitmq-server/ebin/pmon.beam dist/rabbit_common-0.0.0/ebin/ );  ( cp ../rabbitmq-server/ebin/gen_s
.0.0/ebin/ );  ( cp ../rabbitmq-server/ebin/mirrored_supervisor.beam dist/rabbit_common-0.0.0/ebin/ );  ( cp ../rabbitmq-server/ebin/priority_queue.beam dist/rabbit_common-0.0.0/ebin/ );  ( cp ../rabbitmq-server/ebin/rabbit_backing_queue.beam dist/rabbit_common-0.0.0/
r/ebin/rabbit_basic.beam dist/rabbit_common-0.0.0/ebin/ );  ( cp ../rabbitmq-server/ebin/rabbit_binary_generator.beam dist/rabbit_common-0.0.0/ebin/ );  ( cp ../rabbitmq-server/ebin/rabbit_binary_parser.beam dist/rabbit_common-0.0.0/ebin/ );  ( cp ../rabbitmq-server/e
bit_common-0.0.0/ebin/ );  ( cp ../rabbitmq-server/ebin/rabbit_channel_interceptor.beam dist/rabbit_common-0.0.0/ebin/ );  ( cp ../rabbitmq-server/ebin/rabbit_runtime_parameter.beam dist/rabbit_common-0.0.0/ebin/ );  ( cp ../rabbitmq-server/ebin/rabbit_command_assembl
/ebin/ );  ( cp ../rabbitmq-server/ebin/rabbit_exchange_type.beam dist/rabbit_common-0.0.0/ebin/ );  ( cp ../rabbitmq-server/ebin/rabbit_exchange_decorator.beam dist/rabbit_common-0.0.0/ebin/ );  ( cp ../rabbitmq-server/ebin/rabbit_auth_backend.beam dist/rabbit_common
q-server/ebin/rabbit_auth_mechanism.beam dist/rabbit_common-0.0.0/ebin/ );  ( cp ../rabbitmq-server/ebin/rabbit_framing_amqp_0_8.beam dist/rabbit_common-0.0.0/ebin/ );  ( cp ../rabbitmq-server/ebin/rabbit_framing_amqp_0_9_1.beam dist/rabbit_common-0.0.0/ebin/ );  ( cp
heartbeat.beam dist/rabbit_common-0.0.0/ebin/ );  ( cp ../rabbitmq-server/ebin/rabbit_misc.beam dist/rabbit_common-0.0.0/ebin/ );  ( cp ../rabbitmq-server/ebin/rabbit_msg_store_index.beam dist/rabbit_common-0.0.0/ebin/ );  ( cp ../rabbitmq-server/ebin/rabbit_net.beam
;  ( cp ../rabbitmq-server/ebin/rabbit_nodes.beam dist/rabbit_common-0.0.0/ebin/ );  ( cp ../rabbitmq-server/ebin/rabbit_policy_validator.beam dist/rabbit_common-0.0.0/ebin/ );  ( cp ../rabbitmq-server/ebin/rabbit_reader.beam dist/rabbit_common-0.0.0/ebin/ );  ( cp ..
ter.beam dist/rabbit_common-0.0.0/ebin/ );  ( cp ../rabbitmq-server/ebin/rabbit_event.beam dist/rabbit_common-0.0.0/ebin/ );  ( cp ../rabbitmq-server/ebin/rabbit_queue_collector.beam dist/rabbit_common-0.0.0/ebin/ );  ( cp ../rabbitmq-server/ebin/rabbit_queue_decorato
ebin/ );  ( cp ../rabbitmq-server/ebin/rabbit_amqqueue.beam dist/rabbit_common-0.0.0/ebin/ );  ( cp ../rabbitmq-server/ebin/supervisor2.beam dist/rabbit_common-0.0.0/ebin/ );
cp ../rabbitmq-server/include/*.hrl dist/rabbit_common-0.0.0/include/
(cd dist; zip -q -r rabbit_common-0.0.0.ez rabbit_common-0.0.0)
mkdir -p deps
rm -rf deps/rabbit_common-0.0.0
mkdir -p deps/rabbit_common-0.0.0
unzip -q -o dist/rabbit_common-0.0.0.ez -d deps
ERL_LIBS=deps:dist erlc -I include -pa ebin -o ebin -Wall -v +debug_info -Duse_specs src/amqp_auth_mechanisms.erl
{error_logger,{{2014,1,15},{21,40,35}},std_error,"File operation error: eio. Target: deps:dist. Function: list_dir. Process: code_server."}

=ERROR REPORT==== 16-Jan-2014::05:40:35 ===
File operation error: eio. Target: deps:dist. Function: list_dir. Process: code_server.
d://RabbitMQ/BUILD-~1/RABBIT~3/RA9B14~1/include/amqp_client.hrl:20: can't find include lib "rabbit_common/include/rabbit.hrl"
d://RabbitMQ/BUILD-~1/RABBIT~3/RA9B14~1/include/amqp_client.hrl:21: can't find include lib "rabbit_common/include/rabbit_framing.hrl"
d://RabbitMQ/BUILD-~1/RABBIT~3/RA9B14~1/include/amqp_client.hrl:23: record 'P_basic' undefined
make[1]: *** [ebin/amqp_auth_mechanisms.beam] Error 1
make[1]: Leaving directory `/d/RabbitMQ/build-source/rabbitmq-public-umbrella/rabbitmq-erlang-client'
make: *** [../rabbitmq-erlang-client/dist/.done.0.0.0] Error 2

Fujitsu at JoshuaNotebook /d/RabbitMQ/build-source/rabbitmq-public-umbrella/presence-exchange-master
$

> Date: Mon, 13 Jan 2014 12:45:58 +0000
> From: emile at rabbitmq.com
> To: rabbitmq-discuss at lists.rabbitmq.com
> CC: joshua__lim at hotmail.com; tonygarnockjones+rabbitmq at gmail.com
> Subject: Re: [rabbitmq-discuss] How to use Presence Exchange Plugin using STOMP and RabbitMQ Server v3.2.1?
> 
> 
> Hi Joshua,
> 
> On 12/01/14 15:04, Joshua Lim wrote:
> 
> > Immediately after that, the guest STOMP connection crashed when I
> > had expect it to receive messages after user joshua has subscribed to
> > "presence" exchange.  
> > 
> > What have I done wrongly?
> 
> 
> When I try this I see the following error in the logfile:
> 
> ** Reason for termination ==
> ** {badarg,[{erlang,binary_to_list,["bind"],[]},
> 
> 
> This looks like a problem in the presence exchange. I have submitted a
> pull request to the author which appears to solve the problem. With the
> patch applied you should see messages like this being delivered to the
> first subscriber:
> 
> 
> MESSAGE
> subscription:test
> destination:/exchange/presence
> message-id:T_test@@session-Ip9MZyrYrNyRHqVNDM9lpA@@1
> action:bind
> exchange:presence
> queue:amq.gen-1gqzkBxb5AYbBFXGF2GNxw
> key:joshua
> 
> 
> 
> 
> 
> 
> -Emile
> 
> 
> 
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20140116/02e7df0d/attachment.html>


More information about the rabbitmq-discuss mailing list