Skip to content
This repository has been archived by the owner on Nov 26, 2020. It is now read-only.

getting 401 and 403 while trying to configure the RabbitMQ plugin #71

Open
kumarge opened this issue Dec 3, 2016 · 1 comment
Open

Comments

@kumarge
Copy link

kumarge commented Dec 3, 2016

We are trying to configure the rabbit MQ plugin and we are receiving 401 and 403 error while collecting data.

We tried querying /api and queues with curl, we are able to fetch the data. When we go through this plunging we are getting error.

Here are the logs

$ bundle install
Using multipart-post 2.0.0
Using json 2.0.2
Using redis 3.3.2
Using bundler 1.13.6
Using faraday 0.10.0
Using newrelic_plugin 1.3.1
Using faraday_middleware 0.10.1
Using rabbitmq_manager 0.1.0
Bundle complete! 3 Gemfile dependencies, 8 gems now installed.
Use bundle show [gemname] to see where a bundled gem is installed.
$ ./pivotal_agent
[2016-12-03 02:54:11 UTC] INFO: Using Ruby SDK version: 1.3.1
[2016-12-03 02:54:11 UTC] INFO: Agent RabbitMQ is at version 1.0.5
[2016-12-03 02:54:11 UTC] INFO: Agent ModBmx is at version 1.0.5
[2016-12-03 02:54:11 UTC] INFO: Agent Redis is at version 1.0.5
[2016-12-03 02:54:11 UTC] DEBUG: Start collecting agent data for poll cycle

[RabbitMQ] Exception while processing metrics. Check configuration.
the server responded with status 401
[2016-12-03 02:54:41 UTC] ERROR: Error occurred in poll cycle: undefined method debug' for #<NewRelic::RabbitMQPlugin::Agent:0x007feb04835c10> [2016-12-03 02:54:41 UTC] DEBUG: Stacktrace: /Users/212466410/Downloads/newrelic_pivotal_agent-pivotal_agent-1.0.5/plugins/pivotal_rabbitmq_plugin/pivotal_rabbitmq_plugin.rb:65:in rescue in poll_cycle'
/Users/212466410/Downloads/newrelic_pivotal_agent-pivotal_agent-1.0.5/plugins/pivotal_rabbitmq_plugin/pivotal_rabbitmq_plugin.rb:45:in poll_cycle' /Users/212466410/.rvm/gems/ruby-2.2.1/gems/newrelic_plugin-1.3.1/lib/newrelic_plugin/agent.rb:139:in run'
/Users/212466410/.rvm/gems/ruby-2.2.1/gems/newrelic_plugin-1.3.1/lib/newrelic_plugin/run.rb:143:in block in run_agent_data_collection' /Users/212466410/.rvm/gems/ruby-2.2.1/gems/newrelic_plugin-1.3.1/lib/newrelic_plugin/run.rb:141:in each'
/Users/212466410/.rvm/gems/ruby-2.2.1/gems/newrelic_plugin-1.3.1/lib/newrelic_plugin/run.rb:141:in run_agent_data_collection' /Users/212466410/.rvm/gems/ruby-2.2.1/gems/newrelic_plugin-1.3.1/lib/newrelic_plugin/run.rb:127:in loop_forever'
/Users/212466410/.rvm/gems/ruby-2.2.1/gems/newrelic_plugin-1.3.1/lib/newrelic_plugin/run.rb:15:in setup_and_run' ./pivotal_agent:51:in module:PivotalAgent'
./pivotal_agent:45:in `

'
[2016-12-03 02:54:41 UTC] DEBUG: Finished collecting agent data for poll cycle
[2016-12-03 02:54:41 UTC] DEBUG: JSON payload: {"agent":{"version":"1.0.5"},"components":[{"name":"pivotal-rabbitmq-36.system.asv-pr.ice.predix.io:443","guid":"com.pivotal.newrelic.plugin.rabbitmq","duration":60,"metrics":{"Component/Queued Messages/Ready[messages]":[0.0,1,0.0,0.0,0.0],"Component/Queued Messages/Unacknowledged[messages]":[0.0,1,0.0,0.0,0.0],"Component/Message Rate/Acknowledge[messages/sec]":[0.0,1,0.0,0.0,0.0],"Component/Message Rate/Confirm[messages/sec]":[0.0,1,0.0,0.0,0.0],"Component/Message Rate/Deliver[messages/sec]":[0.0,1,0.0,0.0,0.0],"Component/Message Rate/Publish[messages/sec]":[0.0,1,0.0,0.0,0.0],"Component/Message Rate/Return[messages/sec]":[0.0,1,0.0,0.0,0.0]}}]}
[2016-12-03 02:54:42 UTC] WARN: HTTP Connection Error: #<Net::HTTPServerException: 403 "Forbidden"> 403 "Forbidden"
[2016-12-03 02:54:42 UTC] INFO: Gathered 2 statistics from 1 components

[2016-12-03 02:55:11 UTC] DEBUG: Start collecting agent data for poll cycle
[RabbitMQ] Exception while processing metrics. Check configuration.
the server responded with status 401
[2016-12-03 02:55:32 UTC] ERROR: Error occurred in poll cycle: undefined method debug' for #<NewRelic::RabbitMQPlugin::Agent:0x007feb04835c10> [2016-12-03 02:55:32 UTC] DEBUG: Stacktrace: /Users/212466410/Downloads/newrelic_pivotal_agent-pivotal_agent-1.0.5/plugins/pivotal_rabbitmq_plugin/pivotal_rabbitmq_plugin.rb:65:in rescue in poll_cycle'
/Users/212466410/Downloads/newrelic_pivotal_agent-pivotal_agent-1.0.5/plugins/pivotal_rabbitmq_plugin/pivotal_rabbitmq_plugin.rb:45:in poll_cycle' /Users/212466410/.rvm/gems/ruby-2.2.1/gems/newrelic_plugin-1.3.1/lib/newrelic_plugin/agent.rb:139:in run'
/Users/212466410/.rvm/gems/ruby-2.2.1/gems/newrelic_plugin-1.3.1/lib/newrelic_plugin/run.rb:143:in block in run_agent_data_collection' /Users/212466410/.rvm/gems/ruby-2.2.1/gems/newrelic_plugin-1.3.1/lib/newrelic_plugin/run.rb:141:in each'
/Users/212466410/.rvm/gems/ruby-2.2.1/gems/newrelic_plugin-1.3.1/lib/newrelic_plugin/run.rb:141:in run_agent_data_collection' /Users/212466410/.rvm/gems/ruby-2.2.1/gems/newrelic_plugin-1.3.1/lib/newrelic_plugin/run.rb:127:in loop_forever'
/Users/212466410/.rvm/gems/ruby-2.2.1/gems/newrelic_plugin-1.3.1/lib/newrelic_plugin/run.rb:15:in setup_and_run' ./pivotal_agent:51:in module:PivotalAgent'
./pivotal_agent:45:in `'
[2016-12-03 02:55:32 UTC] DEBUG: Finished collecting agent data for poll cycle
[2016-12-03 02:55:32 UTC] DEBUG: JSON payload: {"agent":{"version":"1.0.5"},"components":[{"name":"pivotal-rabbitmq-36.system.asv-pr.ice.predix.io:443","guid":"com.pivotal.newrelic.plugin.rabbitmq","duration":60,"metrics":{"Component/Queued Messages/Ready[messages]":[0.0,2,0.0,0.0,0.0],"Component/Queued Messages/Unacknowledged[messages]":[0.0,2,0.0,0.0,0.0],"Component/Message Rate/Acknowledge[messages/sec]":[0.0,2,0.0,0.0,0.0],"Component/Message Rate/Confirm[messages/sec]":[0.0,2,0.0,0.0,0.0],"Component/Message Rate/Deliver[messages/sec]":[0.0,2,0.0,0.0,0.0],"Component/Message Rate/Publish[messages/sec]":[0.0,2,0.0,0.0,0.0],"Component/Message Rate/Return[messages/sec]":[0.0,2,0.0,0.0,0.0]}}]}
[2016-12-03 02:55:32 UTC] WARN: HTTP Connection Error: #<Net::HTTPServerException: 403 "Forbidden"> 403 "Forbidden"
[2016-12-03 02:55:32 UTC] INFO: Gathered 2 statistics from 1 components
^C[2016-12-03 02:55:35 UTC] INFO: Shutting down...
[2016-12-03 02:55:35 UTC] INFO: Shutdown complete

Here is the newrelic_plugin.yml

:config$ more newrelic_plugin.yml

Please make sure to update the license_key information with the license key for your New Relic

account.

This configuration file holds examples for all plugins. You only need to uncomment

the lines for the product you are using.

Example configuration is shown below. Uncomment (remove #) the needed lines for

your environment.

newrelic:

Update with your New Relic account license key:

license_key: '*************'

Set to '1' for verbose output, remove for normal output.

All output goes to stdout/stderr.

verbose: 1

Agent Configuration:

agents:

NOTE: You must uncomment and configure the plugins you want to use. By default they are

all disabled.

Configuration for RabbitMQ

rabbitmq:
# Must enable rabbit management plugin
# Note: When monitoring multiple nodes you should use the real hostnames instead of localhost
# Uncomment the appropriate line for your version
# RabbitMQ Default URL version 3.0
management_api_url: https://:@pivotal-rabbitmq-36.system.asv-pr.ice.predix.io
# RabbitMQ Default URL versions prior to 3.0
#management_api_url: http://guest:guest@localhost:55672
#
# Set "debug: true" to see additional debug output
debug: true

:config$

***masked the username/password and the license key.

@kumarge
Copy link
Author

kumarge commented Jan 4, 2017

Hi Team

could you please let us know if you think that we can try something else.

Thanks
Gulshan

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant