2014-04-06 3 views
0

오늘 해결할 수없는 문제가 있습니다. 이미 적어도 한 번은 나에게 일어 났지만, 나는 그것을 교정하기 위해 내가 한 일을 정확히 기억하지 못한다.ThinkingSphingx on production : 요청한 주소를 할당 할 수 없습니다.

나는 (아파치와 여객과 루비 2.1를 사용하여) 내 레일 4 응용 프로그램을 배포 현재 내가 다음 오류 때문에 생각 - 스핑크스를 사용할 수 없습니다 카피 스트라 노 (3)를 사용하여 내 자신의 서버에있어 : ​​

FATAL: bind() failed on my.ip.address : Cannot assign requested address

index은 오류없이 사용할 수 있지만 rebuild은 사용할 수 없기 때문에이 오류는 이상합니다.

이제이 문제를 해결하기 위해 ssh로 서버에서 직접 작업하고 있습니다. 나만의 searchd을 시작해야합니까? 다시 빌드하는 동안 Apache를 중지해야합니까?

나는 어디서부터 시작해야할지 모르겠다.

마지막 단어 : 가장 이상한 부분은 그 것처럼 작동하지만 다시 시작할 수 없다는 것입니다.

일부 구성 파일에 가입했습니다.

설정/초기화/thinking_sphinx.rb

ThinkingSphinx::ActiveRecord::DatabaseAdapters.default = 
    ThinkingSphinx::ActiveRecord::DatabaseAdapters::PostgreSQLAdapter 

ThinkingSphinx::SphinxQL.functions! 

구성/thinking_sphinx.yml

development: 
    mysql41 : 9312 
    enable_star: true 
    min_prefix_len: 3 
    utf8: true 

preprod: 
    address: "my.domain.com" 
    port: 9312 
    enable_star: true 
    min_prefix_len: 3 

구성/deploy.rb

execute "cd #{fetch(:deploy_to)}/current/ && RAILS_ENV=#{fetch(:environment)} bundle exec rake ts:rebuild", raise_on_non_zero_exit: false 
execute "cd #{fetch(:deploy_to)}/current/ && RAILS_ENV=#{fetch(:environment)} bundle exec rake ts:index", raise_on_non_zero_exit: false 
,

로그/preprod.searchd.log

[Sun Apr 6 15:16:07.185 2014] [ 4647] Child process 4648 has been forked 
[Sun Apr 6 15:16:07.191 2014] [ 4648] listening on 82.227.207.7:9312 
[Sun Apr 6 15:16:07.191 2014] [ 4648] bind() failed on my.ip.address, retrying... 
[Sun Apr 6 15:16:10.194 2014] [ 4648] bind() failed on my.ip.address, retrying... 
[Sun Apr 6 15:16:13.196 2014] [ 4648] bind() failed on my.ip.address, retrying... 
[Sun Apr 6 15:16:16.199 2014] [ 4648] bind() failed on my.ip.address, retrying... 
[Sun Apr 6 15:16:19.202 2014] [ 4648] bind() failed on my.ip.address, retrying... 
[Sun Apr 6 15:16:22.205 2014] [ 4648] bind() failed on my.ip.address, retrying... 
[Sun Apr 6 15:16:25.208 2014] [ 4648] bind() failed on my.ip.address, retrying... 
[Sun Apr 6 15:16:28.212 2014] [ 4648] bind() failed on my.ip.address, retrying... 
[Sun Apr 6 15:16:31.215 2014] [ 4648] bind() failed on my.ip.address, retrying... 
[Sun Apr 6 15:16:34.218 2014] [ 4648] bind() failed on my.ip.address, retrying... 
[Sun Apr 6 15:16:37.221 2014] [ 4648] bind() failed on my.ip.address, retrying... 
[Sun Apr 6 15:16:40.224 2014] [ 4648] bind() failed on my.ip.address, retrying... 
[Sun Apr 6 15:16:43.228 2014] [ 4648] FATAL: bind() failed on my.ip.address: Cannot assign requested address 
[Sun Apr 6 15:16:43.229 2014] [ 4647] Child process 4648 has been finished, exit code 1. Watchdog finishes also. Good bye! 

당신의 도움에 미리 감사드립니다.

답변

1

해결책을 찾았습니다. 실수는 thinking_sphinx.rb 파일에서 발생했습니다. 개발시와 동일한 구성이 필요했습니다.

preprod: 
    mysql41 : 9312 
    enable_star: true 
    min_prefix_len: 3 

마지막으로, 문제는 지정되지 않은 PID 파일 경로에서 온 우리는 rake ts:rebuild 전에 rake ts:configure 스핑크스 다시 구성해야합니다. Capistrano 3의 배포 문제가 완전히 해결되었습니다.

다른 도움이되기를 바랍니다.

+0

이 업데이트가 끝난 후, 다시 빌드하기 전에'searchd' 프로세스의 종료를 포크했습니다. 도움이되기를 바랍니다. – BriceB