threatstack / threatstack-ansible

Ansible for installing Threatstack Agent
https://www.threatstack.com
MIT License
23 stars 17 forks source link

Unable to open agent database. Please stop any running tsagentd processes and try again #77

Closed jrobison-sb closed 3 years ago

jrobison-sb commented 3 years ago

We're running this Ansible role like this:

- name: include threatstack role
  include_role:
    name: threatstack.threatstack-ansible
  vars:
    threatstack_deploy_key: "{{ threatstack_api_key }}"

And we're seeing intermittent failures where our Ansible run crashes when it gets to Get agent registration status. The error message is Unable to open agent database. Please stop any running tsagentd processes and try again. And I can reproduce the same thing manually when running tsagent info, which exits 1.

Something like service threatstack status shows that Threatstack is up and running.

Is there some better command which could be used (and which wouldn't exit 1 when the service is running) to check the agent registration status? Or would it make sense to use ignore_errors on this task?

Specifics here:

cat /etc/ansible/roles/threatstack.threatstack-ansible/meta/.galaxy_install_info 
install_date: Mon Jan  4 17:59:10 2021
version: v5.0.0

ansible-playbook --version
ansible-playbook 2.10.2

dpkg -l | grep threatstack
ii  threatstack-agent                 2.3.0.0ubuntu20.0                 amd64        Threat Stack Agent

Ubuntu 20.04
olhado commented 3 years ago

Hi @jrobison-sb

We believe the behavior you are seeing should be resolved in the next agent release.

jrobison-sb commented 3 years ago

Yep, 2.3.1 unblocked this.