jseiser
(Jseiser)
November 20, 2017, 4:02pm
1
This is my first time using ansible. Im trying to configure graylog with an AWS Elasticsearch node.
Here is my playbook.
https://pastebin.com/raw/5yMYfC2Q
The result is that graylog doesnt come up.
TASK [Graylog2.graylog-ansible-role : Wait for Graylog server to startup] *******************************************************************************
fatal: [ec2_justin_graylog_dev]: FAILED! => {"changed": false, "elapsed": 300, "failed": true, "msg": "Timeout when waiting for 127.0.0.1:9000"}
to retry, use: --limit @/home/ubuntu/deployments/graylog.retry
PLAY RECAP **********************************************************************************************************************************************
ec2_justin_graylog_dev : ok=28 changed=2 unreachable=0 failed=1
Looking at the logs, I think its indicating an issue with mongodb.
https://pastebin.com/raw/HyLSSsEk
Any help would be great.
jochen
(Jochen)
November 20, 2017, 4:07pm
2
Correct, MongoDB doesn’t seem to run.
Have you been reading the documentation for the Graylog Ansible role?
Also take a look at these related issues:
opened 11:36AM - 02 Mar 17 UTC
Currently the tests are failing with:
```
TASK [elastic.elasticsearch : set_… fact] ****************************************
fatal: [localhost]: FAILED! => {"failed": true, "msg": "'redhat_elasticsearch_install_from_repo' is undefined"}
```
I think this is because of the Ansible version we use for running the tests. Elasticsearch needs Ansible version >= 2.2.0 and the test suite uses 2.1.
For updating the test suite to 2.2 we need a MongoDB role that is compatible with it.
https://github.com/lesmyrmidons/ansible-role-mongodb unfortunately doesn't work. Since a fix is on master but never pushed to Galaxy I consider that role as unmaintained.
So to get out of this we need a maintained MongoDB role that supports Ansible 2.2 as well as Debian/Ubuntu platform and RedHat/Centos.
opened 08:07AM - 08 Mar 17 UTC
closed 05:35PM - 28 Jul 20 UTC
Hi I have followed the steps, everything is downloaded in roles, but while runni… ng on vagrant there is dependecy related issue. Do I need to manually install the dependecy first and then run the playbook?
Please refer the error output below:
```
[vagrant@localhost testGraylog_role]$ ansible-playbook your_playbook.yml -i "127.0.0.1:22,"
PLAY [all] *********************************************************************
TASK [setup] *******************************************************************
ok: [127.0.0.1]
TASK [lesmyrmidons.mongodb : Include OS-specific variables.] *******************
ok: [127.0.0.1]
TASK [lesmyrmidons.mongodb : RedHat Install dependencies packages] *************
failed: [127.0.0.1] (item=[u'mongodb_packages_dependencies']) => {"changed": false, "failed": true, "item": ["mongodb_packages_dependencies"], "msg": "No package matching 'mongodb_packages_dependencies' found available, installed or updated", "rc": 126, "results": ["No package matching 'mongodb_packages_dependencies' found available, installed or updated"]}
to retry, use: --limit @/home/vagrant/testGraylog_role/your_playbook.retry
PLAY RECAP *********************************************************************
127.0.0.1 : ok=2 changed=0 unreachable=0 failed=1
===============================================================
Detailed issue summary:
TASK [lesmyrmidons.mongodb : RedHat | Install dependencies packages] ***********
task path: /home/vagrant/testGraylog_role/roles/lesmyrmidons.mongodb/tasks/setup-RedHat.yml:3
Using module file /usr/lib/python2.7/site-packages/ansible/modules/core/packaging/os/yum.py
<127.0.0.1> ESTABLISH SSH CONNECTION FOR USER: vagrant
<127.0.0.1> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=vagrant -o ConnectTimeout=10 -o ControlPath=/home/vagrant/.ansible/cp/ansible-ssh-%h-%p-%r 127.0.0.1 '/bin/sh -c '"'"'( umask 77 && mkdir -p "` echo ~/.ansible/tmp/ansible-tmp-1488959605.12-14485318799892 `" && echo ansible-tmp-1488959605.12-14485318799892="` echo ~/.ansible/tmp/ansible-tmp-1488959605.12-14485318799892 `" ) && sleep 0'"'"''
<127.0.0.1> PUT /tmp/tmpUlJk_e TO /home/vagrant/.ansible/tmp/ansible-tmp-1488959605.12-14485318799892/yum.py
<127.0.0.1> SSH: EXEC sftp -b - -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=vagrant -o ConnectTimeout=10 -o ControlPath=/home/vagrant/.ansible/cp/ansible-ssh-%h-%p-%r '[127.0.0.1]'
<127.0.0.1> ESTABLISH SSH CONNECTION FOR USER: vagrant
<127.0.0.1> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=vagrant -o ConnectTimeout=10 -o ControlPath=/home/vagrant/.ansible/cp/ansible-ssh-%h-%p-%r 127.0.0.1 '/bin/sh -c '"'"'chmod u+x /home/vagrant/.ansible/tmp/ansible-tmp-1488959605.12-14485318799892/ /home/vagrant/.ansible/tmp/ansible-tmp-1488959605.12-14485318799892/yum.py && sleep 0'"'"''
<127.0.0.1> ESTABLISH SSH CONNECTION FOR USER: vagrant
<127.0.0.1> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=vagrant -o ConnectTimeout=10 -o ControlPath=/home/vagrant/.ansible/cp/ansible-ssh-%h-%p-%r -tt 127.0.0.1 '/bin/sh -c '"'"'sudo -H -S -n -u root /bin/sh -c '"'"'"'"'"'"'"'"'echo BECOME-SUCCESS-pzcgadtwszahupzxbcakaoixfvitdbai; /usr/bin/python /home/vagrant/.ansible/tmp/ansible-tmp-1488959605.12-14485318799892/yum.py; rm -rf "/home/vagrant/.ansible/tmp/ansible-tmp-1488959605.12-14485318799892/" > /dev/null 2>&1'"'"'"'"'"'"'"'"' && sleep 0'"'"''
failed: [127.0.0.1] (item=[u'mongodb_packages_dependencies']) => {
"changed": false,
"failed": true,
"invocation": {
"module_args": {
"conf_file": null,
"disable_gpg_check": false,
"disablerepo": null,
"enablerepo": null,
"exclude": null,
"install_repoquery": true,
"list": null,
"name": [
"mongodb_packages_dependencies"
],
"state": "installed",
"update_cache": false,
"validate_certs": true
},
"module_name": "yum"
},
"item": [
"mongodb_packages_dependencies"
],
"msg": "No package matching 'mongodb_packages_dependencies' found available, installed or updated",
"rc": 126,
"results": [
"No package matching 'mongodb_packages_dependencies' found available, installed or updated"
]
}
```
jseiser
(Jseiser)
November 20, 2017, 4:10pm
3
I have been reading them, thats how I got the variables etc to be in the playbook.
I believe this should be what I need to get mongodb installed.
graylog_install_mongodb: True
If you are implying im missing something obvious, awesome, can you help me know what that is?
Thanks,
jochen
(Jochen)
November 20, 2017, 4:39pm
4
What was the full output when you ran the playbook?
jseiser
(Jseiser)
November 20, 2017, 4:50pm
5
jseiser
(Jseiser)
November 20, 2017, 6:31pm
6
I modified the playbook from
graylog_install_mongodb: False
to
graylog_install_mongodb: True
and I actually see things mongodb related, but it fails to start, and the log file is empty.
jochen
(Jochen)
November 20, 2017, 6:56pm
7
Care to share some details?
jseiser
(Jseiser)
November 20, 2017, 8:50pm
8
OK, got it sorted out.
I had to install the mongodb repo from galaxy, then enable install mongodb in the playbook. I killed the instance I was working with and brought up a new one and that one installed without issue. So I think I attempted so many things I ruined the first instance.
system
(system)
Closed
December 4, 2017, 8:50pm
9
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.