Flying Sphinx Rebuild Task Fails -

abhishek77in's Avatar

abhishek77in

06 Apr, 2015 09:12 PM

Ruby version - 2.1.2
flying-sphinx-1.2.0
thinking-sphinx-3.1.3

Error logs -

$ heroku run bundle exec flying-sphinx rebuild -a <app-name>
Running `bundle exec flying-sphinx rebuild` attached to terminal... up, run.8563
I, [2015-04-06T21:08:10.237918 #3] INFO -- : Executing Action: rebuild
** [NewRelic][04/06/15 21:08:14 +0000 run.* (3)] INFO : Starting the New Relic agent in "production" environment.
** [NewRelic][04/06/15 21:08:14 +0000 run.* (3)] INFO : To prevent agent startup add a NEWRELIC_AGENT_ENABLED=false environment variable or modify the "production" section of your newrelic.yml.
** [NewRelic][04/06/15 21:08:14 +0000 run.* (3)] INFO : Reading configuration from config/newrelic.yml (/app)
** [NewRelic][04/06/15 21:08:14 +0000 run.* (3)] INFO : Environment: production
** [NewRelic][04/06/15 21:08:14 +0000 run.* (3)] INFO : No known dispatcher detected.
** [NewRelic][04/06/15 21:08:14 +0000 run.* (3)] INFO : Application: Barkloudly Staging
** [NewRelic][04/06/15 21:08:14 +0000 run.* (3)] INFO : delayed_job not available: No DJ worker present. Skipping DJ queue sampler
** [NewRelic][04/06/15 21:08:14 +0000 run.* (3)] INFO : Installing middleware-based Excon instrumentation
** [NewRelic][04/06/15 21:08:14 +0000 run.* (3)] INFO : Installing ActiveRecord 4 instrumentation
** [NewRelic][04/06/15 21:08:14 +0000 run.* (3)] INFO : Installing DelayedJob instrumentation [part 1/2]
** [NewRelic][04/06/15 21:08:14 +0000 run.* (3)] INFO : Installing deferred Rack instrumentation
** [NewRelic][04/06/15 21:08:14 +0000 run.* (3)] INFO : Installing Rack::Builder middleware instrumentation
** [NewRelic][04/06/15 21:08:14 +0000 run.* (3)] INFO : Installing Rails 3+ middleware instrumentation
** [NewRelic][04/06/15 21:08:14 +0000 run.* (3)] INFO : Installing ActiveJob instrumentation
** [NewRelic][04/06/15 21:08:14 +0000 run.* (3)] INFO : Installing Net instrumentation
** [NewRelic][04/06/15 21:08:14 +0000 run.* (3)] INFO : Installing Rails 4 Error instrumentation
** [NewRelic][04/06/15 21:08:14 +0000 run.* (3)] INFO : Installing Rails 4 view instrumentation
** [NewRelic][04/06/15 21:08:14 +0000 run.* (3)] INFO : Installing Rails 4 Controller instrumentation
** [NewRelic][04/06/15 21:08:14 +0000 run.* (3)] INFO : Finished instrumentation
** [NewRelic][04/06/15 21:08:14 +0000 run.* (3)] INFO : Reporting to: https://rpm.newrelic.com/accounts/749124/applications/4762327
** [NewRelic][04/06/15 21:08:16 +0000 run.* (3)] INFO : Starting Agent shutdown
/app/vendor/ruby-2.1.2/lib/ruby/2.1.0/fileutils.rb:250:in `mkdir': Read-only file system @ dir_s_mkdir - /home/abhishek (Errno::EROFS)
from /app/vendor/ruby-2.1.2/lib/ruby/2.1.0/fileutils.rb:250:in `fu_mkdir'
from /app/vendor/ruby-2.1.2/lib/ruby/2.1.0/fileutils.rb:224:in `block (2 levels) in mkdir_p'
from /app/vendor/ruby-2.1.2/lib/ruby/2.1.0/fileutils.rb:222:in `reverse_each'
from /app/vendor/ruby-2.1.2/lib/ruby/2.1.0/fileutils.rb:222:in `block in mkdir_p'
from /app/vendor/ruby-2.1.2/lib/ruby/2.1.0/fileutils.rb:208:in `each'
from /app/vendor/ruby-2.1.2/lib/ruby/2.1.0/fileutils.rb:208:in `mkdir_p'
from /app/vendor/bundle/ruby/2.1.0/gems/thinking-sphinx-3.1.3/lib/thinking_sphinx/core/index.rb:88:in `set_path'
from /app/vendor/bundle/ruby/2.1.0/gems/thinking-sphinx-3.1.3/lib/thinking_sphinx/core/index.rb:53:in `render'
from /app/vendor/bundle/ruby/2.1.0/gems/riddle-1.5.11/lib/riddle/configuration.rb:43:in `block in render'
from /app/vendor/bundle/ruby/2.1.0/gems/riddle-1.5.11/lib/riddle/configuration.rb:43:in `collect'
from /app/vendor/bundle/ruby/2.1.0/gems/riddle-1.5.11/lib/riddle/configuration.rb:43:in `render'
from /app/vendor/bundle/ruby/2.1.0/gems/thinking-sphinx-3.1.3/lib/thinking_sphinx/configuration.rb:93:in `render'
from /app/vendor/bundle/ruby/2.1.0/gems/flying-sphinx-1.2.0/lib/flying_sphinx/sphinxql/translator.rb:13:in `sphinx_configuration'
from /app/vendor/bundle/ruby/2.1.0/gems/flying-sphinx-1.2.0/lib/flying_sphinx/sphinxql/translator.rb:17:in `sphinx_indices'
from /app/vendor/bundle/ruby/2.1.0/gems/flying-sphinx-1.2.0/lib/flying_sphinx/setting_files.rb:6:in `initialize'
from /app/vendor/bundle/ruby/2.1.0/gems/flying-sphinx-1.2.0/lib/flying_sphinx/configuration_options.rb:13:in `new'
from /app/vendor/bundle/ruby/2.1.0/gems/flying-sphinx-1.2.0/lib/flying_sphinx/configuration_options.rb:13:in `files_hash'
from /app/vendor/bundle/ruby/2.1.0/gems/flying-sphinx-1.2.0/lib/flying_sphinx/configuration_options.rb:19:in `gzipped_files_hash'
from /app/vendor/bundle/ruby/2.1.0/gems/flying-sphinx-1.2.0/lib/flying_sphinx/configuration_options.rb:3:in `to_hash'
from /app/vendor/bundle/ruby/2.1.0/gems/flying-sphinx-1.2.0/lib/flying_sphinx/controller.rb:50:in `block in rebuild'
from /app/vendor/bundle/ruby/2.1.0/gems/flying-sphinx-1.2.0/lib/flying_sphinx/action.rb:65:in `call'
from /app/vendor/bundle/ruby/2.1.0/gems/flying-sphinx-1.2.0/lib/flying_sphinx/action.rb:65:in `response'
from /app/vendor/bundle/ruby/2.1.0/gems/flying-sphinx-1.2.0/lib/flying_sphinx/action.rb:79:in `start'
from /app/vendor/bundle/ruby/2.1.0/gems/flying-sphinx-1.2.0/lib/flying_sphinx/action.rb:21:in `block in perform'
from /app/vendor/ruby-2.1.2/lib/ruby/2.1.0/timeout.rb:91:in `block in timeout'
from /app/vendor/ruby-2.1.2/lib/ruby/2.1.0/timeout.rb:35:in `block in catch'
from /app/vendor/ruby-2.1.2/lib/ruby/2.1.0/timeout.rb:35:in `catch'
from /app/vendor/ruby-2.1.2/lib/ruby/2.1.0/timeout.rb:35:in `catch'
from /app/vendor/ruby-2.1.2/lib/ruby/2.1.0/timeout.rb:106:in `timeout'
from /app/vendor/bundle/ruby/2.1.0/gems/flying-sphinx-1.2.0/lib/flying_sphinx/action.rb:15:in `perform'
from /app/vendor/bundle/ruby/2.1.0/gems/flying-sphinx-1.2.0/lib/flying_sphinx/action.rb:5:in `perform'
from /app/vendor/bundle/ruby/2.1.0/gems/flying-sphinx-1.2.0/lib/flying_sphinx/controller.rb:49:in `rebuild'
from /app/vendor/bundle/ruby/2.1.0/gems/flying-sphinx-1.2.0/lib/flying_sphinx/cli.rb:84:in `rebuild'
from /app/vendor/bundle/ruby/2.1.0/gems/flying-sphinx-1.2.0/lib/flying_sphinx/cli.rb:29:in `block in run'
from /app/vendor/bundle/ruby/2.1.0/gems/flying-sphinx-1.2.0/lib/flying_sphinx/cli.rb:27:in `each'
from /app/vendor/bundle/ruby/2.1.0/gems/flying-sphinx-1.2.0/lib/flying_sphinx/cli.rb:27:in `all?'
from /app/vendor/bundle/ruby/2.1.0/gems/flying-sphinx-1.2.0/lib/flying_sphinx/cli.rb:27:in `run'
from /app/vendor/bundle/ruby/2.1.0/gems/flying-sphinx-1.2.0/bin/flying-sphinx:5:in `<top (required)>'
from /app/vendor/bundle/ruby/2.1.0/bin/flying-sphinx:23:in `load'
from /app/vendor/bundle/ruby/2.1.0/bin/flying-sphinx:23:in `<main>'

  1. 1 Posted by abhishek77in on 06 Apr, 2015 09:14 PM

    abhishek77in's Avatar

    This task is failing on Heroku. And the error is quite surprising to me.

  2. Support Staff 2 Posted by Pat Allan on 06 Apr, 2015 11:09 PM

    Pat Allan's Avatar

    I guess the error makes sense - apps on Heroku are read-only - but surprising that you're seeing this error and others are not (I don't see it in my own apps). Is this something that's only just started to happen? Are you setting a custom index path anywhere?

  3. 3 Posted by abhishek77in on 07 Apr, 2015 06:38 AM

    abhishek77in's Avatar

    [Problem Solved]
    Thanks Pat I found the issue.

    I had thinking_shinx.yaml which was not deleted after the I migrated from
    my VPS to Heroku.

    -production:
    - pid_file: /home/abhishek/apps/app_name/shared/tmp/searchd.pid
    - indices_location: /home/abhishek/apps/app_name/shared/db/sphinx
    - configuration_file:
    /home/abhishek/apps/app_name/shared/production.sphinx.conf
    - binlog_path: /home/abhishek/apps/app_name/shared/binlog
    - mem_limit: 200M

    Deleting this file, resolves the issue.

  4. Support Staff 4 Posted by Pat Allan on 07 Apr, 2015 06:40 AM

    Pat Allan's Avatar

    Great :)

  5. Pat Allan closed this discussion on 07 Apr, 2015 06:40 AM.

Comments are currently closed for this discussion. You can start a new one.

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