Summary
Hi everyone, I have trouble installing plugins on my Mattermost instance. I’ve noticed this during the migration of my system-installed Mattermost instance to a dockerized installation, but the problem also appear with my existing system-installed Mattermost instance. I’ve also tried to boot up a new instance from scratch (new database, no data, fresh config.json) but I have the same problem.
The instance is exposed through my system-installed nginx service. Since this Mattermost instance is for on-premises purpose only, we don’t serve over https, so the nginx config is quite simple.
Steps to reproduce
I am using the Team version 5.33 (mattermost/mattermost-team-edition:5.33.0 to be precise).
Once I’m logged in the web UI, I navigate to the side menu, Plugin Marketplace, and try to install any plugins.
This is my nginx configuration:
upstream backendmm {
server 127.0.0.1:9065;
keepalive 32;
}proxy_cache_path /var/cache/nginxmm2 levels=1:2 keys_zone=mattermost_cache2:10m max_size=3g inactive=120m use_temp_path=off;
server {
listen 80;
server_name mm2.tahiti-web-management.com;location ~ /api/v[0-9]+/(users/)?websocket$ {
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection “upgrade”;
client_max_body_size 50M;
proxy_set_header Host $http_host;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Frame-Options SAMEORIGIN;
proxy_buffers 256 16k;
proxy_buffer_size 16k;
client_body_timeout 60;
send_timeout 300;
lingering_timeout 5;
proxy_connect_timeout 90;
proxy_send_timeout 300;
proxy_read_timeout 90s;
proxy_pass http://backendmm;
}location / {
client_max_body_size 50M;
proxy_set_header Connection “”;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Frame-Options SAMEORIGIN;
proxy_buffers 256 16k;
proxy_buffer_size 16k;
proxy_read_timeout 600s;
proxy_cache mattermost_cache2;
proxy_cache_revalidate on;
proxy_cache_min_uses 2;
proxy_cache_use_stale timeout;
proxy_cache_lock on;
proxy_http_version 1.1;
proxy_pass http://backendmm;
}
}
Expected behavior
I expect the plugin to be installed.
Observed behavior
Instead, I have the following error:
In the logs, I also have this:
mattermost | {“level”:“debug”,“ts”:1617239523.6523678,“caller”:“web/handlers.go:104”,“msg”:“Received HTTP request”,“method”:“GET”,“url”:“/api/v4/system/ping”,“request_id”:“tjzcygjdw7gb9jijkt578t3wwc”,“host”:“localhost:8065”,“scheme”:“”,“status_code”:“200”}
mattermost | {“level”:“debug”,“ts”:1617239526.270383,“caller”:“web/handlers.go:104”,“msg”:“Received HTTP request”,“method”:“POST”,“url”:“/api/v4/users/status/ids”,“request_id”:“o3atygfj3jr8fnmwxzn66yfm9r”,“host”:“mm2.tahiti-web-management.com”,“scheme”:“http”,“status_code”:“200”}
mattermost | {“level”:“error”,“ts”:1617239546.510492,“caller”:“mlog/log.go:232”,“msg”:“Failed to install marketplace plugin.”,“path”:“/api/v4/plugins/marketplace”,“request_id”:“i8hwq4h9fbrj9y77j9ug7sjkdw”,“ip_addr”:“192.168.128.1”,“user_id”:“pyxfzhyke38bdxr9rrgjq7xyza”,“method”:“POST”,“err_where”:“InstallMarketplacePlugin”,“http_code”:500,“err_details”:“download failed after multiple retries.: failed to fetch from https://plugins-store.test.mattermost.com/release/mattermost-plugin-dice-roller-v3.1.1-linux-amd64.tar.gz: Get "https://plugins-store.test.mattermost.com/release/mattermost-plugin-dice-roller-v3.1.1-linux-amd64.tar.gz\”: dial tcp: i/o timeout"}
mattermost | {“level”:“debug”,“ts”:1617239546.5117588,“caller”:“web/handlers.go:104”,“msg”:“Received HTTP request”,“method”:“POST”,“url”:“/api/v4/plugins/marketplace”,“request_id”:“i8hwq4h9fbrj9y77j9ug7sjkdw”,“host”:“mm2.tahiti-web-management.com”,“scheme”:“http”,“status_code”:“500”}
mattermost | {“level”:“debug”,“ts”:1617239546.9635653,“caller”:“web/handlers.go:104”,“msg”:“Received HTTP request”,“method”:“POST”,“url”:“/api/v4/channels/members/me/view”,“request_id”:“78inqfebt3y95g8yzdiy7j8yie”,“host”:“mm2.tahiti-web-management.com”,“scheme”:“http”,“status_code”:“200”}
Note that I can fetch the referenced plugin (https://plugins-store.test.mattermost.com/release/mattermost-plugin-dice-roller-v3.1.1-linux-amd64.tar.gz) by execing into the container.