internet-pi
internet-pi copied to clipboard
Encountered Error - New to Ansible - Not sure what to look for to correct ?!?
Here is a copy of the output I'm getting where the error occurs.
TASK [Copy templated internet-monitoring files into place.] ************************************************************************ ok: [x.x.x.x] => (item={'src': 'grafana-config.monitoring.j2', 'dest': 'grafana/config.monitoring'}) changed: [x.x.x.x] => (item={'src': 'prometheus.yml.j2', 'dest': 'prometheus/prometheus.yml'}) ok: [x.x.x.x] => (item={'src': 'prometheus-pinghosts.yaml.j2', 'dest': 'prometheus/pinghosts.yaml'})
TASK [Ensure internet-monitoring environment is running.] ************************************************************************** fatal: [x.x.x.x]: FAILED! => {"changed": false, "msg": "Error connecting: Error while fetching server API version: ('Connection aborted.', PermissionError(13, 'Permission denied'))"}
RUNNING HANDLER [Restart internet-monitoring] **************************************************************************************
PLAY RECAP ************************************************************************************************************************* x.x.x.x : ok=11 changed=2 unreachable=0 failed=1 skipped=8 rescued=0 ignored=0
I surprised myself in getting this far on what was basically my first attempt to run an actual play book using Ansible beyond reading about it. Any clues / hints on how I should proceed would be much appreciated :)
@BEMORLDEV, I was running into this problem too. I found the same error in Issue #324, where it was suggested to reboot the Pi. I did so and got past this error. If you haven't already, I'd recommend that you try rebooting too.
If you still run into issues, try adding the following line to ~/internet-pi/ansible.cfg
log_path = ./ansible.log
That should create a new at ~/internet-pi/ansible.log
- it's just a persistent log for console output. Next, run ansible-playbook main.yml -vvv
. The -vvv
will give more verbose output. And since it's writing to a log, it should make reviewing any more failures a little easier.
Hope this helps! Good luck!
Im receiving the same message and when running docker-compose up in the internet monitoring folder i get: ERROR: Couldn't find env file: /home/eclipse/internet-pi/internet-monitoring/grafana/config.monitoring
Hi @EclipseOfficeTech,
have you checked the closed issues that have the same problem? https://github.com/geerlingguy/internet-pi/issues?q=is%3Aissue+is%3Aclosed+Error+while+fetching+server+API+version
I think in most cases the user specified in inventory.ini was not part of the docker group. That's why usually a reboot is recommended as the user was just added to the group and this still needs to be recognised by the system.
This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!
Please read this blog post to see the reasons why I mark issues as stale.
I'm still seeing this error whenever I try to run the ansible script. I've double checked and the pi user is part of the docker group. The only other thing that might be different for me is that I had to install docker-compose via Apt instead of Pip to get around the error described in https://github.com/geerlingguy/internet-pi/issues/445
Update, I may have solved my problem. I was running the command as a user other than pi, so once I added that other user to docker group it worked.
This issue is no longer marked for closure.
This is a docker permission issue. I followed this script to fix: https://stackoverflow.com/questions/64662372/docker-compose-up-error-while-fetching-server-api-version-connection-aborte
sudo gpasswd -a $USER docker
newgrp docker
This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!
Please read this blog post to see the reasons why I mark issues as stale.
This issue has been closed due to inactivity. If you feel this is in error, please reopen the issue or file a new issue with the relevant details.