Unable to use SSL to connect to Amazon RDS (Ruby on Rails, Heroku)

Hi,

I am trying to connect Flying Sphinx with my Amazon RDS instance using SSL in Heroku. The dyno is connected properly, since I have been able to load the database schema without issues. The DATABASE_URL looks something like (I have replace the values just in case):
mysql2://<user>:<password>@<amazon_rds_host>/<database>?sslca=config/amazon-rds-ca-cert.pem

The problem comes when I try to build the indexes (rake fs:index):

indexing index 'custom_field_value_core'...
ERROR: index 'custom_field_value_core': sql_connect: Access denied for user '<user>'@'<amazon_rds_host>' (using password: YES) (DSN=mysql://<user>:***@<amazon_rds_host>:3306/<database>).
total 0 docs, 0 bytes
total 0.358 sec, 0 bytes/sec, 0.00 docs/sec

Again, I have replaced the values. That kind of error is printed several times. I am not using any configuration file for Sphinx. I have tried the same disabling SSL and eveything worked just fine. Even though, I would like to enable SSL again. Any idea about why the SSL is not working?

Thanks in advance!

  1. Hi Jose

    Sphinx has a few options for MySQL SSL settings:
    http://sphinxsearch.com/docs/current.html#conf-mysql-ssl

    If you set these in config/thinking_sphinx.yml for the correct environment (each refer to a file), and then deploy that change with the appropriate files, the next time you run rebuild or configure, those settings will be pushed up to the Flying Sphinx servers, and indexing should work.

    Cheers

    Pat

  2. Also: I'm not sure if all three are needed - may depend on your/RDS's setup.

  3. Hi, Pat,

    It worked like a charm. Thanks for your help!

    Best,

    Jose

  4. Great to hear :)

  5. Pat Allan closed this discussion on 09 Dec, 2014 02:49 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

Recent Discussions