lusis / chef-logstash

Semi-official Logstash cookbook
Other
271 stars 353 forks source link

Problem in Amazon OpsWorks with Ubuntu 16.04 #457

Open jsyrjala opened 8 years ago

jsyrjala commented 8 years ago

When I try to install apache2 after installing logstash in Amazon OpsWorks with Ubuntu 16.04 the apache installation fails with following error.

There is no problem when I use Amazon OpsWorks with Ubuntu 14.04. So is there something fishy in startup script for logstash_agent?

monit seems to be basic functionality in OpsWorks version of Ubuntu 16.04.

insserv: warning: script 'logstash_agent' missing LSB tags and overrides
insserv: There is a loop between service monit and logstash_agent if stopped
insserv:  loop involving service logstash_agent at depth 2
insserv:  loop involving service monit at depth 1
insserv: Stopping logstash_agent depends on monit and therefore on system facility `$all' which can not be true!
insserv: exiting now without changing boot order!
update-rc.d: error: insserv rejected the script header
dpkg: error processing package apache2 (--configure):
 subprocess installed post-installation script returned error exit status 1
jsyrjala commented 8 years ago

I believe the problem is that starting from Ubuntu 16.04 systemd is used and chef-logstash creates upstart scripts.

https://github.com/lusis/chef-logstash/blob/4ccb3930b85bc704c2e365f34ec60ad9b5fb041e/libraries/logstash_util.rb#L39

    when 'ubuntu'
      if platform_major_version >= 6.10
        'upstart'
      else
        'sysvinit'
      end