Closed mixMugz closed 7 years ago
Попробуйте выставить environment в production.
Перед командой "RAILS_ENV=production", например
RAILS_ENV=production bundle install --without development test
Сделал. Результата не дало. Или мне надо очистить предыдущую установку?
Очищать не надо, надо перед каждой командой добавить RAILS_ENV=production.
redis поставили? sidekiq.yml создали, конфиг отредактировали?
$ gem list | grep redis redis (3.3.3)
$ cat ./config/sidekiq.yml
# Sample configuration file for Sidekiq.
# Place this file at config/sidekiq.yml and Sidekiq will
# pick it up automatically.
---
:pidfile: tmp/pids/sidekiq.pid
:logfile: log/sidekiq.log
:timeout: 30
:queues:
- default
- telegram
Предложенный мной конфиг совсем другого содержания.
Сам redis установили, запустили? redmine_sidekiq его требует.
Предложенный мной конфиг совсем другого содержания. Сам redis установили, запустили? redmine_sidekiq его требует.
Ну и как я уже написал. redis установился в гемах. О запуске и его настройки информации не вижу.
https://github.com/ogom/redmine_sidekiq/blob/master/config/sidekiq.yml.example - как видно из пути, это конфиг внутри плагина redmine_sidekiq. Его дефолтных настроек должно быть достаточно. Нужно установить yum install redis, добавить его в автозагрузку, запустить. sidekiq требует redis.
UPD: в нашем случае было достаточно создать redmine/config/sidekiq.yml со следующим содержанием:
---
:pidfile: tmp/pids/sidekiq.pid
:logfile: log/sidekiq.log
:timeout: 30
:concurrency: 25
:queues:
- default
- telegram
- index_queue
Ага. Спасибо. Сейчас проверю. Для инфо:
yum -y install redis systemctl enable redis systemctl start redis
Так конфиг должен выглядеть?
`--- :pidfile: tmp/pids/sidekiq.pid :logfile: log/sidekiq.log :timeout: 30 :concurrency: 25 :queues:
production: redis: url: redis://localhost:6379/8 namespace: mynamespace`
Да. Пробелы необходимо соблюдать, подсмотреть их можно в примере. "index_queue" - это от плагина https://github.com/centosadmin/redmine_elasticsearch
Отлично. sidekiq запустился. Во всяком случае на вебморде. Конфиг я скопировал из двух ваших конфигов. Пробелы взял оттуда же.
Задачу можно закрыть?
Подождите. Не торопитесь. Я еще не закончил с redmine_intouch. ;)
Да. Пробелы необходимо соблюдать, подсмотреть их можно в примере. "index_queue" - это от плагина https://github.com/centosadmin/redmine_elasticsearch
Уточните, пожалуйста, конфигурационный файл. Там должен быть блок:
production:
redis:
url: redis://localhost:6379/8
namespace: mynamespace
или нет?
Нет.
У нас нет, наш конфиг я показал выше.
Так. Установка успешно завершилась. Буду ковырять дальше. Резюмируя:
yum -y install redis
systemctl enable redis
systemctl start redis
Можно закрыть этот таск
Доброго дня.
Не могу поставить ваше творение на redmine-3.3.3
Дано:
Последовательно пытаюсь ставить так:
$ git clone https://github.com/centosadmin/redmine_telegram_common ./plugins/redmine_telegram_common $ bundle install --without development test
$ git clone https://github.com/ogom/redmine_sidekiq ./plugins/redmine_sidekiq $ bundle install --without development test
bundle exec rake redmine:plugins:migrate RAILS_ENV=production (здесь стоит отметить, что если в database.yml не прописаны DB test, development, то вылетаем на этом этапе с ошибкой)
А вот дальше весело. В меню redmine появляется sidekiq - но попытка тыкнуть выдаёт Internal error. Сам sidekiq не запускается:'
/opt/redmine-3.3.3/app/models/custom_field.rb:18:in '
/opt/redmine-3.3.3/lib/redmine/field_format.rb:50:in '
/opt/redmine-3.3.3/lib/redmine/field_format.rb:20:in '
/home/redmine/.rvm/gems/ruby-2.3.3/bin/ruby_executable_hooks:15:in '`
Access denied for user 'root'@'localhost' (using password: NO) /home/redmine/.rvm/gems/ruby-2.3.3/gems/mysql2-0.3.21/lib/mysql2/client.rb:70:in
connect' /home/redmine/.rvm/gems/ruby-2.3.3/gems/mysql2-0.3.21/lib/mysql2/client.rb:70:ininitialize' /home/redmine/.rvm/gems/ruby-2.3.3/gems/activerecord-4.2.7.1/lib/active_record/connection_adapters/mysql2_adapter.rb:18:in
new' /home/redmine/.rvm/gems/ruby-2.3.3/gems/activerecord-4.2.7.1/lib/active_record/connection_adapters/mysql2_adapter.rb:18:inmysql2_connection' /home/redmine/.rvm/gems/ruby-2.3.3/gems/activerecord-4.2.7.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:438:in
new_connection' /home/redmine/.rvm/gems/ruby-2.3.3/gems/activerecord-4.2.7.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:448:incheckout_new_connection' /home/redmine/.rvm/gems/ruby-2.3.3/gems/activerecord-4.2.7.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:422:in
acquire_connection' /home/redmine/.rvm/gems/ruby-2.3.3/gems/activerecord-4.2.7.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:349:inblock in checkout' /home/redmine/.rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/monitor.rb:214:in
mon_synchronize' /home/redmine/.rvm/gems/ruby-2.3.3/gems/activerecord-4.2.7.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:348:incheckout' /home/redmine/.rvm/gems/ruby-2.3.3/gems/activerecord-4.2.7.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:263:in
block in connection' /home/redmine/.rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/monitor.rb:214:inmon_synchronize' /home/redmine/.rvm/gems/ruby-2.3.3/gems/activerecord-4.2.7.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:262:in
connection' /home/redmine/.rvm/gems/ruby-2.3.3/gems/activerecord-4.2.7.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:571:inretrieve_connection' /home/redmine/.rvm/gems/ruby-2.3.3/gems/activerecord-4.2.7.1/lib/active_record/connection_handling.rb:113:in
retrieve_connection' /home/redmine/.rvm/gems/ruby-2.3.3/gems/activerecord-4.2.7.1/lib/active_record/connection_handling.rb:87:inconnection' /home/redmine/.rvm/gems/ruby-2.3.3/gems/activerecord-4.2.7.1/lib/active_record/model_schema.rb:230:in
table_exists?' /home/redmine/.rvm/gems/ruby-2.3.3/gems/activerecord-4.2.7.1/lib/active_record/attribute_methods/primary_key.rb:97:inget_primary_key' /home/redmine/.rvm/gems/ruby-2.3.3/gems/activerecord-4.2.7.1/lib/active_record/attribute_methods/primary_key.rb:85:in
reset_primary_key' /home/redmine/.rvm/gems/ruby-2.3.3/gems/activerecord-4.2.7.1/lib/active_record/attribute_methods/primary_key.rb:73:inprimary_key' /home/redmine/.rvm/gems/ruby-2.3.3/gems/protected_attributes-1.1.4/lib/active_record/mass_assignment_security/attribute_assignment.rb:15:in
attributes_protected_by_default' /home/redmine/.rvm/gems/ruby-2.3.3/gems/protected_attributes-1.1.4/lib/active_model/mass_assignment_security.rb:337:inblock in protected_attributes_configs' /home/redmine/.rvm/gems/ruby-2.3.3/gems/protected_attributes-1.1.4/lib/active_model/mass_assignment_security.rb:222:in
protected_attributes' /home/redmine/.rvm/gems/ruby-2.3.3/gems/protected_attributes-1.1.4/lib/active_model/mass_assignment_security.rb:126:inblock in attr_protected' /home/redmine/.rvm/gems/ruby-2.3.3/gems/protected_attributes-1.1.4/lib/active_model/mass_assignment_security.rb:125:in
each' /home/redmine/.rvm/gems/ruby-2.3.3/gems/protected_attributes-1.1.4/lib/active_model/mass_assignment_security.rb:125:inattr_protected' /opt/redmine-3.3.3/app/models/custom_field.rb:37:in
<top (required)>' /home/redmine/.rvm/gems/ruby-2.3.3/gems/activesupport-4.2.7.1/lib/active_support/dependencies.rb:457:in
load' /home/redmine/.rvm/gems/ruby-2.3.3/gems/activesupport-4.2.7.1/lib/active_support/dependencies.rb:457:inblock in load_file' /home/redmine/.rvm/gems/ruby-2.3.3/gems/activesupport-4.2.7.1/lib/active_support/dependencies.rb:647:in
new_constants_in' /home/redmine/.rvm/gems/ruby-2.3.3/gems/activesupport-4.2.7.1/lib/active_support/dependencies.rb:456:inload_file' /home/redmine/.rvm/gems/ruby-2.3.3/gems/activesupport-4.2.7.1/lib/active_support/dependencies.rb:354:in
require_or_load' /home/redmine/.rvm/gems/ruby-2.3.3/gems/activesupport-4.2.7.1/lib/active_support/dependencies.rb:494:inload_missing_constant' /home/redmine/.rvm/gems/ruby-2.3.3/gems/activesupport-4.2.7.1/lib/active_support/dependencies.rb:184:in
const_missing' /home/redmine/.rvm/gems/ruby-2.3.3/gems/activesupport-4.2.7.1/lib/active_support/dependencies.rb:526:inload_missing_constant' /home/redmine/.rvm/gems/ruby-2.3.3/gems/activesupport-4.2.7.1/lib/active_support/dependencies.rb:184:in
const_missing' /home/redmine/.rvm/gems/ruby-2.3.3/gems/activesupport-4.2.7.1/lib/active_support/dependencies.rb:526:inload_missing_constant' /home/redmine/.rvm/gems/ruby-2.3.3/gems/activesupport-4.2.7.1/lib/active_support/dependencies.rb:184:in
const_missing' /home/redmine/.rvm/gems/ruby-2.3.3/gems/activesupport-4.2.7.1/lib/active_support/dependencies.rb:526:inload_missing_constant' /home/redmine/.rvm/gems/ruby-2.3.3/gems/activesupport-4.2.7.1/lib/active_support/dependencies.rb:184:in
const_missing' /opt/redmine-3.3.3/lib/redmine/field_format.rb:90:infield_attributes' /opt/redmine-3.3.3/lib/redmine/field_format.rb:93:in
<module:FieldFormat>' /opt/redmine-3.3.3/lib/redmine/field_format.rb:21:in
<top (required)>' /home/redmine/.rvm/gems/ruby-2.3.3/gems/activesupport-4.2.7.1/lib/active_support/dependencies.rb:274:in
require' /home/redmine/.rvm/gems/ruby-2.3.3/gems/activesupport-4.2.7.1/lib/active_support/dependencies.rb:274:inblock in require' /home/redmine/.rvm/gems/ruby-2.3.3/gems/activesupport-4.2.7.1/lib/active_support/dependencies.rb:240:in
load_dependency' /home/redmine/.rvm/gems/ruby-2.3.3/gems/activesupport-4.2.7.1/lib/active_support/dependencies.rb:274:inrequire' /opt/redmine-3.3.3/lib/redmine.rb:40:in
<top (required)>' /home/redmine/.rvm/gems/ruby-2.3.3/gems/activesupport-4.2.7.1/lib/active_support/dependencies.rb:274:inrequire' /home/redmine/.rvm/gems/ruby-2.3.3/gems/activesupport-4.2.7.1/lib/active_support/dependencies.rb:274:in
block in require' /home/redmine/.rvm/gems/ruby-2.3.3/gems/activesupport-4.2.7.1/lib/active_support/dependencies.rb:240:inload_dependency' /home/redmine/.rvm/gems/ruby-2.3.3/gems/activesupport-4.2.7.1/lib/active_support/dependencies.rb:274:in
require' /opt/redmine-3.3.3/config/initializers/30-redmine.rb:6:in<top (required)>' /home/redmine/.rvm/gems/ruby-2.3.3/gems/activesupport-4.2.7.1/lib/active_support/dependencies.rb:268:in
load' /home/redmine/.rvm/gems/ruby-2.3.3/gems/activesupport-4.2.7.1/lib/active_support/dependencies.rb:268:inblock in load' /home/redmine/.rvm/gems/ruby-2.3.3/gems/activesupport-4.2.7.1/lib/active_support/dependencies.rb:240:in
load_dependency' /home/redmine/.rvm/gems/ruby-2.3.3/gems/activesupport-4.2.7.1/lib/active_support/dependencies.rb:268:inload' /home/redmine/.rvm/gems/ruby-2.3.3/gems/railties-4.2.7.1/lib/rails/engine.rb:652:in
block in load_config_initializer' /home/redmine/.rvm/gems/ruby-2.3.3/gems/activesupport-4.2.7.1/lib/active_support/notifications.rb:166:ininstrument' /home/redmine/.rvm/gems/ruby-2.3.3/gems/railties-4.2.7.1/lib/rails/engine.rb:651:in
load_config_initializer' /home/redmine/.rvm/gems/ruby-2.3.3/gems/railties-4.2.7.1/lib/rails/engine.rb:616:inblock (2 levels) in <class:Engine>' /home/redmine/.rvm/gems/ruby-2.3.3/gems/railties-4.2.7.1/lib/rails/engine.rb:615:in
each' /home/redmine/.rvm/gems/ruby-2.3.3/gems/railties-4.2.7.1/lib/rails/engine.rb:615:inblock in <class:Engine>' /home/redmine/.rvm/gems/ruby-2.3.3/gems/railties-4.2.7.1/lib/rails/initializable.rb:30:in
instance_exec' /home/redmine/.rvm/gems/ruby-2.3.3/gems/railties-4.2.7.1/lib/rails/initializable.rb:30:inrun' /home/redmine/.rvm/gems/ruby-2.3.3/gems/railties-4.2.7.1/lib/rails/initializable.rb:55:in
block in run_initializers' /home/redmine/.rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/tsort.rb:228:inblock in tsort_each' /home/redmine/.rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/tsort.rb:350:in
block (2 levels) in each_strongly_connected_component' /home/redmine/.rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/tsort.rb:422:inblock (2 levels) in each_strongly_connected_component_from' /home/redmine/.rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/tsort.rb:431:in
each_strongly_connected_component_from' /home/redmine/.rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/tsort.rb:421:inblock in each_strongly_connected_component_from' /home/redmine/.rvm/gems/ruby-2.3.3/gems/railties-4.2.7.1/lib/rails/initializable.rb:44:in
each' /home/redmine/.rvm/gems/ruby-2.3.3/gems/railties-4.2.7.1/lib/rails/initializable.rb:44:intsort_each_child' /home/redmine/.rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/tsort.rb:415:in
call' /home/redmine/.rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/tsort.rb:415:ineach_strongly_connected_component_from' /home/redmine/.rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/tsort.rb:349:in
block in each_strongly_connected_component' /home/redmine/.rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/tsort.rb:347:ineach' /home/redmine/.rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/tsort.rb:347:in
call' /home/redmine/.rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/tsort.rb:347:ineach_strongly_connected_component' /home/redmine/.rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/tsort.rb:226:in
tsort_each' /home/redmine/.rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/tsort.rb:205:intsort_each' /home/redmine/.rvm/gems/ruby-2.3.3/gems/railties-4.2.7.1/lib/rails/initializable.rb:54:in
run_initializers' /home/redmine/.rvm/gems/ruby-2.3.3/gems/railties-4.2.7.1/lib/rails/application.rb:352:ininitialize!' /opt/redmine-3.3.3/config/environment.rb:14:in
<top (required)>' /home/redmine/.rvm/gems/ruby-2.3.3/gems/sidekiq-4.2.10/lib/sidekiq/cli.rb:244:inrequire' /home/redmine/.rvm/gems/ruby-2.3.3/gems/sidekiq-4.2.10/lib/sidekiq/cli.rb:244:in
boot_system' /home/redmine/.rvm/gems/ruby-2.3.3/gems/sidekiq-4.2.10/lib/sidekiq/cli.rb:50:inrun' /home/redmine/.rvm/gems/ruby-2.3.3/gems/sidekiq-4.2.10/bin/sidekiq:12:in
<top (required)>' /home/redmine/.rvm/gems/ruby-2.3.3/bin/sidekiq:23:inload' /home/redmine/.rvm/gems/ruby-2.3.3/bin/sidekiq:23:in
eval' /home/redmine/.rvm/gems/ruby-2.3.3/bin/ruby_executable_hooks:15:in
И вот тут что делать я слабо понимаю. По идее ругань идёт из-за того что нет BD test, dev. Но они мне точно не нужны. Создавать БД? Или что? Куда копать то дальше?