Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Poostmoogle service failed to start #2613

Closed
Gregivy opened this issue Mar 30, 2023 · 4 comments
Closed

Poostmoogle service failed to start #2613

Gregivy opened this issue Mar 30, 2023 · 4 comments
Labels

Comments

@Gregivy
Copy link

Gregivy commented Mar 30, 2023

Describe the bug
After upgrading to latest commit of this repo and switching to traefik postmoogle bot stopped working.

Here is the log from journalctl -fu matrix-bot-postmoogle.service:

Dependency failed for Matrix Postmoogle bot.
systemd[1]: matrix-bot-postmoogle.service: Job matrix-bot-postmoogle.service/start failed with result 'dependency'.

To Reproduce
My vars.yml file looks like this:

matrix_bot_postmoogle_enabled: true
# Adjust this to whatever password you chose when registering the bot user
matrix_bot_postmoogle_password: "..."
matrix_bot_postmoogle_domains:
  - "domain.ltd"
  - "{{ matrix_server_fqn_matrix }}"

Expected behavior
Bot should work as before.

Matrix Server:

  • OS: Ubuntu 22.04 LTS

Ansible:
I use ansible locally through a docker container, ansible [core 2.13.0].

Additional context
I tried to set matrix_bot_postmoogle_enabled to false then to true and setup-all with ansible but no effect.

@spantaleev
Copy link
Owner

matrix-bot-postmoogle.service depends on some traefik cert dumper services for obtaining SSL certificates before starting Postmoogle.

failed with result 'dependency'

This tells you that it's the dependency services obtaining the certifiates that failed. You should see what they are (grep After /etc/systemd/system/matrix-bot-postmoogle.service and then check their logs with journalctl.

See if the domains (matrix_bot_postmoogle_domains) are pointed to your server, that DNS records have refreshed, and that your firewall is not getting in the way of Let's Encrypt's automated checks before issuing certificates.

Disabling Postmoogle and doing --tags=setup-all,start should definitely work. No Postmoogle, no problem with its dependencies obtaining certificates.

@Gregivy
Copy link
Author

Gregivy commented Mar 30, 2023

Thank you @spantaleev. I think I found the problem: Failed to start Traefik certs dumper waiter (matrix-traefik-certs-dumper-wait-for-domain) for domain.ltd. It fails because my domain.ltd is pointing to another IP address where I host a website and it has its own SSL certificate. Why do we need to obtain SSL certificates for the postmoogle's domains now if it used to work correctly before without this step?

@spantaleev
Copy link
Owner

Postmoogle requires SSL certificates for each domain it's responsible for, as described in its README: https://gitlab.com/etke.cc/postmoogle

I believe that this is necessary for receiving emails from other servers using a secure (TLS) connection. It can probably be disabled by setting its POSTMOOGLE_TLS_REQUIRED environment variable to false. I think that even if you pass this environment variable, you would still need to adjust a few other Ansible variables (matrix_playbook_bot_postmoogle_traefik_certs_dumper_waiter_services: '') to disable these dependencies

@Gregivy
Copy link
Author

Gregivy commented Apr 4, 2023

Thanks again. For my case it wasn't necessary to host everything on separate machines, so I changed my DNS and used matrix_ssl_additional_domains_to_obtain_certificates_for variable to solve the issue. I have updated the readme for Postmoogle with this example, I think it could be useful: #2623

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants