AgileVentures / MetPlus_tracker

Git Repository for the Waffle issue in MetPlus project
2 stars 4 forks source link

Invalid credentials for Cruncher access #691

Closed joaopapereira closed 6 years ago

joaopapereira commented 6 years ago
This project is using an outdated version of airbrake-ruby (1.4.4). The latest version is 2.7.*.

This resolved error has reoccurred. View error
PROJECT pets
ENVIRONMENT production
SEVERITY    error
ERROR TYPE  RuntimeError
ERROR MESSAGE   Invalid credentials for Cruncher access
FILE    [PROJECT_ROOT]/app/services/cruncher_service.rb:228
WHERE   jobs#match_job_seekers
URL http://www.petsworkforce.com/jobs/3/match_job_seekers
BACKTRACE   
[PROJECT_ROOT]/app/services/cruncher_service.rb:228 in rescue in auth_token

[PROJECT_ROOT]/app/services/cruncher_service.rb:223 in auth_token

[PROJECT_ROOT]/app/services/cruncher_service.rb:199 in match_resumes

[PROJECT_ROOT]/app/models/resume_cruncher.rb:37 in match_resumes

[PROJECT_ROOT]/app/controllers/jobs_controller.rb:291 in match_job_seekers

[GEM_ROOT]/gems/actionpack-4.2.3/lib/action_controller/metal/implicit_render.rb:4 in send_action

[GEM_ROOT]/gems/actionpack-4.2.3/lib/abstract_controller/base.rb:198 in process_action

[GEM_ROOT]/gems/actionpack-4.2.3/lib/action_controller/metal/rendering.rb:10 in process_action

[GEM_ROOT]/gems/actionpack-4.2.3/lib/abstract_controller/callbacks.rb:20 in block in process_action

[GEM_ROOT]/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:115 in call

[GEM_ROOT]/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:553 in block (2 levels) in compile

[GEM_ROOT]/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:503 in call

[GEM_ROOT]/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:88 in run_callbacks

[GEM_ROOT]/gems/actionpack-4.2.3/lib/abstract_controller/callbacks.rb:19 in process_action

[GEM_ROOT]/gems/actionpack-4.2.3/lib/action_controller/metal/rescue.rb:29 in process_action

[GEM_ROOT]/gems/actionpack-4.2.3/lib/action_controller/metal/instrumentation.rb:32 in block in process_action

[GEM_ROOT]/gems/activesupport-4.2.3/lib/active_support/notifications.rb:164 in block in instrument

[GEM_ROOT]/gems/activesupport-4.2.3/lib/active_support/notifications/instrumenter.rb:20 in instrument

[GEM_ROOT]/gems/activesupport-4.2.3/lib/active_support/notifications.rb:164 in instrument

[GEM_ROOT]/gems/actionpack-4.2.3/lib/action_controller/metal/instrumentation.rb:30 in process_action

[GEM_ROOT]/gems/actionpack-4.2.3/lib/action_controller/metal/params_wrapper.rb:250 in process_action

[GEM_ROOT]/gems/activerecord-4.2.3/lib/active_record/railties/controller_runtime.rb:18 in process_action

[GEM_ROOT]/gems/actionpack-4.2.3/lib/abstract_controller/base.rb:137 in process

[GEM_ROOT]/gems/actionview-4.2.3/lib/action_view/rendering.rb:30 in process

[GEM_ROOT]/gems/actionpack-4.2.3/lib/action_controller/metal.rb:196 in dispatch

[GEM_ROOT]/gems/actionpack-4.2.3/lib/action_controller/metal/rack_delegation.rb:13 in dispatch

[GEM_ROOT]/gems/actionpack-4.2.3/lib/action_controller/metal.rb:237 in block in action

[GEM_ROOT]/gems/actionpack-4.2.3/lib/action_dispatch/routing/route_set.rb:76 in dispatch

[GEM_ROOT]/gems/actionpack-4.2.3/lib/action_dispatch/routing/route_set.rb:45 in serve

[GEM_ROOT]/gems/actionpack-4.2.3/lib/action_dispatch/journey/router.rb:43 in block in serve

[GEM_ROOT]/gems/actionpack-4.2.3/lib/action_dispatch/journey/router.rb:30 in each

[GEM_ROOT]/gems/actionpack-4.2.3/lib/action_dispatch/journey/router.rb:30 in serve

[GEM_ROOT]/gems/actionpack-4.2.3/lib/action_dispatch/routing/route_set.rb:821 in call

[GEM_ROOT]/gems/warden-1.2.4/lib/warden/manager.rb:35 in block in call

[GEM_ROOT]/gems/warden-1.2.4/lib/warden/manager.rb:34 in catch

[GEM_ROOT]/gems/warden-1.2.4/lib/warden/manager.rb:34 in call

[GEM_ROOT]/gems/rack-1.6.4/lib/rack/etag.rb:24 in call

[GEM_ROOT]/gems/rack-1.6.4/lib/rack/conditionalget.rb:25 in call

[GEM_ROOT]/gems/rack-1.6.4/lib/rack/head.rb:13 in call

[GEM_ROOT]/gems/actionpack-4.2.3/lib/action_dispatch/middleware/params_parser.rb:27 in call

[GEM_ROOT]/gems/actionpack-4.2.3/lib/action_dispatch/middleware/flash.rb:260 in call

[GEM_ROOT]/gems/rack-1.6.4/lib/rack/session/abstract/id.rb:225 in context

[GEM_ROOT]/gems/rack-1.6.4/lib/rack/session/abstract/id.rb:220 in call

[GEM_ROOT]/gems/actionpack-4.2.3/lib/action_dispatch/middleware/cookies.rb:560 in call

[GEM_ROOT]/gems/activerecord-4.2.3/lib/active_record/query_cache.rb:36 in call

[GEM_ROOT]/gems/airbrake-5.4.4/lib/airbrake/rack/middleware.rb:22 in call

[GEM_ROOT]/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:653 in call

[GEM_ROOT]/gems/actionpack-4.2.3/lib/action_dispatch/middleware/callbacks.rb:29 in block in call

[GEM_ROOT]/gems/activesupport-4.2.3/lib/active_support/callbacks.rb:84 in run_callbacks

[GEM_ROOT]/gems/actionpack-4.2.3/lib/action_dispatch/middleware/callbacks.rb:27 in call

[GEM_ROOT]/gems/actionpack-4.2.3/lib/action_dispatch/middleware/remote_ip.rb:78 in call

[GEM_ROOT]/gems/actionpack-4.2.3/lib/action_dispatch/middleware/debug_exceptions.rb:17 in call

[GEM_ROOT]/gems/actionpack-4.2.3/lib/action_dispatch/middleware/show_exceptions.rb:30 in call

[GEM_ROOT]/gems/railties-4.2.3/lib/rails/rack/logger.rb:38 in call_app

[GEM_ROOT]/gems/railties-4.2.3/lib/rails/rack/logger.rb:20 in block in call

[GEM_ROOT]/gems/activesupport-4.2.3/lib/active_support/tagged_logging.rb:68 in block in tagged

[GEM_ROOT]/gems/activesupport-4.2.3/lib/active_support/tagged_logging.rb:26 in tagged

[GEM_ROOT]/gems/activesupport-4.2.3/lib/active_support/tagged_logging.rb:68 in tagged

[GEM_ROOT]/gems/railties-4.2.3/lib/rails/rack/logger.rb:20 in call

[GEM_ROOT]/gems/actionpack-4.2.3/lib/action_dispatch/middleware/request_id.rb:21 in call

[GEM_ROOT]/gems/rack-1.6.4/lib/rack/methodoverride.rb:22 in call

[GEM_ROOT]/gems/rack-1.6.4/lib/rack/runtime.rb:18 in call

[GEM_ROOT]/gems/activesupport-4.2.3/lib/active_support/cache/strategy/local_cache_middleware.rb:28 in call

[GEM_ROOT]/gems/actionpack-4.2.3/lib/action_dispatch/middleware/static.rb:116 in call

[GEM_ROOT]/gems/rack-1.6.4/lib/rack/sendfile.rb:113 in call

[GEM_ROOT]/gems/railties-4.2.3/lib/rails/engine.rb:518 in call

[GEM_ROOT]/gems/railties-4.2.3/lib/rails/application.rb:165 in call

[GEM_ROOT]/gems/puma-2.11.3/lib/puma/configuration.rb:51 in call

[GEM_ROOT]/gems/puma-2.11.3/lib/puma/server.rb:507 in handle_request

[GEM_ROOT]/gems/puma-2.11.3/lib/puma/server.rb:375 in process_client

[GEM_ROOT]/gems/puma-2.11.3/lib/puma/server.rb:262 in block in run

[GEM_ROOT]/gems/puma-2.11.3/lib/puma/thread_pool.rb:104 in block in spawn_thread
patmbolger commented 6 years ago

The cruncher URL and credentials are derived from these vars in config/application.yml:

CRUNCHER_SERVICE_URL
CRUNCHER_SERVICE_USERNAME
CRUNCHER_SERVICE_PASSWORD

This is not maintained in git and this may not have been transferred over to Azure when the app was moved there.

joaopapereira commented 6 years ago

The problem was the URL that was missing the `/api/v2/' in the end, so was not trying to execute the authentication