Invalid Flying Sphinx credentials

Andy Wang's Avatar

Andy Wang

22 May, 2017 03:16 AM

Hello,

We're having issues with system showing Invalid Flying Sphinx credentials everytime someone made a new listing.

Request ID: 38182

Invalid Flying Sphinx credentials
/app/vendor/bundle/ruby/2.3.0/gems/flying-sphinx-1.2.0/lib/flying_sphinx/api.rb:76:in `log'
/app/vendor/bundle/ruby/2.3.0/gems/flying-sphinx-1.2.0/lib/flying_sphinx/api.rb:30:in `post'
/app/vendor/bundle/ruby/2.3.0/gems/flying-sphinx-1.2.0/lib/flying_sphinx/controller.rb:34:in `index'
/app/vendor/bundle/ruby/2.3.0/gems/thinking-sphinx-3.1.4/lib/thinking_sphinx/deltas/index_job.rb:7:in `perform'
/app/vendor/bundle/ruby/2.3.0/bundler/gems/ts-delayed-delta-839284f2f28b/lib/thinking_sphinx/deltas/delayed_delta/delta_job.rb:22:in `perform'
/app/vendor/bundle/ruby/2.3.0/gems/delayed_job-4.1.2/lib/delayed/backend/base.rb:84:in `block in invoke_job'
/app/vendor/bundle/ruby/2.3.0/gems/rollbar-2.14.0/lib/rollbar/plugins/delayed_job/plugin.rb:35:in `block in invoke_job_callback'
/app/vendor/bundle/ruby/2.3.0/gems/delayed_job-4.1.2/lib/delayed/lifecycle.rb:79:in `block (2 levels) in add'
/app/config/initializers/delayed_job.rb:10:in `block (2 levels) in <class:DelayedJobLoggerPlugin>'
/app/vendor/bundle/ruby/2.3.0/gems/delayed_job-4.1.2/lib/delayed/lifecycle.rb:79:in `block (2 levels) in add'
/app/vendor/bundle/ruby/2.3.0/gems/delayed_job-4.1.2/lib/delayed/lifecycle.rb:61:in `block in initialize'
/app/vendor/bundle/ruby/2.3.0/gems/delayed_job-4.1.2/lib/delayed/lifecycle.rb:79:in `block in add'
/app/vendor/bundle/ruby/2.3.0/gems/delayed_job-4.1.2/lib/delayed/lifecycle.rb:79:in `block in add'
/app/vendor/bundle/ruby/2.3.0/gems/delayed_job-4.1.2/lib/delayed/lifecycle.rb:66:in `execute'
/app/vendor/bundle/ruby/2.3.0/gems/delayed_job-4.1.2/lib/delayed/lifecycle.rb:40:in `run_callbacks'
/app/vendor/bundle/ruby/2.3.0/gems/delayed_job-4.1.2/lib/delayed/backend/base.rb:81:in `invoke_job'
(eval):3:in `block in invoke_job_with_newrelic_transaction_trace'
/app/vendor/bundle/ruby/2.3.0/gems/newrelic_rpm-3.9.1.236/lib/new_relic/agent/instrumentation/controller_instrumentation.rb:364:in `perform_action_with_newrelic_trace'
(eval):2:in `invoke_job_with_newrelic_transaction_trace'
/app/vendor/bundle/ruby/2.3.0/gems/delayed_job-4.1.2/lib/delayed/worker.rb:230:in `block (2 levels) in run'
/app/vendor/ruby-2.3.1/lib/ruby/2.3.0/timeout.rb:91:in `block in timeout'
/app/vendor/ruby-2.3.1/lib/ruby/2.3.0/timeout.rb:101:in `timeout'
/app/vendor/bundle/ruby/2.3.0/gems/delayed_job-4.1.2/lib/delayed/worker.rb:230:in `block in run'
/app/vendor/ruby-2.3.1/lib/ruby/2.3.0/benchmark.rb:308:in `realtime'
/app/vendor/bundle/ruby/2.3.0/gems/delayed_job-4.1.2/lib/delayed/worker.rb:229:in `run'
/app/vendor/bundle/ruby/2.3.0/gems/delayed_job-4.1.2/lib/delayed/worker.rb:306:in `block in reserve_and_run_one_job'
/app/vendor/bundle/ruby/2.3.0/gems/delayed_job-4.1.2/lib/delayed/lifecycle.rb:61:in `block in initialize'
/app/vendor/bundle/ruby/2.3.0/gems/delayed_job-4.1.2/lib/delayed/lifecycle.rb:66:in `execute'
/app/vendor/bundle/ruby/2.3.0/gems/delayed_job-4.1.2/lib/delayed/lifecycle.rb:40:in `run_callbacks'
/app/vendor/bundle/ruby/2.3.0/gems/delayed_job-4.1.2/lib/delayed/worker.rb:306:in `reserve_and_run_one_job'
/app/vendor/bundle/ruby/2.3.0/gems/delayed_job-4.1.2/lib/delayed/worker.rb:213:in `block in work_off'
/app/vendor/bundle/ruby/2.3.0/gems/delayed_job-4.1.2/lib/delayed/worker.rb:212:in `times'
/app/vendor/bundle/ruby/2.3.0/gems/delayed_job-4.1.2/lib/delayed/worker.rb:212:in `work_off'
/app/vendor/bundle/ruby/2.3.0/gems/delayed_job-4.1.2/lib/delayed/worker.rb:175:in `block (4 levels) in start'
/app/vendor/ruby-2.3.1/lib/ruby/2.3.0/benchmark.rb:308:in `realtime'
/app/vendor/bundle/ruby/2.3.0/gems/delayed_job-4.1.2/lib/delayed/worker.rb:174:in `block (3 levels) in start'
/app/vendor/bundle/ruby/2.3.0/gems/delayed_job-4.1.2/lib/delayed/lifecycle.rb:61:in `block in initialize'
/app/vendor/bundle/ruby/2.3.0/gems/delayed_job-4.1.2/lib/delayed/lifecycle.rb:66:in `execute'
/app/vendor/bundle/ruby/2.3.0/gems/delayed_job-4.1.2/lib/delayed/lifecycle.rb:40:in `run_callbacks'
/app/vendor/bundle/ruby/2.3.0/gems/delayed_job-4.1.2/lib/delayed/worker.rb:173:in `block (2 levels) in start'
/app/vendor/bundle/ruby/2.3.0/gems/delayed_job-4.1.2/lib/delayed/worker.rb:172:in `loop'
/app/vendor/bundle/ruby/2.3.0/gems/delayed_job-4.1.2/lib/delayed/worker.rb:172:in `block in start'
/app/vendor/bundle/ruby/2.3.0/gems/delayed_job-4.1.2/lib/delayed/plugins/clear_locks.rb:7:in `block (2 levels) in <class:ClearLocks>'
/app/vendor/bundle/ruby/2.3.0/gems/delayed_job-4.1.2/lib/delayed/lifecycle.rb:79:in `block (2 levels) in add'
/app/vendor/bundle/ruby/2.3.0/gems/delayed_job-4.1.2/lib/delayed/lifecycle.rb:61:in `block in initialize'
/app/vendor/bundle/ruby/2.3.0/gems/delayed_job-4.1.2/lib/delayed/lifecycle.rb:79:in `block in add'
/app/vendor/bundle/ruby/2.3.0/gems/delayed_job-4.1.2/lib/delayed/lifecycle.rb:66:in `execute'
/app/vendor/bundle/ruby/2.3.0/gems/delayed_job-4.1.2/lib/delayed/lifecycle.rb:40:in `run_callbacks'
/app/vendor/bundle/ruby/2.3.0/gems/delayed_job-4.1.2/lib/delayed/worker.rb:171:in `start'
/app/vendor/bundle/ruby/2.3.0/gems/delayed_job-4.1.2/lib/delayed/tasks.rb:9:in `block (2 levels) in <top (required)>'
/app/vendor/bundle/ruby/2.3.0/gems/rake-10.5.0/lib/rake/task.rb:240:in `block in execute'
/app/vendor/bundle/ruby/2.3.0/gems/rake-10.5.0/lib/rake/task.rb:235:in `each'
/app/vendor/bundle/ruby/2.3.0/gems/rake-10.5.0/lib/rake/task.rb:235:in `execute'
/app/vendor/bundle/ruby/2.3.0/gems/rake-10.5.0/lib/rake/task.rb:179:in `block in invoke_with_call_chain'
/app/vendor/ruby-2.3.1/lib/ruby/2.3.0/monitor.rb:214:in `mon_synchronize'
/app/vendor/bundle/ruby/2.3.0/gems/rake-10.5.0/lib/rake/task.rb:172:in `invoke_with_call_chain'
/app/vendor/bundle/ruby/2.3.0/gems/rake-10.5.0/lib/rake/task.rb:165:in `invoke'
/app/vendor/bundle/ruby/2.3.0/gems/rake-10.5.0/lib/rake/application.rb:150:in `invoke_task'
/app/vendor/bundle/ruby/2.3.0/gems/rake-10.5.0/lib/rake/application.rb:106:in `block (2 levels) in top_level'
/app/vendor/bundle/ruby/2.3.0/gems/rake-10.5.0/lib/rake/application.rb:106:in `each'
/app/vendor/bundle/ruby/2.3.0/gems/rake-10.5.0/lib/rake/application.rb:106:in `block in top_level'
/app/vendor/bundle/ruby/2.3.0/gems/rake-10.5.0/lib/rake/application.rb:115:in `run_with_threads'
/app/vendor/bundle/ruby/2.3.0/gems/rake-10.5.0/lib/rake/application.rb:100:in `top_level'
/app/vendor/bundle/ruby/2.3.0/gems/rake-10.5.0/lib/rake/application.rb:78:in `block in run'
/app/vendor/bundle/ruby/2.3.0/gems/rake-10.5.0/lib/rake/application.rb:176:in `standard_exception_handling'
/app/vendor/bundle/ruby/2.3.0/gems/rake-10.5.0/lib/rake/application.rb:75:in `run'
/app/vendor/bundle/ruby/2.3.0/gems/rake-10.5.0/bin/rake:33:in `<top (required)>'
/app/vendor/bundle/ruby/2.3.0/bin/rake:23:in `load'
/app/vendor/bundle/ruby/2.3.0/bin/rake:23:in `<top (required)>'
/app/vendor/bundle/ruby/2.3.0/gems/bundler-1.13.7/lib/bundler/cli/exec.rb:74:in `load'
/app/vendor/bundle/ruby/2.3.0/gems/bundler-1.13.7/lib/bundler/cli/exec.rb:74:in `kernel_load'
/app/vendor/bundle/ruby/2.3.0/gems/bundler-1.13.7/lib/bundler/cli/exec.rb:27:in `run'
/app/vendor/bundle/ruby/2.3.0/gems/bundler-1.13.7/lib/bundler/cli.rb:332:in `exec'
/app/vendor/bundle/ruby/2.3.0/gems/bundler-1.13.7/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/app/vendor/bundle/ruby/2.3.0/gems/bundler-1.13.7/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
/app/vendor/bundle/ruby/2.3.0/gems/bundler-1.13.7/lib/bundler/vendor/thor/lib/thor.rb:359:in `dispatch'
/app/vendor/bundle/ruby/2.3.0/gems/bundler-1.13.7/lib/bundler/cli.rb:20:in `dispatch'
/app/vendor/bundle/ruby/2.3.0/gems/bundler-1.13.7/lib/bundler/vendor/thor/lib/thor/base.rb:440:in `start'
/app/vendor/bundle/ruby/2.3.0/gems/bundler-1.13.7/lib/bundler/cli.rb:11:in `start'
/app/vendor/bundle/ruby/2.3.0/gems/bundler-1.13.7/exe/bundle:34:in `block in <top (required)>'
/app/vendor/bundle/ruby/2.3.0/gems/bundler-1.13.7/lib/bundler/friendly_errors.rb:100:in `with_friendly_errors'
/app/vendor/bundle/ruby/2.3.0/gems/bundler-1.13.7/exe/bundle:26:in `<top (required)>'
/app/bin/bundle:3:in `load'
/app/bin/bundle:3:in `<main>'

  1. Support Staff 1 Posted by Pat Allan on 22 May, 2017 03:21 AM

    Pat Allan's Avatar

    Hi Andy

    Hmm, this is odd - what’s the name of your app?


    Pat

  2. 2 Posted by WANG Andy on 22 May, 2017 03:25 AM

    WANG Andy's Avatar

    Hi Pat,

    It's called "Mushroomcam"

    Thanks,
    Andy

    On 22 May 2017, at 11:21 AM, Pat Allan <[email blocked]<mailto:[email blocked]>> wrote:

  3. Support Staff 3 Posted by Pat Allan on 22 May, 2017 03:32 AM

    Pat Allan's Avatar

    Thanks Andy.

    You’re currently on the Wooden Sphinx plan, which does not allow delta indexing (due to the extra overhead involved). This is why delta requests are returning an error.

    I’d recommend either upgrading to the Ceramic Sphinx plan, disabling deltas, or switch to real-time indices. The last option means you can stay on the Wooden Sphinx plan and have immediate updates, but it does mean a bit more work in the short term. The Thinking Sphinx docs cover this pretty well:
    http://freelancing-gods.com/thinking-sphinx/real_time.html <http://freelancing-gods.com/thinking-sphinx/real_time.html>

    If you’ve any questions about this, do let me know!

    Cheers,


    Pat

  4. 4 Posted by WANG Andy on 22 May, 2017 03:34 AM

    WANG Andy's Avatar

    Hi Pat,

    Thanks for your info, but the app have been working for a little over 5months and it never had this problem. Do you know why?

    Thanks,
    Andy

    On 22 May 2017, at 11:32 AM, Pat Allan <[email blocked]<mailto:[email blocked]>> wrote:

  5. Support Staff 5 Posted by Pat Allan on 22 May, 2017 03:42 AM

    Pat Allan's Avatar

    I’m not sure why, no, though now I’m wondering if I broke the behaviour at some point and accidentally fixed it lately?

    I _have_ been making some updates to the API over the past week, but the test coverage is pretty solid and I’ve not been changing behaviour, just updating libraries and internals. Do you know exactly when this error started cropping up for you?


    Pat

  6. 6 Posted by WANG Andy on 22 May, 2017 03:47 AM

    WANG Andy's Avatar

    Since yesterday. We just installed one in our staging "Mushroomcam-Staging" and it is having the exact same problem. But our previous listing (before the ones yesterday and just now) was about a week ago and back then we didn't have any problem.

    On 22 May 2017, at 11:42 AM, Pat Allan <[email blocked]<mailto:[email blocked]>> wrote:

  7. Support Staff 7 Posted by Pat Allan on 22 May, 2017 04:26 AM

    Pat Allan's Avatar

    Ah, I’ve found the cause - in my changes yesterday, I lost the Content-Type: application/json header for blocked API requests (valid ones kept the header). So, instead of logging the blocked request, the HTTP code in the flying-sphinx gem now complains because it doesn’t think it was dealing with JSON.

    So: delta indexing was never doing anything for your app, it’s just that this was only being noted in your logs, rather than raising an exception.

    The headers are now being sent through consistently, so you should find the exceptions have stopped again.

  8. 8 Posted by WANG Andy on 22 May, 2017 04:48 AM

    WANG Andy's Avatar

    Thanks for your feedback. However We're still seeing the error on our side..

    On 22 May 2017, at 12:26 PM, Pat Allan <[email blocked]<mailto:[email blocked]>> wrote:

  9. 9 Posted by Andy Wang on 22 May, 2017 01:17 PM

    Andy Wang's Avatar

    anything we need to update on our side? we're using Heroku add-on for the Sphinx

  10. Support Staff 10 Posted by Pat Allan on 22 May, 2017 01:40 PM

    Pat Allan's Avatar

    Hi Andy,

    No, the problem’s entirely on my side of things. I think I’ve truly fixed it now - I got my 4xx status codes wrong in the updates. Can you confirm whether the error’s still happening?


    Pat

  11. 11 Posted by WANG Andy on 22 May, 2017 02:02 PM

    WANG Andy's Avatar

    Hey Pat,

    Yes, the problem has been solved. Thank you!

    Andy

    Pat Allan <[email blocked]<mailto:[email blocked]>> 於 2017年5月22日 下午9:40 寫道:

  12. Support Staff 12 Posted by Pat Allan on 22 May, 2017 02:06 PM

    Pat Allan's Avatar

    Thanks for your patience :)

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac