Hi Pat,
There seems to be a disconnect somewhere in the way I have understood how the setup works. I have nailed down Indexing and Searching is the issue now. Apologies for any repetition on my side too but I think this will help you guide me better. I will explain what I've done so far and ask questions along the way.
Sphinx/Indexing server
I've set up the 'dumb' app on this server. The thinking_sphinx.yml file looks like this:
development:
pid_file: "/var/run/sphinx/searchd.pid"
indices_location: "/home/shared/db/sphinx"
configuration_file: "/home/shared/development.sphinx.conf"
sql_sock: /var/run/mysqld/mysqld.sock
searchd_log: "/home/log/production.searchd.log"
query_log: "/home/log/production.query.log"
#mem_limit: 128M
morphology: stem_en
min_infix_len: 3
enable_star: true
production:
#pid_file: "/var/run/sphinx/searchd.pid"
indices_location: "/home/ubuntu/projects/shared/db/sphinx"
configuration_file: "/home/ubuntu/projects/shared/production.sphinx.conf"
#sql_sock: /var/run/mysqld/mysqld.sock
searchd_log: "/home/ubuntu/projects/kopo-kopo/log/production.searchd.log"
query_log: "/home/ubuntu/projects/kopo-kopo/log/production.query.log"
#mem_limit: 128M
morphology: stem_en
min_infix_len: 3
enable_star: true
The database.yml file is set up to connect to the production rails server and hence index the production db:
production:
adapter: postgresql
encoding: unicode
database: app_production
pool: 5
username: joram
password: password
host: 11.11.11.111
port: 5432
I've installed Sphinx and MySQL on this server and run the rebuild rake task which has created my conf files successfully. I've also opened up port 5432 (Postgres port) on my production server to accept remote connections from my Sphinx server and this works well i.e Indexing is working like a charm.
Production server
On my production Rails server, I have put my Sphinx server's address in the thinking_sphinx.yml file as shown below:
development:
morphology: stem_en
min_infix_len: 3
enable_star: true
production:
address: 22.22.22.222
I'm assuming this means that Thinking Sphinx will connect to the default port 9306 on my Sphinx server (22.22.22.222). My confusion comes in here. Is the mysql41 port on my production server's configs (9306 by default in this case) supposed to be the MySQL port on my Sphinx server or the searchd port? Ive done a netstat on my Sphinx server and MySQL is running port 3306 (default I think) and searchd obviously on 9306.
I had earlier put mysql41 in the production thinking_sphinx.yml file above as
the mysql port on my sphinx server and that is why I was
getting a connection error since I was trying to connect to MySQL with
no password.
So that's the BIG question of the day Pat. What am I missing in order to connect my production server to the Sphinx server so that it can use those generated indices to search.. You're doing a great job being patient with us noobs trying to figure things out. I hope I don't cause you patience to run out :)
Thanks,
Joram.