huginn: Export the init scripts Error .'sv stop huginn-web-1' exited with a non-zero return value: warning: huginn-web-1: unable to open supervise/ok: file does not exist

Hello I am reading the installation.md The step of “Export the init scripts” had some trouble sudo bundle exec rake production:export

root@localhost:/home/huginn/huginn# sudo bundle exec rake production:export --trace
** Invoke production:export (first_time)
** Invoke production:check (first_time)
** Execute production:check
** Execute production:export
** Execute production:stop
Stopping huginn ...
rake aborted!
'sv stop huginn-web-1' exited with a non-zero return value: warning: huginn-web-1: unable to open supervise/ok: file does not exist
/home/huginn/huginn/lib/tasks/production.rake:85:in `run'
/home/huginn/huginn/lib/tasks/production.rake:77:in `block (2 levels) in run_sv'
/home/huginn/huginn/lib/tasks/production.rake:93:in `call'
/home/huginn/huginn/lib/tasks/production.rake:93:in `with_retries'
/home/huginn/huginn/lib/tasks/production.rake:76:in `block in run_sv'
/home/huginn/huginn/lib/tasks/production.rake:75:in `each'
/home/huginn/huginn/lib/tasks/production.rake:75:in `run_sv'
/home/huginn/huginn/lib/tasks/production.rake:33:in `block (2 levels) in <top (required)>'
/home/huginn/huginn/vendor/bundle/ruby/2.2.0/gems/rake-10.5.0/lib/rake/task.rb:240:in `call'
/home/huginn/huginn/vendor/bundle/ruby/2.2.0/gems/rake-10.5.0/lib/rake/task.rb:240:in `block in execute'
/home/huginn/huginn/vendor/bundle/ruby/2.2.0/gems/rake-10.5.0/lib/rake/task.rb:235:in `each'
/home/huginn/huginn/vendor/bundle/ruby/2.2.0/gems/rake-10.5.0/lib/rake/task.rb:235:in `execute'
/home/huginn/huginn/lib/tasks/production.rake:57:in `block (2 levels) in <top (required)>'
/home/huginn/huginn/vendor/bundle/ruby/2.2.0/gems/rake-10.5.0/lib/rake/task.rb:240:in `call'
/home/huginn/huginn/vendor/bundle/ruby/2.2.0/gems/rake-10.5.0/lib/rake/task.rb:240:in `block in execute'
/home/huginn/huginn/vendor/bundle/ruby/2.2.0/gems/rake-10.5.0/lib/rake/task.rb:235:in `each'
/home/huginn/huginn/vendor/bundle/ruby/2.2.0/gems/rake-10.5.0/lib/rake/task.rb:235:in `execute'
/home/huginn/huginn/vendor/bundle/ruby/2.2.0/gems/rake-10.5.0/lib/rake/task.rb:179:in `block in invoke_with_call_chain'
/usr/local/lib/ruby/2.2.0/monitor.rb:211:in `mon_synchronize'
/home/huginn/huginn/vendor/bundle/ruby/2.2.0/gems/rake-10.5.0/lib/rake/task.rb:172:in `invoke_with_call_chain'
/home/huginn/huginn/vendor/bundle/ruby/2.2.0/gems/rake-10.5.0/lib/rake/task.rb:165:in `invoke'
/home/huginn/huginn/vendor/bundle/ruby/2.2.0/gems/rake-10.5.0/lib/rake/application.rb:150:in `invoke_task'
/home/huginn/huginn/vendor/bundle/ruby/2.2.0/gems/rake-10.5.0/lib/rake/application.rb:106:in `block (2 levels) in top_level'
/home/huginn/huginn/vendor/bundle/ruby/2.2.0/gems/rake-10.5.0/lib/rake/application.rb:106:in `each'
/home/huginn/huginn/vendor/bundle/ruby/2.2.0/gems/rake-10.5.0/lib/rake/application.rb:106:in `block in top_level'
/home/huginn/huginn/vendor/bundle/ruby/2.2.0/gems/rake-10.5.0/lib/rake/application.rb:115:in `run_with_threads'
/home/huginn/huginn/vendor/bundle/ruby/2.2.0/gems/rake-10.5.0/lib/rake/application.rb:100:in `top_level'
/home/huginn/huginn/vendor/bundle/ruby/2.2.0/gems/rake-10.5.0/lib/rake/application.rb:78:in `block in run'
/home/huginn/huginn/vendor/bundle/ruby/2.2.0/gems/rake-10.5.0/lib/rake/application.rb:176:in `standard_exception_handling'
/home/huginn/huginn/vendor/bundle/ruby/2.2.0/gems/rake-10.5.0/lib/rake/application.rb:75:in `run'
/home/huginn/huginn/vendor/bundle/ruby/2.2.0/gems/rake-10.5.0/bin/rake:33:in `<top (required)>'
/home/huginn/huginn/vendor/bundle/ruby/2.2.0/bin/rake:23:in `load'
/home/huginn/huginn/vendor/bundle/ruby/2.2.0/bin/rake:23:in `<main>'
Tasks: TOP => production:export
root@localhost:/home/huginn/huginn#

thank you!

About this issue

  • Original URL
  • State: open
  • Created 8 years ago
  • Comments: 21 (2 by maintainers)

Most upvoted comments

This worked for me on Ubuntu 18.04: sudo apt-get install runit-systemd runit-helper sudo systemctl enable runit sudo systemctl status runit

It just solved the problem.

@ledoarea The problem seems to have been that runit was not started after you installed it. I have no idea why that happened in all my test installations on debian the runsvdir was started automatically. I ran /usr/sbin/runsvdir-start & manually and then sudo bundle exec rake production:export worked. You can continue with the next step of the installation which would be setting up logrotate. Your server only has 256MB of RAM, which can become an issue. We recommend at least 512MB of RAM + the same amount of swap

@alxcord I have no experience with FreeBSD, could it be the same problem that runit did not start automatically? Maybe @knu can help.

I have same problem in freebsd 9, after canceling in the same step and try it again, “Export the init scripts”:

[huginn@huginn ~/projects/huginn]$ sudo bundle exec rake production:export
Stopping huginn ...
Exporting new services ...
^Crake aborted!
Interrupt:
/home/huginn/projects/huginn/lib/tasks/production.rake:69:in `sleep'
/home/huginn/projects/huginn/lib/tasks/production.rake:69:in `block (2 levels) i                                                                                        n <top (required)>'
Tasks: TOP => production:export
(See full trace by running task with --trace)

In the next try I got an similar error

^Crake aborted!
Interrupt:
/home/huginn/projects/huginn/vendor/bundle/ruby/2.1/gems/activesupport-4.2.5.2/l                                                                                        ib/active_support/logger.rb:2:in `require'
/home/huginn/projects/huginn/vendor/bundle/ruby/2.1/gems/activesupport-4.2.5.2/l                                                                                        ib/active_support/logger.rb:2:in `<top (required)>'
/home/huginn/projects/huginn/vendor/bundle/ruby/2.1/gems/activesupport-4.2.5.2/l                                                                                        ib/active_support.rb:27:in `require'
/home/huginn/projects/huginn/vendor/bundle/ruby/2.1/gems/activesupport-4.2.5.2/l                                                                                        ib/active_support.rb:27:in `<top (required)>'
/home/huginn/projects/huginn/vendor/bundle/ruby/2.1/gems/railties-4.2.5.2/lib/ra                                                                                        ils.rb:5:in `require'
/home/huginn/projects/huginn/vendor/bundle/ruby/2.1/gems/railties-4.2.5.2/lib/ra                                                                                        ils.rb:5:in `<top (required)>'
/home/huginn/projects/huginn/vendor/bundle/ruby/2.1/gems/railties-4.2.5.2/lib/ra                                                                                        ils/all.rb:1:in `require'
/home/huginn/projects/huginn/vendor/bundle/ruby/2.1/gems/railties-4.2.5.2/lib/ra                                                                                        ils/all.rb:1:in `<top (required)>'
/home/huginn/projects/huginn/config/application.rb:3:in `require'
/home/huginn/projects/huginn/config/application.rb:3:in `<top (required)>'
/home/huginn/projects/huginn/Rakefile:5:in `require'
/home/huginn/projects/huginn/Rakefile:5:in `<top (required)>'
(See full trace by running task with --trace)
[huginn@huginn ~/projects/huginn]$  sudo bundle exec rake production:export
Stopping huginn ...
rake aborted!
'sv stop huginn-web-1' exited with a non-zero return value: fail: huginn-web-1:                                                                                         unable to change to service directory: file does not exist
/home/huginn/projects/huginn/lib/tasks/production.rake:85:in `run'
/home/huginn/projects/huginn/lib/tasks/production.rake:77:in `block (2 levels) i                                                                                        n run_sv'
/home/huginn/projects/huginn/lib/tasks/production.rake:93:in `call'
/home/huginn/projects/huginn/lib/tasks/production.rake:93:in `with_retries'
/home/huginn/projects/huginn/lib/tasks/production.rake:76:in `block in run_sv'
/home/huginn/projects/huginn/lib/tasks/production.rake:75:in `each'
/home/huginn/projects/huginn/lib/tasks/production.rake:75:in `run_sv'
/home/huginn/projects/huginn/lib/tasks/production.rake:33:in `block (2 levels) i                                                                                        n <top (required)>'
/home/huginn/projects/huginn/lib/tasks/production.rake:57:in `block (2 levels) i                                                                                        n <top (required)>'
Tasks: TOP => production:export
(See full trace by running task with --trace)

I managed to stoped receiving the error after deleting (actially i moved to an tmp dir) the directores above /etc/service. there are two folders one of them was huginn-web-1. I couldn’t generate this yet, it’s still freezing. I’m still trying to discover why, any help would be apreciate.


[huginn@huginn ~/projects/huginn]$ ls /etc/service
huginn-jobs-1   huginn-web-1

[huginn@huginn ~/projects/huginn]$ sudo rm -rf/etc/service/*`