Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Too many exceptions occured, giving up. The HTTP response was: socket option should be a String, a Fixnum, true, or false #18

Closed
sammcj opened this issue Feb 5, 2015 · 10 comments
Assignees

Comments

@sammcj
Copy link

sammcj commented Feb 5, 2015

Was loading data in fine, got to about 5% then endless:

[ERROR] socket option should be a String, a Fixnum, true, or false, retrying (2)...
[ERROR] socket option should be a String, a Fixnum, true, or false, retrying (3)...
[ERROR] socket option should be a String, a Fixnum, true, or false, retrying (4)...
[ERROR] socket option should be a String, a Fixnum, true, or false, retrying (5)...
[ERROR] Too many exceptions occured, giving up. The HTTP response was: socket option should be a String, a Fixnum, true, or false
[ERROR] socket option should be a String, a Fixnum, true, or false, retrying (1)...

But ES is hall fine and dandy (We use ES a lot so have a big cluster setup anyway).

Last login: Fri Feb  6 09:04:19 2015 from systems-samm
root@dev-redmine:~  # curl int-elastic-01:9200
{
  "status" : 200,
  "name" : "int-elastic-01-ES1",
  "cluster_name" : "int-elastic-cluster",
  "version" : {
    "number" : "1.4.0",
    "build_hash" : "bc94bd81298f81c656893ab1ddddd30a99356066",
    "build_timestamp" : "2014-11-05T14:26:12Z",
    "build_snapshot" : false,
    "lucene_version" : "4.10.2"
  },
  "tagline" : "You Know, for Search"
}
@nodecarter
Copy link
Contributor

Can you try to set BATCH_SIZE=100 when call reindex_all task?

@sammcj
Copy link
Author

sammcj commented Feb 5, 2015

Sure doing now.

@sammcj
Copy link
Author

sammcj commented Feb 5, 2015

Certainly getting further:

root@dev-redmine:/var/vhost/dev-redmine 1 # BATCH_SIZE=100 ELASTICSEARCH_URL='int-elastic-01:9200' ./rbenvrun.sh bundle exec rake redmine_elasticsearch:reindex_all RAILS_ENV=production
Loading Rails environment for Resque
Recreate index for all available search types
Projects:       25% |||||||||||||||||||||                                                            | ETA:  00:30:32

Might be good to add this to the readme.md

@sammcj
Copy link
Author

sammcj commented Feb 5, 2015

and boom:

root@dev-redmine:/var/vhost/dev-redmine 1 # BATCH_SIZE=100 ELASTICSEARCH_URL='int-elastic-01:9200' ./rbenvrun.sh bundle exec rake redmine_elasticsearch:reindex_all RAILS_ENV=production
Loading Rails environment for Resque
Recreate index for all available search types
rake aborted!   49% |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||                                                                                                      | ETA:  00:15:16
ActiveRecord::StatementInvalid: PG::UndefinedColumn: ERROR:  column "project_id" does not exist
LINE 1: SELECT  "contacts".* FROM "contacts"  WHERE (project_id = 1)...
                                                     ^
: SELECT  "contacts".* FROM "contacts"  WHERE (project_id = 1) ORDER BY "contacts"."id" ASC LIMIT 100
/var/vhost/dev-redmine/.rbenv/versions/rbx-2.4.1/gems/gems/activerecord-3.2.19/lib/active_record/connection_adapters/postgresql_adapter.rb:1163:in `exec_no_cache'
/var/vhost/dev-redmine/.rbenv/versions/rbx-2.4.1/gems/gems/activerecord-3.2.19/lib/active_record/connection_adapters/postgresql_adapter.rb:660:in `exec_query'
/var/vhost/dev-redmine/.rbenv/versions/rbx-2.4.1/gems/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract_adapter.rb:280:in `log'
/var/vhost/dev-redmine/.rbenv/versions/rbx-2.4.1/gems/gems/activesupport-3.2.19/lib/active_support/notifications/instrumenter.rb:26:in `instrument'
/var/vhost/dev-redmine/.rbenv/versions/rbx-2.4.1/gems/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract_adapter.rb:275:in `log'
/var/vhost/dev-redmine/.rbenv/versions/rbx-2.4.1/gems/gems/activerecord-3.2.19/lib/active_record/connection_adapters/postgresql_adapter.rb:659:in `exec_query'
/var/vhost/dev-redmine/.rbenv/versions/rbx-2.4.1/gems/gems/activerecord-3.2.19/lib/active_record/connection_adapters/postgresql_adapter.rb:1261:in `select'
/var/vhost/dev-redmine/.rbenv/versions/rbx-2.4.1/gems/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/database_statements.rb:17:in `select_all'
/var/vhost/dev-redmine/.rbenv/versions/rbx-2.4.1/gems/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/query_cache.rb:63:in `select_all'
/var/vhost/dev-redmine/.rbenv/versions/rbx-2.4.1/gems/gems/activerecord-3.2.19/lib/active_record/querying.rb:38:in `find_by_sql'
/var/vhost/dev-redmine/.rbenv/versions/rbx-2.4.1/gems/gems/activerecord-3.2.19/lib/active_record/explain.rb:38:in `logging_query_plan'
/var/vhost/dev-redmine/.rbenv/versions/rbx-2.4.1/gems/gems/activerecord-3.2.19/lib/active_record/querying.rb:37:in `find_by_sql'
/var/vhost/dev-redmine/.rbenv/versions/rbx-2.4.1/gems/gems/activerecord-3.2.19/lib/active_record/relation.rb:171:in `exec_queries'
/var/vhost/dev-redmine/.rbenv/versions/rbx-2.4.1/gems/gems/activerecord-3.2.19/lib/active_record/relation.rb:160:in `to_a'
/var/vhost/dev-redmine/.rbenv/versions/rbx-2.4.1/gems/gems/activerecord-3.2.19/lib/active_record/explain.rb:38:in `logging_query_plan'
/var/vhost/dev-redmine/.rbenv/versions/rbx-2.4.1/gems/gems/activerecord-3.2.19/lib/active_record/relation.rb:159:in `to_a'
/var/vhost/dev-redmine/.rbenv/versions/rbx-2.4.1/gems/gems/activerecord-3.2.19/lib/active_record/relation/batches.rb:66:in `find_in_batches'
/var/vhost/dev-redmine/plugins/redmine_elasticsearch/lib/redmine_elasticsearch/indexer_service.rb:51:in `update_search_klass_for_project'
/var/vhost/dev-redmine/plugins/redmine_elasticsearch/lib/redmine_elasticsearch/indexer_service.rb:20:in `reindex_all'
kernel/bootstrap/array.rb:76:in `each'
/var/vhost/dev-redmine/plugins/redmine_elasticsearch/lib/redmine_elasticsearch/indexer_service.rb:19:in `reindex_all'
kernel/bootstrap/proc.rb:20:in `call'
/var/vhost/dev-redmine/plugins/redmine_elasticsearch/lib/redmine_elasticsearch/indexer_service.rb:43:in `for_each_parent_project'
/var/vhost/dev-redmine/.rbenv/versions/rbx-2.4.1/gems/gems/activerecord-3.2.19/lib/active_record/relation/batches.rb:21:in `find_each'
kernel/bootstrap/array.rb:76:in `each'
/var/vhost/dev-redmine/.rbenv/versions/rbx-2.4.1/gems/gems/activerecord-3.2.19/lib/active_record/relation/batches.rb:21:in `find_each'
/var/vhost/dev-redmine/.rbenv/versions/rbx-2.4.1/gems/gems/activerecord-3.2.19/lib/active_record/relation/batches.rb:72:in `find_in_batches'
/var/vhost/dev-redmine/.rbenv/versions/rbx-2.4.1/gems/gems/activerecord-3.2.19/lib/active_record/relation/batches.rb:20:in `find_each'
/var/vhost/dev-redmine/plugins/redmine_elasticsearch/lib/redmine_elasticsearch/indexer_service.rb:41:in `for_each_parent_project'
/var/vhost/dev-redmine/plugins/redmine_elasticsearch/lib/redmine_elasticsearch/indexer_service.rb:18:in `reindex_all'
/var/vhost/dev-redmine/plugins/redmine_elasticsearch/lib/tasks/index.rake:18:in `__script__'
kernel/bootstrap/proc.rb:20:in `call'
kernel/bootstrap/array.rb:76:in `each'
/var/vhost/dev-redmine/.rbenv/versions/rbx-2.4.1/gems/gems/rubysl-monitor-2.0.0/lib/rubysl/monitor/monitor.rb:211:in `synchronize (mon_synchronize)'
kernel/bootstrap/array.rb:76:in `each'
kernel/common/kernel.rb:497:in `load'
kernel/delta/code_loader.rb:66:in `load_script'
kernel/delta/code_loader.rb:152:in `load_script'
kernel/loader.rb:645:in `script'
kernel/loader.rb:799:in `main'
Tasks: TOP => redmine_elasticsearch:reindex_all
(See full trace by running task with --trace)

@nodecarter
Copy link
Contributor

Are you using other plugins? Which one is create the "contacts" table?

@sammcj
Copy link
Author

sammcj commented Feb 5, 2015

Yeah lots of plugins - that's the only way to bend redmine to your needs ;)

The contacts table is provided by http://www.redmine.org/plugins/redmine_contacts

redmine=# select * from contacts limit 1;
 id | first_name | last_name | middle_name | company | phone | email | website | skype_name | birthday | avatar | background | job_title | is_company | author_id | assigned_to_id | created_on | updated_on | cached_tag_list | visibility
----+------------+-----------+-------------+---------+-------+-------+---------+------------+----------+--------+------------+-----------+------------+-----------+----------------+------------+------------+-----------------+------------

Is there a way to say don't index non-core redmine tables etc... ?

@nodecarter
Copy link
Contributor

There is no way to select which types use for searching (yet). I'll try to find a solution tomorrow.

@sammcj
Copy link
Author

sammcj commented Feb 5, 2015

Cool thanks! Really appreciate it - if this works for us we'll be posting a big blog post about it :)

@nodecarter
Copy link
Contributor

Hi @sammcj ,
try the latest version from master branch.

@sammcj
Copy link
Author

sammcj commented Feb 8, 2015

Thanks @nodecarter that seems to have given the errors about the table but not crashed out.

If I change to stock Ruby rather than Rubinius / jRuby (#19) full text searching now works.

@sammcj sammcj closed this as completed Feb 8, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants