在使用Amazon EC2奋斗了36个小时之后,我坚持了以下内容。
当Rubber到达运行deploy-graylog.rb时,出现以下错误:
这是执行的最后一部分的日志:
** [out :: production.foo.com.au] graylog-web start/running, process 12772
command finished in 750ms
triggering after callbacks for `rubber:graylog:web:bootstrap'
* 2014-02-21 22:01:24 executing `rubber:graylog:web:create_inputs'
servers: ["production.foo.com.au"]
** sftp upload #<StringIO:0x007fb47410aec0> -> /tmp/create_inputs
[production.foo.com.au] /tmp/create_inputs
[production.foo.com.au] done
* sftp upload complete
* executing "sudo -p 'sudo password: ' bash -l /tmp/create_inputs"
servers: ["production.foo.com.au"]
[production.foo.com.au] executing command
** [out :: production.foo.com.au] curl: (7) Failed connect to localhost:12900; Connection refused
command finished in 725ms
failed: "/bin/bash -l -c 'sudo -p '\\''sudo password: '\\'' bash -l /tmp/create_inputs'" on production.foo.com
当我SSH到服务器并直接运行此
bash -l /tmp/create_inputs
时,出现相同的错误我甚至需要Graylog吗?如果没有,如何禁用它?
服务器是Ubuntu,m1.small
Ruby 2.0.0-p353
Rails 4.0.2
这是/ etc / hosts
127.0.0.1 localhost
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
## rubber config production
10.248.163.48 production.foo.com.au production ec2-54-206-206-214.ap-southeast-2.compute.amazonaws.com ip-10-248-163-48.ap-southeast-2.compute.internal elasticsearch-production.foo.com.au graphite-production.foo.com.au graylog-production.foo.com.au
## rubber config production
这是/ tmp / create_inputs中的内容
function error_exit { exit 99; }; trap error_exit ERR
curl --user admin:admin1 -XPOST http://localhost:12900/system/inputs -H "Content-Type: application/json" -d '{"type": "org.graylog2.inputs.gelf.udp.GELFUDPInput", "creator_user_id": "admin", "title": "gelf-udp", "global": true, "configuration": { "port": 12201, "bind_address": "0.0.0.0" } }'
curl --user admin:admin1 -XPOST http://localhost:12900/system/inputs -H "Content-Type: application/json" -d '{"type": "org.graylog2.inputs.syslog.udp.SyslogUDPInput", "creator_user_id": "admin", "title": "syslog-udp", "global": true, "configuration": { "port": 12514, "bind_address": "0.0.0.0" } }'
提前谢谢大家
最佳答案
上面建议的相同操作可以通过这种方式完成。我相信这将是更好的方法。使用cap rubber:remove_role
命令https://github.com/rubber/rubber/wiki/Commands。
1)cap rubber:remove_role
-提示您输入实例名称,例如“ production”
2)然后它要求您提供角色---删除不需要的角色。您可以在上面的日志中检查它们。易于复制和粘贴
希望能帮助到你!我坚持了将近三天,希望能看到我的网站直播:(可以肯定地写我的经历。