1/ 我发现了美妙的 graylog2,我设法在运行 Ubuntu 14.04 的 VM 上运行它
. 我想将其更新为 graylog 1.1.3,但我不知道如何。我的来源是这个网址:https ://www.digitalocean.com/community/tutorials/how-to-install-graylog2-and-centralize-logs-on-ubuntu-14-04
2/ 我试图通过安装在 Vmware Workstation 中打开的官方 VM graylog_ova 来解决这个问题。在那里,我开始更新 /opt/graylog/conf 中的 conf 文件...现在执行 graylog-ctl reconfigure 时出现错误。
亲爱的朋友们,你们有什么好主意吗?
================================================================================
Recipe Compile Error in /opt/graylog/embedded/cookbooks/graylog/recipes/default.rb
================================================================================
Chef::Exceptions::JSON::ParseError
----------------------------------
parse error: after key and value, inside map, I expect ',' or '}'
t_address": "192.168.0.4" "last_address": "192.168.0.4",
(right here) ------^
Cookbook Trace:
---------------
/opt/graylog/embedded/cookbooks/graylog/libraries/graylog.rb:136:in `generate_settings'
/opt/graylog/embedded/cookbooks/graylog/libraries/graylog.rb:228: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:
129: def enabled?(service)
130: Graylog[service.gsub('-', '_')]['enabled']
131: end
132:
133: def generate_settings
134: existing_settings ||= Hash.new
135: if File.exists?("/etc/graylog/graylog-settings.json")
136>> existing_settings = Chef::JSONCompat.from_json(File.read("/etc/graylog/graylog-settings.json"))
137: end
138: existing_settings.each do |k, v|
139: Graylog[k] = v
140: end
141:
142: Graylog['timezone'] = Graylog[:node]['graylog']['timezone'] if Graylog['timezone'].empty?
143: Graylog['smtp_server'] = Graylog[:node]['graylog']['smtp_server'] if Graylog['smtp_server'].nil?
144: Graylog['smtp_port'] = Graylog[:node]['graylog']['smtp_port'] if Graylog['smtp_port'].nil?
145: Graylog['smtp_user'] = Graylog[:node]['graylog']['smtp_user'] if Graylog['smtp_user'].nil?
Running handlers:
[2015-06-29T15:27:39+02:00] ERROR: Running exception handlers
Running handlers complete
[2015-06-29T15:27:39+02:00] ERROR: Exception handlers complete
[2015-06-29T15:27:39+02:00] FATAL: Stacktrace dumped to /opt/graylog/embedded/cookbooks/cache/chef-stacktrace.out
Chef Client failed. 0 resources updated in 1.958758246 seconds
[2015-06-29T15:27:39+02:00] ERROR: parse error: after key and value, inside map, I expect ',' or '}'
t_address": "192.168.0.4" "last_address": "192.168.0.4",
(right here) ------^
[2015-06-29T15:27:39+02:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
等
Generated at 2015-06-29 15:25:34 +0200
Chef::Exceptions::JSON::ParseError: parse error: after key and value, inside map, I expect ',' or '}'
t_address": "192.168.0.4" "last_address": "192.168.0.4",
(right here) ------^
/opt/graylog/embedded/lib/ruby/gems/2.1.0/gems/chef-12.2.1/lib/chef/json_compat.rb:52:in `rescue in parse'
/opt/graylog/embedded/lib/ruby/gems/2.1.0/gems/chef-12.2.1/lib/chef/json_compat.rb:49:in `parse'
/opt/graylog/embedded/lib/ruby/gems/2.1.0/gems/chef-12.2.1/lib/chef/json_compat.rb:58:in `from_json'
/opt/graylog/embedded/cookbooks/graylog/libraries/graylog.rb:136:in `generate_settings'
/opt/graylog/embedded/cookbooks/graylog/libraries/graylog.rb:228:in `generate_config'
/opt/graylog/embedded/cookbooks/graylog/recipes/default.rb:13:in `from_file'
/opt/graylog/embedded/lib/ruby/gems/2.1.0/gems/chef-12.2.1/lib/chef/mixin/from_file.rb:30:in `instance_eval'
/opt/graylog/embedded/lib/ruby/gems/2.1.0/gems/chef-12.2.1/lib/chef/mixin/from_file.rb:30:in `from_file'
/opt/graylog/embedded/lib/ruby/gems/2.1.0/gems/chef-12.2.1/lib/chef/cookbook_version.rb:228:in `load_recipe'
/opt/graylog/embedded/lib/ruby/gems/2.1.0/gems/chef-12.2.1/lib/chef/run_context.rb:173:in `load_recipe'
/opt/graylog/embedded/lib/ruby/gems/2.1.0/gems/chef-12.2.1/lib/chef/run_context/cookbook_compiler.rb:140:in `block in compile_recipes'
/opt/graylog/embedded/lib/ruby/gems/2.1.0/gems/chef-12.2.1/lib/chef/run_context/cookbook_compiler.rb:138:in `each'
/opt/graylog/embedded/lib/ruby/gems/2.1.0/gems/chef-12.2.1/lib/chef/run_context/cookbook_compiler.rb:138:in `compile_recipes'
/opt/graylog/embedded/lib/ruby/gems/2.1.0/gems/chef-12.2.1/lib/chef/run_context/cookbook_compiler.rb:75:in `compile'
/opt/graylog/embedded/lib/ruby/gems/2.1.0/gems/chef-12.2.1/lib/chef/run_context.rb:96:in `load'
/opt/graylog/embedded/lib/ruby/gems/2.1.0/gems/chef-12.2.1/lib/chef/policy_builder/expand_node_object.rb:73:in `setup_run_context'
/opt/graylog/embedded/lib/ruby/gems/2.1.0/gems/chef-12.2.1/lib/chef/client.rb:249:in `setup_run_context'
/opt/graylog/embedded/lib/ruby/gems/2.1.0/gems/chef-12.2.1/lib/chef/client.rb:446:in `run'
/opt/graylog/embedded/lib/ruby/gems/2.1.0/gems/chef-12.2.1/lib/chef/application.rb:271:in `block in fork_chef_client'
/opt/graylog/embedded/lib/ruby/gems/2.1.0/gems/chef-12.2.1/lib/chef/application.rb:259:in `fork'
/opt/graylog/embedded/lib/ruby/gems/2.1.0/gems/chef-12.2.1/lib/chef/application.rb:259:in `fork_chef_client'
/opt/graylog/embedded/lib/ruby/gems/2.1.0/gems/chef-12.2.1/lib/chef/application.rb:225:in `block in run_chef_client'
/opt/graylog/embedded/lib/ruby/gems/2.1.0/gems/chef-12.2.1/lib/chef/local_mode.rb:38:in `with_server_connectivity'
/opt/graylog/embedded/lib/ruby/gems/2.1.0/gems/chef-12.2.1/lib/chef/application.rb:213:in `run_chef_client'
/opt/graylog/embedded/lib/ruby/gems/2.1.0/gems/chef-12.2.1/lib/chef/application/solo.rb:275:in `block in interval_run_chef_client'
/opt/graylog/embedded/lib/ruby/gems/2.1.0/gems/chef-12.2.1/lib/chef/application/solo.rb:264:in `loop'
/opt/graylog/embedded/lib/ruby/gems/2.1.0/gems/chef-12.2.1/lib/chef/application/solo.rb:264:in `interval_run_chef_client'
/opt/graylog/embedded/lib/ruby/gems/2.1.0/gems/chef-12.2.1/lib/chef/application/solo.rb:242:in `run_application'
/opt/graylog/embedded/lib/ruby/gems/2.1.0/gems/chef-12.2.1/lib/chef/application.rb:60:in `run'
/opt/graylog/embedded/lib/ruby/gems/2.1.0/gems/chef-12.2.1/bin/chef-solo:25:in `<top (required)>'
/opt/graylog/embedded/bin/chef-solo:23:in `load'
/opt/graylog/embedded/bin/chef-solo:23:in `<main>'