root@graylog:/opt/graylog/embedded/bin# graylog-ctl reconfigure
Starting Chef Client, version 12.6.0
Compiling Cookbooks...
Recipe: graylog::default
* directory[/etc/graylog] action create (up to date)
================================================================================
Recipe Compile Error in
/opt/graylog/embedded/cookbooks/graylog/recipes/default.rb
================================================================================
NoMethodError
-------------
undefined method `[]=' for nil:NilClass
Cookbook Trace:
---------------
/opt/graylog/embedded/cookbooks/graylog/libraries/graylog.rb:82:in
`block (2 levels) in generate_services'
/opt/graylog/embedded/cookbooks/graylog/libraries/graylog.rb:81:in
`each'
/opt/graylog/embedded/cookbooks/graylog/libraries/graylog.rb:81:in
`block in generate_services'
/opt/graylog/embedded/cookbooks/graylog/libraries/graylog.rb:80:in
`each'
/opt/graylog/embedded/cookbooks/graylog/libraries/graylog.rb:80:in
`generate_services'
/opt/graylog/embedded/cookbooks/graylog/libraries/graylog.rb:223:in
`generate_config'
/opt/graylog/embedded/cookbooks/graylog/recipes/default.rb:13:in
`from_file'
Relevant File Content:
----------------------
/opt/graylog/embedded/cookbooks/graylog/libraries/graylog.rb:
75: def generate_services
76: existing_services ||= Hash.new
77: if File.exists?("/etc/graylog/graylog-services.json")
78: existing_services =
Chef::JSONCompat.from_json(File.read("/etc/graylog/graylog-services.json"))
79: end
80: existing_services.each do |k, v|
81: v.each do |pk, p|
82>> Graylog[k][pk] = p
83: end
84: end
85:
86: Graylog['etcd']['enabled'] =
Graylog[:node]['graylog']['etcd']['enable'] if
Graylog['etcd']['enabled'].nil?
87: Graylog['nginx']['enabled'] =
Graylog[:node]['graylog']['nginx']['enable'] if
Graylog['nginx']['enabled'].nil?
88: Graylog['mongodb']['enabled'] =
Graylog[:node]['graylog']['mongodb']['enable'] if
Graylog['mongodb']['enabled'].nil?
89: Graylog['elasticsearch']['enabled'] =
Graylog[:node]['graylog']['elasticsearch']['enable'] if
Graylog['elasticsearch']['enabled'].nil?
90: Graylog['graylog_server']['enabled'] =
Graylog[:node]['graylog']['graylog-server']['enable'] if
Graylog['graylog_server']['enabled'].nil?
91:
Running handlers:
[2016-05-13T16:16:33+00:00] ERROR: Running exception handlers
Running handlers complete
[2016-05-13T16:16:33+00:00] ERROR: Exception handlers complete
Chef Client failed. 0 resources updated in 00 seconds
[2016-05-13T16:16:33+00:00] FATAL: Stacktrace dumped to
/opt/graylog/embedded/cookbooks/cache/chef-stacktrace.out
[2016-05-13T16:16:33+00:00] FATAL: Please provide the contents of the
stacktrace.out file if you file a bug report
[2016-05-13T16:16:33+00:00] ERROR: undefined method `[]=' for nil:NilClass
[2016-05-13T16:16:33+00:00] FATAL: Chef::Exceptions::ChildConvergeError:
Chef run process exited unsuccessfully (exit code 1)
On Thursday, May 12, 2016 at 1:53:49 PM UTC+5:30, Utkarsh Sharma wrote:
>
> Hi team,
>
> I am trying to upgrade graylog from 1.3 to 2.0 version
> but facing some issues Please help me in this
>
> *ERROR*
>
> [2016-05-12T01:16:48-07:00] FATAL: Can not reach master server, make sure
> 127.0.0.1 is reachable and 'etcd' service is running properly.
>
>
>
> ================================================================================
>
> Recipe Compile Error in
> /opt/graylog/embedded/cookbooks/graylog/recipes/default.rb
>
>
> ================================================================================
>
>
> SystemExit
>
> ----------
>
> exit
>
>
> Cookbook Trace:
>
> ---------------
>
> /opt/graylog/embedded/cookbooks/graylog/libraries/graylog.rb:165:in
> `rescue in generate_settings'
>
> /opt/graylog/embedded/cookbooks/graylog/libraries/graylog.rb:160:in
> `generate_settings'
>
> /opt/graylog/embedded/cookbooks/graylog/libraries/graylog.rb:224:in
> `generate_config'
>
> /opt/graylog/embedded/cookbooks/graylog/recipes/default.rb:13:in
> `from_file'
>
>
> Relevant File Content:
>
> ----------------------
>
> /opt/graylog/embedded/cookbooks/graylog/libraries/graylog.rb:
>
>
> 158: if Graylog['current_address'] != Graylog['last_address']
>
> 159: Chef::Log.warn("IP change detected!")
>
> 160: begin
>
> 161: client = Etcd.client(host: Graylog['master_node'], port:
> 4001)
>
> 162: client.delete("/servers/#{Graylog['last_address']}") if
> client.exists?("/servers/#{Graylog['last_address']}")
>
> 163:
> client.delete("/elasticsearch/#{Graylog['last_address']}") if
> client.exists?("/elasticsearch/#{Graylog['last_address']}")
>
> 164: rescue Exception => e
>
> 165>> Chef::Application.fatal!("Can not reach master server,
> make sure #{Graylog['master_node']} is reachable and 'etcd' service is
> running properly.")
>
> 166: end
>
> 167: Graylog['last_address'] = Graylog['current_address']
>
> 168: end
>
> 169:
>
> 170: if File.directory?("/etc/graylog")
>
> 171: File.open("/etc/graylog/graylog-settings.json", "w") do |f|
>
> 172: f.puts(
>
> 173: Chef::JSONCompat.to_json_pretty({
>
> 174: 'timezone' => Graylog['timezone'],
>
>
>
> Running handlers:
>
> [2016-05-12T01:16:48-07:00] ERROR: Running exception handlers
>
> Running handlers complete
>
> [2016-05-12T01:16:48-07:00] ERROR: Exception handlers complete
>
> Chef Client failed. 0 resources updated in 00 seconds
>
> [2016-05-12T01:16:48-07:00] FATAL: Stacktrace dumped to
> /opt/graylog/embedded/cookbooks/cache/chef-stacktrace.out
>
> [2016-05-12T01:16:48-07:00] FATAL: Please provide the contents of the
> stacktrace.out file if you file a bug report
>
> [2016-05-12T01:16:48-07:00] ERROR: exit
>
> [2016-05-12T01:16:48-07:00] FATAL: Chef::Exceptions::ChildConvergeError:
> Chef run process exited unsuccessfully (exit code 1)
>
>
>
>
>
>
> Thanks in advance
>
>
>
>
--
You received this message because you are subscribed to the Google Groups
"Graylog Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/graylog2/f55efe4c-1623-4958-a35f-eab7700f6a1f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.