matterpoll: Buttons doesn't work
Summary
Using the mattermost docker container. Everything else is working for years now. Mattermost version is 5.12.1, except some preview errors everything is ok, other plugins working fine.
Steps to reproduce
Steps to reproduce the behavior:
- create Poll
- Click on any button
- nothing happens
Expected behavior
buttons work
Observed behavior (that appears unintentional)
poll doesn’t work
Server configuration
Linux, Docker
Mattermost version: 5.12.1
Matterpoll version: 1.1.0
Updated from an older Matterpoll version or fresh install: fresh
Mattermost server logs
{"level":"error","ts":----,"caller":"mlog/log.go:172","msg":"Action integration error","path":"/api/v4/posts/o8hj6qanz3848rcgjouin35tfa/actions/umkr49ji7ido3mbtattx7xpa3a","request_id":"xxxxx,"ip_addr":"some lan ip","user_id":"h....","method":"POST","err_where":"DoActionRequest","http_code":400,"err_details":"err=Post https://some.domain:8181/plugins/com.github.matterpoll.matterpoll/api/v1/polls/rpug5s6ua7yd8xu9h716s8b7by/delete: dial tcp my.external.ip.address:8181: i/o timeout"}
Additional context
using the webcontainer which does https, site url is correctly set to https and port. Webhooks, Hubot etc are working fine.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 21 (7 by maintainers)
I had a same problem. I don’t use docker, but I use a load balancer to transfer to the aws ec2 mattermost server. Since all SSL certificates are attached to the load balancer, https is used for external access, but http is used inside ec2.
ALB’s IP is returned when i send following command on ec2 mm server, but it cannot be accessed from the server.
nslookup my.mattermost.domain
(Despite the path goal being the instance itself!) To that proof:
ping my.mattermost.domain
is no response. So, i edit the hosts file and route it.
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 my.mattermost.domain
It worked.
I am also using Mattermost inside a Docker container and behind an NGINX reverse proxy, where HTTPS is terminated by the proxy already. I got the errors
no route to host
andi/o timeout
.The problem is that the matterpoll plugin tries to reach
https://your-mattermost-instance.com
, which is (usually) not reachable from inside the Docker container.I resolved this by using the local Docker DNS to redirect those request directly to the NGINX container. I used the legacy
--link
option because it is convenient. Maybe think about using user-defined networks instead.Assuming that your NGINX container is named
nginx
, you can start your Mattermost container like so:This will redirect HTTPS queries
https://your-mattermost-instance.com
directly to your reverse proxyhttps://nginx
instead.I’m currently on vacation and didn’t want to upgrade and leave it without enough testing. I can do the upgrade probably next week.