Thanks! I’ve actually been through all of this today and the perms are setup properly for the /sensu vhost with * * * given to user sc (my rabbitmq user). Here’s the output of rabbitmqctl report
···
Status of node rabbit@sensu …
[{pid,10365},
{running_applications,[{rabbit,“RabbitMQ”,“3.5.3”},
{xmerl,"XML parser","1.3.8"},
{os_mon,"CPO CXC 138 46","2.4"},
{mnesia,"MNESIA CXC 138 12","4.13"},
{sasl,"SASL CXC 138 11","2.5"},
{stdlib,"ERTS CXC 138 10","2.5"},
{kernel,"ERTS CXC 138 10","4.0"}]},
{os,{unix,linux}},
{erlang_version,“Erlang/OTP 18 [erts-7.0] [source-4d83b58] [64-bit] [smp:2:2] [async-threads:30] [hipe] [kernel-poll:true]\n”},
{memory,[{total,38936936},
{connection_readers,84656},
{connection_writers,5952},
{connection_channels,67368},
{connection_other,112288},
{queue_procs,136864},
{queue_slave_procs,0},
{plugins,0},
{other_proc,13582120},
{mnesia,70552},
{mgmt_db,0},
{msg_index,47536},
{other_ets,784200},
{binary,2175056},
{code,16654384},
{atom,654217},
{other_system,4561743}]},
{alarms,},
{listeners,[{clustering,25672,“::”},{amqp,5672,“::”}]},
{vm_memory_high_watermark,0.4},
{vm_memory_limit,1607326105},
{disk_free_limit,50000000},
{disk_free,32966361088},
{file_descriptors,[{total_limit,924},
{total_used,7},
{sockets_limit,829},
{sockets_used,5}]},
{processes,[{limit,1048576},{used,167}]},
{run_queue,0},
{uptime,535}]
Cluster status of node rabbit@sensu …
[{nodes,[{disc,[rabbit@sensu]}]},
{running_nodes,[rabbit@sensu]},
{cluster_name,<<“rabbit@sensu”>>},
{partitions,}]
Application environment of node rabbit@sensu …
[{kernel,[{error_logger,tty},
{inet_default_connect_options,[{nodelay,true}]},
{inet_dist_listen_max,25672},
{inet_dist_listen_min,25672}]},
{mnesia,[{dir,“/var/lib/rabbitmq/mnesia/rabbit@sensu”}]},
{os_mon,[{start_cpu_sup,false},
{start_disksup,false},
{start_memsup,false},
{start_os_sup,false}]},
{rabbit,[{auth_backends,[rabbit_auth_backend_internal]},
{auth_mechanisms,['PLAIN','AMQPLAIN']},
{backing_queue_module,rabbit_priority_queue},
{channel_max,0},
{cluster_keepalive_interval,10000},
{cluster_nodes,{[],disc}},
{cluster_partition_handling,ignore},
{collect_statistics,none},
{collect_statistics_interval,5000},
{default_permissions,[<<".*">>,<<".*">>,<<".*">>]},
{default_user,<<"guest">>},
{default_user_tags,[administrator]},
{default_vhost,<<"/">>},
{delegate_count,16},
{disk_free_limit,50000000},
{enabled_plugins_file,"/etc/rabbitmq/enabled_plugins"},
{error_logger,{file,"/var/log/rabbitmq/rabbit@sensu.log"}},
{frame_max,131072},
{halt_on_upgrade_failure,true},
{handshake_timeout,10000},
{heartbeat,580},
{hipe_compile,false},
{hipe_modules,[rabbit_reader,rabbit_channel,gen_server2,
rabbit_exchange,rabbit_command_assembler,
rabbit_framing_amqp_0_9_1,rabbit_basic,rabbit_event,
lists,queue,priority_queue,rabbit_router,
rabbit_trace,rabbit_misc,rabbit_binary_parser,
rabbit_exchange_type_direct,rabbit_guid,rabbit_net,
rabbit_amqqueue_process,rabbit_variable_queue,
rabbit_binary_generator,rabbit_writer,delegate,
gb_sets,lqueue,sets,orddict,rabbit_amqqueue,
rabbit_limiter,gb_trees,rabbit_queue_index,
rabbit_exchange_decorator,gen,dict,ordsets,
file_handle_cache,rabbit_msg_store,array,
rabbit_msg_store_ets_index,rabbit_msg_file,
rabbit_exchange_type_fanout,
rabbit_exchange_type_topic,mnesia,mnesia_lib,rpc,
mnesia_tm,qlc,sofs,proplists,credit_flow,pmon,
ssl_connection,tls_connection,ssl_record,tls_record,
gen_fsm,ssl]},
{log_levels,[{connection,info}]},
{loopback_users,[<<"guest">>]},
{mirroring_flow_control,true},
{mnesia_table_loading_timeout,30000},
{msg_store_file_size_limit,16777216},
{msg_store_index_module,rabbit_msg_store_ets_index},
{plugins_dir,"/usr/lib/rabbitmq/lib/rabbitmq_server-3.5.3/sbin/../plugins"},
{plugins_expand_dir,"/var/lib/rabbitmq/mnesia/rabbit@sensu-plugins-expand"},
{queue_index_embed_msgs_below,4096},
{queue_index_max_journal_entries,65536},
{reverse_dns_lookups,false},
{sasl_error_logger,{file,"/var/log/rabbitmq/rabbit@sensu-sasl.log"}},
{server_properties,[]},
{ssl_allow_poodle_attack,false},
{ssl_apps,[asn1,crypto,public_key,ssl]},
{ssl_cert_login_from,distinguished_name},
{ssl_handshake_timeout,5000},
{ssl_listeners,[]},
{ssl_options,[]},
{tcp_listen_options,[binary,
{packet,raw},
{reuseaddr,true},
{backlog,128},
{nodelay,true},
{linger,{true,0}},
{exit_on_close,false}]},
{tcp_listeners,[5672]},
{trace_vhosts,[]},
{vm_memory_high_watermark,0.4},
{vm_memory_high_watermark_paging_ratio,0.5}]},
{sasl,[{errlog_type,error},{sasl_error_logger,false}]},
{stdlib,},
{xmerl,}]
Connections:
pid name port peer_port host peer_host ssl peer_cert_subject peer_cert_issuer peer_cert_validity auth_mechanism ssl_protocol ssl_key_exchange ssl_cipher ssl_hash protocol user vhost timeout frame_max channel_max client_properties connected_at recv_oct recv_cnt send_oct send_cnt send_pend state channels
rabbit@sensu.3.254.0 127.0.0.1:53331 → 127.0.0.1:5672 5672 53331 127.0.0.1 127.0.0.1 false PLAI{0,9,1} guest / 580 131072 0 [{“platform”,“ruby 2.0.0p645 (2015-04-13 revision 50299) [x86_64-linux]”},{“product”,“amqp gem”},{“information”,“http://github.com/ruby-amqp/amqp"},{“version”,“1.5.0”},{“capabilities”,[{“publisher_confirms”,true},{“consumer_cancel_notify”,true},{“exchange_exchange_bindings”,true},{“basic.nack”,true},{“connection.blocked”,true},{"authentication_failure_close”,true}]}] 1436800466108 16438 124 12034 50 0 running 1
rabbit@sensu.3.286.0 127.0.0.1:53333 → 127.0.0.1:5672 5672 53333 127.0.0.1 127.0.0.1 false PLAI{0,9,1} guest / 580 131072 0 [{“platform”,“ruby 2.0.0p645 (2015-04-13 revision 50299) [x86_64-linux]”},{“product”,“amqp gem”},{“information”,“http://github.com/ruby-amqp/amqp"},{“version”,“1.5.0”},{“capabilities”,[{“publisher_confirms”,true},{“consumer_cancel_notify”,true},{“exchange_exchange_bindings”,true},{“basic.nack”,true},{“connection.blocked”,true},{"authentication_failure_close”,true}]}] 1436800467777 3534 111 3720 113 0 running 1
rabbit@sensu.3.301.0 127.0.0.1:53335 → 127.0.0.1:5672 5672 53335 127.0.0.1 127.0.0.1 false PLAI{0,9,1} guest / 580 131072 0 [{“platform”,“ruby 2.0.0p645 (2015-04-13 revision 50299) [x86_64-linux]”},{“product”,“amqp gem”},{“information”,“http://github.com/ruby-amqp/amqp"},{“version”,“1.5.0”},{“capabilities”,[{“publisher_confirms”,true},{“consumer_cancel_notify”,true},{“exchange_exchange_bindings”,true},{“basic.nack”,true},{“connection.blocked”,true},{"authentication_failure_close”,true}]}] 1436800472310 5865 31 578 7 0 running 1
Channels:
pid name connection number user vhost transactional confirm consumer_count messages_unacknowledged messages_unconfirmed messages_uncommitted acks_uncommitted prefetch_count global_prefetch_count state
rabbit@sensu.3.262.0 127.0.0.1:53331 → 127.0.0.1:5672 (1) rabbit@sensu.3.254.0 1 guest / false false 2 0 0 running
rabbit@sensu.3.294.0 127.0.0.1:53333 → 127.0.0.1:5672 (1) rabbit@sensu.3.286.0 1 guest / false false 0 0 0 running
rabbit@sensu.3.309.0 127.0.0.1:53335 → 127.0.0.1:5672 (1) rabbit@sensu.3.301.0 1 guest / false false 1 0 0 running
Queues on /:
pid name durable auto_delete arguments owner_pid policy exclusive_consumer_pid exclusive_consumer_tag messages_ready messages_unacknowledged messages consumers consumer_utilisation memory slave_pids synchronised_slave_pids recoverable_slaves state messages_ram messages_ready_ram messages_unacknowledged_ram messages_persistent message_bytes message_bytes_ready message_bytes_unacknowledged message_bytes_ram message_bytes_persistent disk_reads disk_writes backing_queue_status
rabbit@sensu.3.275.0 keepalives false true 0 0 0 1 1.0 55760 running 0 0 0 0 0 0 0 0 0 0 0 [{q1,0}, {q2,0}, {delta,{delta,undefined,0,undefined}}, {q3,0}, {q4,0}, {len,0}, {target_ram_count,infinity}, {next_seq_id,27}, {avg_ingress_rate,0.0820264409540985}, {avg_egress_rate,0.0820264409540985}, {avg_ack_ingress_rate,0.0820264409540985}, {avg_ack_egress_rate,0.0820264409540985}]
rabbit@sensu.3.280.0 results false true 0 0 0 1 1.0 68480 running 0 0 0 0 0 0 0 0 0 0 0 [{q1,0}, {q2,0}, {delta,{delta,undefined,0,undefined}}, {q3,0}, {q4,0}, {len,0}, {target_ram_count,infinity}, {next_seq_id,17}, {avg_ingress_rate,0.00321294362810416}, {avg_egress_rate,0.00321294362810416}, {avg_ack_ingress_rate,0.00321294362810416}, {avg_ack_egress_rate,0.00321294362810416}]
rabbit@sensu.3.312.0 sensu-0.20.0-1436800472 false true 0 0 0 1 1.0 1416running 0 0 0 0 0 0 0 0 0 0 0 [{q1,0}, {q2,0}, {delta,{delta,undefined,0,undefined}}, {q3,0}, {q4,0}, {len,0}, {target_ram_count,infinity}, {next_seq_id,0}, {avg_ingress_rate,0.0}, {avg_egress_rate,0.0}, {avg_ack_ingress_rate,0.0}, {avg_ack_egress_rate,0.0}]
Queues on /sensu:
Exchanges on /:
name type durable auto_delete internal arguments policy
direct true false false []
ALL fanout false false false
amq.direct direct true false false
amq.fanout fanout true false false
amq.headers headers true false false
amq.match headers true false false
amq.rabbitmq.log topic true false true
amq.rabbitmq.trace topic true false true
amq.topic topic true false false
keepalives direct false false false
results direct false false false
sensu fanout false false false
Exchanges on /sensu:
name type durable auto_delete internal arguments policy
direct true false false []
amq.direct direct true false false
amq.fanout fanout true false false
amq.headers headers true false false
amq.match headers true false false
amq.rabbitmq.trace topic true false true
amq.topic topic true false false
Bindings on /:
source_name source_kind destination_name destination_kind routing_key arguments
exchange keepalives queue keepalives []
exchange results queue results []
exchange sensu-0.20.0-1436800472 queue sensu-0.20.0-1436800472 []
ALL exchange sensu-0.20.0-1436800472 queue
keepalives exchange keepalives queue
results exchange results queue
Bindings on /sensu:
Consumers on /:
queue_name channel_pid consumer_tag ack_required prefetch_count arguments
keepalives rabbit@sensu.3.262.0 keepalives-1436800467000-583755327869 true 1
results rabbit@sensu.3.262.0 results-1436800467000-287430862732 true 1
sensu-0.20.0-1436800472 rabbit@sensu.3.309.0 sensu-0.20.0-1436800472-1436800472000-989441440101 false 1
Consumers on /sensu:
Permissions on /:
user configure write read
guest .* .* .*
Permissions on /sensu:
user configure write read
sc .* .* .*
–
On Monday, July 13, 2015 at 10:13:25 AM UTC-5, Kyle Anderson wrote:
Just random googling:
http://stackoverflow.com/a/17950138/2056003
Can you confirm the vhost permissions allow access from other hosts?
https://www.rabbitmq.com/man/rabbitmqctl.1.man.html#Access%20control
Like:
https://github.com/sensu/sensu-puppet/blob/master/tests/rabbitmq.sh#L9
On Mon, Jul 13, 2015 at 8:04 AM, James Jelinek jel...@gmail.com wrote:
Thanks for your insight, here’s what I found in the rabbitmq-sensu.log
closing AMQP connection <0.2330.0> (10.100.1.19:42326 → 10.100.1.200:5672):
{handshake_error,starting,0,
{amqp_error,access_refused,
"PLAIN login refused: user 'sc' - invalid
credentials",
'connection.start_ok'}}
Now here’s the thing. I’m putting in the credentials correctly for my
rabbitmq user “sc” on the server and rabbitmq is starting no problem and the
permissions on the sc user are good and give full access to the “/sensu”
vhost. Locally the client on the sensu master server works fine and
registers, but the remote client “coffee” does not. I’ve literally
copied/pasted the user/pass into the /etc/sensu/conf.d/rabbitmq.json file
and there are no errors.
How can I test the connection from coffee to sensu master authenticating
with my rabbitmq user.
Sorry for all the newb questions, I’m very new to sensu and my first time
using rabbitmq.