Closed jhmk closed 1 month ago
Hey @jhmk,
it's hard to tell what happening without looking at your nginx config. But generally speaking, yes, you need to set up an upstream for you nginx that will be pointing at the dienstplan
backend server.
Here's a template for the inspiration.
If your nginx and diesntplan are running on the same host, then your upsteam URI here will be just 127.0.0.1:8080.
Also, when you are debugging the whole set up in addition to looking at the nginx's logs, also take a look at what's happening in the dienstplan
's docker container like this:
$ docker compose logs -f dienstplan
If all's good, then making an http request
$ curl -X GET --url 'https://slack-dienstplan.DOMAIN/api/healthcheck'
should generate a line in the diesntplan
logs like:
dienstplan-1 | 2024-08-16 18:31:35,237 [qtp114211155-30] INFO dienstplan.middlewares - GET /api/healthcheck
Also pay attention to your SSL traffic termination. I'm not sure what exactly causes the problem, but the line
curl: (35) LibreSSL/3.3.6: error:1404B42E:SSL routines:ST_CONNECT:tlsv1 alert protocol version
looks like an HTTPS problem to me.
Last but not least, take a look at dienstplan-deploy project. Basically, it's an Ansible playbook that helps you with deploying the bot on your Linux server.
Thanks for the hint.
Updated the NGINX Config.
When I now use curI, I can see this output in the logs:
dienstplan-1 | 2024-08-19 09:30:40,616 [qtp1148046003-16] INFO dienstplan.middlewares - GET /api/healthcheck
But the Slack bot itself is still not working. I also don't see any logs when using the Bot Commands in Slack
@jhmk two things to check:
Go the installed app settings and check what permissions your installation of dienstplan
has?
This is what mine list of permissions looks like:
slack api server <-> nginx <-> dienstplan upstream
If you mention @dienstplan
, does the request from the Slack API reaches you nginx frontend? Do you see anything in access logs? If yes, what the upstream logs look like? If not, what happens if you craft a curl request yourself?
E.g. something like curl -X POST --url 'https://slack-dienstplan.DOMAIN/api/events' --data '{"something": 1}'
?
Made it work. Thank you very much. Issue was in the ufw service
Glad it works! Closing the issue
Hi, need some help with the setup.
When using the @dienstplan command in slack nothing happens. Also on the Server I don't see any incoming Network Traffic or anything in the access & error.log from nginx.
How the setup looks like:
Docker container are running:
Because I'm using NGINX do I need to make a Proxy Upstream to the docker container on Port 8080? When running curl to test the Server I get this error:
No error on:
curl https://slack-dienstplan.DOMAIN