Getting "Read-only file system - /mnt/sphinx" when indexing

Roger Kind Kristiansen's Avatar

Roger Kind Kristiansen

17 Aug, 2011 05:02 AM

Hi,

I've just added Flying Sphinx to my Rails 3 Heroku app (running on Cedar). I've set it up, as far as I can understand, according to http://flying-sphinx.com/docs#installation and installation is fine.

However, when running "heroku run rake fs:index", I'm getting the following output:

$ heroku run rake ts:index
Running rake ts:index attached to terminal... up, run.3

Sphinx cannot be found on your system. You may need to configure the following
settings in your config/sphinx.yml file:
  * bin_path
  * searchd_binary_name
  * indexer_binary_name

For more information, read the documentation:
http://freelancing-god.github.com/ts/en/advanced_config.html          

Generating Configuration to /app/config/production.sphinx.conf
rake aborted!
Read-only file system - /mnt/sphinx`

I'm probably missing something obvious here, do anyone know what? I'm rather new to heroku as well as rails, so not sure where to begin the trouble shooting. %-)

  1. 1 Posted by Roger Kind Kris... on 17 Aug, 2011 05:03 AM

    Roger Kind Kristiansen's Avatar

    Oh, and I know about the fix for the first warning, it's the "Read-only file system" thing that's got me stumped.

  2. Support Staff 2 Posted by Pat Allan on 17 Aug, 2011 06:02 AM

    Pat Allan's Avatar

    Hi Roger

    I'm not sure why it even cares about the read-only file system - I've just indexed on both bamboo and cedar apps, and I don't see that message.

    What version of Thinking Sphinx are you using? Maybe it's not new enough to pick up the relevant settings from Flying Sphinx? Does adding the version number to sphinx.yml (as mentioned in the docs) help things?

  3. 3 Posted by Roger Kind Kris... on 17 Aug, 2011 06:28 AM

    Roger Kind Kristiansen's Avatar

    I upgraded to Thinking Sphinx 2.0.4, since the docs said that was the minimum required version and I was running 2.0.3 previously, and Flying Sphinx 0.6.0 since that was used in the examples.

    I'll check tomorrow if adding the version number to sphynx.yml fixes it. I see, after reading up on some gem wizardry (ruby/rails newbie, remember:), that the latest TS version is 2.0.5, so I'll try upgrading that one as well.

  4. Support Staff 4 Posted by Pat Allan on 17 Aug, 2011 06:33 AM

    Pat Allan's Avatar

    I'm wondering if it all comes down to the version number - but yeah, give it all a shot, let me know how you go :)

  5. 5 Posted by Roger Kind Kris... on 17 Aug, 2011 10:00 AM

    Roger Kind Kristiansen's Avatar

    Actually had a few minutes to get the environment up at my current location. Added the file, with the contents beneath, but it did not seem to help. Now the output is:

    $ heroku run rake ts:index
    Running rake ts:index attached to terminal... up, run.5
    Generating Configuration to /app/config/production.sphinx.conf
    rake aborted!
    Read-only file system - /mnt/sphinx
    
    Tasks: TOP => ts:index => thinking_sphinx:index
    (See full trace by running task with --trace)
    

    A peek into the logs (heroku logs command) doesn't seem to reveal anything interesting:

    2011-08-17T09:52:23+00:00 heroku[run.5]: State changed from created to starting
    2011-08-17T09:52:25+00:00 app[run.5]: Awaiting client
    2011-08-17T09:52:25+00:00 app[run.5]: Starting process with command `bundle exec rake ts:index`
    2011-08-17T09:52:26+00:00 heroku[run.5]: State changed from starting to up
    2011-08-17T09:52:29+00:00 heroku[run.5]: Process exited
    2011-08-17T09:52:30+00:00 heroku[run.5]: State changed from up to complete
    

    I attached the Gemfile* files. Is there anything else I can supply that might give a clue?

  6. Support Staff 6 Posted by Pat Allan on 17 Aug, 2011 10:09 AM

    Pat Allan's Avatar

    Ah, I should have spotted this straight up - when running the rake tasks on Heroku (as opposed to locally), the prefix is fs, not ts - which explains the read-only complaint as well (it's trying to create the directory, but can't on Heroku's servers).

    So, try:

    heroku run rake fs:index
    
  7. 7 Posted by Roger Kind Kris... on 17 Aug, 2011 10:16 AM

    Roger Kind Kristiansen's Avatar

    Ah, that got me one step further. I even thought I was running fs:index, as witnessed by my initial question. ;) Thanks for the quick responses!

    ... now just need to work around that CRC32() issue I see documented. :)

  8. Support Staff 8 Posted by Pat Allan on 17 Aug, 2011 10:22 AM

    Pat Allan's Avatar

    Yeah, it's a little annoying Heroku don't have that in their shared database setup. Happy to talk through options around that if you need help.

  9. 9 Posted by Roger Kind Kris... on 17 Aug, 2011 07:42 PM

    Roger Kind Kristiansen's Avatar

    Hmm, some pointers would be appreciated! Should I start a new thread?

  10. Support Staff 10 Posted by Pat Allan on 17 Aug, 2011 11:07 PM

    Pat Allan's Avatar

    Yeah, a new thread sounds good - if you could include the define_index block and purpose of CRC'd columns, that'd be great.

    Pat

  11. Pat Allan closed this discussion on 23 Aug, 2011 11:12 PM.

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