Once you've changed the port setting to mysql41, have you run rake ts:index 
(which will regenerate the configuration file)?

On 12/07/2013, at 9:28 PM, J. Garcia wrote:

> Thanks Pat for your reply.
> 
> I do run ts:start:
> > rake ts:start
> Started searchd successfully (pid: 4044).
> 
> Then, when doing a search, this is what I get in my Rails app:
> 
> Lost connection to MySQL server at 'reading initial communication packet', 
> system error: 0
> The partial stacktrace is:
> Mysql2::Error - Lost connection to MySQL server at 'reading initial 
> communication packet', system error: 0:
>   mysql2 (0.3.12b5) lib/mysql2/client.rb:56:in `connect'
>   mysql2 (0.3.12b5) lib/mysql2/client.rb:56:in `initialize'
>   thinking-sphinx (3.0.4) lib/thinking_sphinx/connection.rb:59:in `new'
>   thinking-sphinx (3.0.4) lib/thinking_sphinx/connection.rb:59:in `initialize'
>   thinking-sphinx (3.0.4) lib/thinking_sphinx/connection.rb:14:in `new'
>   thinking-sphinx (3.0.4) lib/thinking_sphinx/connection.rb:14:in `new'
>   thinking-sphinx (3.0.4) lib/thinking_sphinx/connection.rb:26:in `block in 
> pool'
>   innertube (1.0.2) lib/innertube.rb:120:in `call'
>   innertube (1.0.2) lib/innertube.rb:120:in `block in take'
> 
> If I change the port param to mysql41: 9306 nothing changes.
> It's frustrating, as the examples look really good and I was trying it out...
> 
> A minor pain is when I run rake ts:stop it never ends. Then I cancel the 
> command and manually kill the searchd process.
> 
> J. Garcia
> 
> 
> 
> On Thursday, July 11, 2013 7:28:27 PM UTC+2, J. Garcia wrote:
> I'm having a hard time trying to set up a working thinking-sphinx 
> configuration.
> 
> My setup:
>       • Win 7
>       • Rails: 3.2.13
>       • MySql: 5.5.32
>       • Ruby:1.9.3
>       • Sphinx:2.0.8
>       • thinking_sphinx:3.0.4
>       • mysql2: 0.3.12b5
> I must say there was hardly no info on how to get started with 
> thinking_sphinx.
> After adding the gem, and googling a lot, I added a 
> config/thinking_sphinx.yml and put this onto it:
> 
> development:
>   host: localhost
>   port: 9306
>   bin_path: F:\sw\sphinx-2.0.8-release-win32\bin
>   searchd_binary_name: searchd
>   indexer_binary_name: indexer
> 
> Notice it says port, and not mysql41 as it is explained in thinking_sphinx.
> 
> The app/indices part was documented well and I created this folder and added 
> a model_index.rb file as explained.
> 
> After this, I run:
> rake ts:index
> 
> and if successfully indexed my model entities and created a 
> development.sphinx.conf file:
> 
> Generating configuration to E:/home/my_project/config/development.sphinx.conf
> Sphinx 2.0.8-release (r3831)
> Copyright (c) 2001-2012, Andrew Aksyonoff
> Copyright (c) 2008-2012, Sphinx Technologies Inc (http://sphinxsearch.com)
> 
> using config file 
> 'E:/home/my_project/rails/music_collect/config/development.sphinx.conf'...
> WARNING: key 'address' is deprecated in 
> E:/home/my_project/config/development.sphinx.conf line 7; use 'listen' 
> instead.
> indexing index 'mymodel_core'...
> collected 1000 docs, 0.0 MB
> sorted 0.0 Mhits, 100.0% done
> total 1000 docs, 17768 bytes
> total 0.037 sec, 470003 bytes/sec, 26452.22 docs/sec
> total 2 reads, 0.000 sec, 21.4 kb/call avg, 0.0 msec/call avg
> total 9 writes, 0.000 sec, 11.5 kb/call avg, 0.0 msec/call avg
> rotating indices: successfully sent SIGHUP to searchd (pid=7456).
> 
> However, when I call MyModel.search in my controller, I get this error:
> 
> Mysql2::Error at /mymodels
> 
> Lost connection to MySQL server at 'reading initial communication packet', 
> system error: 0
> 
> It works fine if I do a MyModel.all , which directly talks to MySql backend.
> 
> Any help would be appreciated.
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Thinking Sphinx" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/thinking-sphinx.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

 

-- 
You received this message because you are subscribed to the Google Groups 
"Thinking Sphinx" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/thinking-sphinx.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to