# Failed to install marketplace plugin

**URL:** <https://forum.mattermost.com/t/failed-to-install-marketplace-plugin/11455>\
**Category:** Troubleshooting\
**Created:** [April 1, 2021, 1:19am UTC](https://forum.mattermost.com/t/failed-to-install-marketplace-plugin/11455 "2021-04-01T01:19:49Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![paraita](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/paraita/32/4706_2.png) [@paraita](https://forum.mattermost.com/u/paraita)\
**Post date:** [April 1, 2021, 1:19am UTC](https://forum.mattermost.com/t/failed-to-install-marketplace-plugin/11455/1 "2021-04-01T01:19:50Z")

</div>

#### 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](http://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](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](http://backendmm);  
> }  
> }

#### Expected behavior

I expect the plugin to be installed.

#### Observed behavior

Instead, I have the following error:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/mattermost/original/2X/0/089c1f9dce6ddee7a3a0e1d8b5d8ffbb18974c27.png)

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](http://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:](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\](https://plugins-store.test.mattermost.com/release/mattermost-plugin-dice-roller-v3.1.1-linux-amd64.tar.gz%5C)”: 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](http://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](http://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](https://plugins-store.test.mattermost.com/release/mattermost-plugin-dice-roller-v3.1.1-linux-amd64.tar.gz)) by execing into the container.

---

<div class="post-metadata">

**Author:** ![jprusch](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/jprusch/32/2563_2.png) [@jprusch](https://forum.mattermost.com/u/jprusch)\
**Post date:** [April 6, 2021, 7:10am UTC](https://forum.mattermost.com/t/failed-to-install-marketplace-plugin/11455/2 "2021-04-06T07:10:11Z")

</div>

> [@paraita](#):
>
> [https://plugins-store.test.mattermost.com/release/mattermost-plugin-dice-roller-v3.1.1-linux-amd64.tar.gz](https://plugins-store.test.mattermost.com/release/mattermost-plugin-dice-roller-v3.1.1-linux-amd64.tar.gz:)

Your Mattermost server can connect to the marketplace server: TCP I/O timeout.  
You can try to curl or wget the url on the server to break down the issue, but I suggest: Firewall/Security.

Best  
JP

---

<div class="post-metadata">

**Author:** ![PeterDaveHello](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/peterdavehello/32/4723_2.png) [@PeterDaveHello](https://forum.mattermost.com/u/PeterDaveHello)\
**Post date:** [April 7, 2021, 1:47pm UTC](https://forum.mattermost.com/t/failed-to-install-marketplace-plugin/11455/3 "2021-04-07T13:47:30Z")

</div>

I have the same problem, but firewall disabled, running without container technology. Tested manually with curl and wget to the target url and it always worked, could use some help to dig deeper.

---

<div class="post-metadata">

**Author:** ![PeterDaveHello](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/peterdavehello/32/4723_2.png) [@PeterDaveHello](https://forum.mattermost.com/u/PeterDaveHello)\
**Post date:** [April 7, 2021, 2:36pm UTC](https://forum.mattermost.com/t/failed-to-install-marketplace-plugin/11455/4 "2021-04-07T14:36:43Z")

</div>

I enabled the DEBUG log but I didn’t get any related log about the plugin update, it only show up with “error” level log, no other context. (Mattermost Version: 5.33.2)

```json
{"level":"error","ts":1617806043.7547944,"caller":"mlog/log.go:232","msg":"Failed to install marketplace plugin.","path":"/api/v4/plugins/marketplace","request_id":"48andmat9id19poa9k9pp5nd8r","ip_addr":"IP_ADDR","user_id":"xrtamaq6mbyh8xoi978cd36xio","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"}

```

---

<div class="post-metadata">

**Author:** ![paraita](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/paraita/32/4706_2.png) [@paraita](https://forum.mattermost.com/u/paraita)\
**Post date:** [April 7, 2021, 6:23pm UTC](https://forum.mattermost.com/t/failed-to-install-marketplace-plugin/11455/5 "2021-04-07T18:23:54Z")

</div>

I can curl the plugins from a shell session inside the container without problems. I’ve noticed plugins do get installed when I try to install multiple plugins at once, and usually the first once fail and they others manage to install successfully.  
It might be a problem with our infrastructure network policies but I can’t verify.  
There’s at least 2 workarounds:

- curl from inside the containers to the plugins folder
- install multiple plugins all at once

---

<div class="post-metadata">

**Author:** ![XxLilBoPeepsxX](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/xxlilbopeepsxx/32/4993_2.png) [@XxLilBoPeepsxX](https://forum.mattermost.com/u/XxLilBoPeepsxX)\
**Post date:** [April 7, 2021, 10:06pm UTC](https://forum.mattermost.com/t/failed-to-install-marketplace-plugin/11455/6 "2021-04-07T22:06:32Z")

</div>

I would also suggest checking your individual web server `error.log` files, in which the information related to the `500` HTTP error code responses should be logged. This information should be extremely helpful.

---

<div class="post-metadata">

**Author:** ![paraita](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/paraita/32/4706_2.png) [@paraita](https://forum.mattermost.com/u/paraita)\
**Post date:** [April 14, 2021, 10:02pm UTC](https://forum.mattermost.com/t/failed-to-install-marketplace-plugin/11455/7 "2021-04-14T22:02:42Z")

</div>

Thanks for your answer, I did try to look at my nginx server (it’s actually acting as a reverse proxy) and there wasn’t any errors. Actually error 500 would mean something wrong happened on the server side, and that would be (based on my previous log trace):

> [https://plugins-store.test.mattermost.com](https://plugins-store.test.mattermost.com)

---

<div class="post-metadata">

**Author:** ![XxLilBoPeepsxX](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/xxlilbopeepsxx/32/4993_2.png) [@XxLilBoPeepsxX](https://forum.mattermost.com/u/XxLilBoPeepsxX)\
**Post date:** [April 15, 2021, 6:15pm UTC](https://forum.mattermost.com/t/failed-to-install-marketplace-plugin/11455/8 "2021-04-15T18:15:43Z")

</div>

Well, somewhat. An HTTP response with a status code between 400 and 500 is throwing an error, and since there is a reverse proxy involved, it is entirely possible that the server we’re running in this case could be having an issue.

---

<div class="post-metadata">

**Author:** ![XxLilBoPeepsxX](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/xxlilbopeepsxx/32/4993_2.png) [@XxLilBoPeepsxX](https://forum.mattermost.com/u/XxLilBoPeepsxX)\
**Post date:** [April 15, 2021, 6:16pm UTC](https://forum.mattermost.com/t/failed-to-install-marketplace-plugin/11455/9 "2021-04-15T18:16:43Z")

</div>

> [@PeterDaveHello](#):
>
> `https://plugins-store.test.mattermost.com/release/mattermost-plugin-dice-roller-v3.1.1-linux-amd64.tar.gz`

The other reason I say this is because simply copying and pasting this URL into a browser and navigating to it will download the file, which tells me that it is not a issue with the file server.

---

<div class="post-metadata">

**Author:** ![paraita](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/paraita/32/4706_2.png) [@paraita](https://forum.mattermost.com/u/paraita)\
**Post date:** [April 15, 2021, 6:45pm UTC](https://forum.mattermost.com/t/failed-to-install-marketplace-plugin/11455/10 "2021-04-15T18:45:33Z")

</div>

Also:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/mattermost/original/2X/8/84b9549201de889c55432568ea4e86c25dbbe319.png)

---

<div class="post-metadata">

**Author:** ![PeterDaveHello](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/peterdavehello/32/4723_2.png) [@PeterDaveHello](https://forum.mattermost.com/u/PeterDaveHello)\
**Post date:** [April 16, 2021, 12:59pm UTC](https://forum.mattermost.com/t/failed-to-install-marketplace-plugin/11455/11 "2021-04-16T12:59:53Z")

</div>

actually I fixed my problem … it’s just caused by a slow dns resolver, and mattermost(or the framework, library behind it) can’t tolerate the latency of it, after change to use a faster resolver, everything works pretty well now

---

<div class="post-metadata">

**Author:** ![XxLilBoPeepsxX](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/xxlilbopeepsxx/32/4993_2.png) [@XxLilBoPeepsxX](https://forum.mattermost.com/u/XxLilBoPeepsxX)\
**Post date:** [April 21, 2021, 4:43pm UTC](https://forum.mattermost.com/t/failed-to-install-marketplace-plugin/11455/12 "2021-04-21T16:43:27Z")

</div>

Glad to hear that you got it figured out!

---

<div class="post-metadata">

**Author:** ![sunil808](https://avatars.discourse-cdn.com/v4/letter/s/34f0e0/32.png) [@sunil808](https://forum.mattermost.com/u/sunil808)\
**Post date:** [June 6, 2021, 11:23pm UTC](https://forum.mattermost.com/t/failed-to-install-marketplace-plugin/11455/13 "2021-06-06T23:23:18Z")

</div>

I am not able to install plugins from market place as this URL is not accessible.

---

<div class="post-metadata">

**Author:** ![XxLilBoPeepsxX](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/xxlilbopeepsxx/32/4993_2.png) [@XxLilBoPeepsxX](https://forum.mattermost.com/u/XxLilBoPeepsxX)\
**Post date:** [June 7, 2021, 1:44pm UTC](https://forum.mattermost.com/t/failed-to-install-marketplace-plugin/11455/14 "2021-06-07T13:44:37Z")

</div>

Are you able to provide the contents of your Mattermost log file? The log files should be in the `/opt/mattermost/logs/` directory. Thanks!

---

<div class="post-metadata">

**Author:** ![ahmaddanial](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/ahmaddanial/32/2938_2.png) [@ahmaddanial](https://forum.mattermost.com/u/ahmaddanial)\
**Post date:** [June 7, 2021, 11:53pm UTC](https://forum.mattermost.com/t/failed-to-install-marketplace-plugin/11455/15 "2021-06-07T23:53:07Z")

</div>

Hi, @sunil808

On top of @XxLilBoPeepsxX request, would you mind sharing the screen shot of what you are seeing on the UI? Something that look like this, perhaps?

 ![image](https://us1.discourse-cdn.com/flex020/uploads/mattermost/original/2X/7/74052bc740cb0ab3035935209e98f0734a57ac80.png)

If yes, you will need to run `sudo chown -R mattermost:mattermost /opt/mattermost` command to set the right directory ownership to your Mattermost installation file to tackle the issue:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/mattermost/original/2X/4/44e8384d77cf88e509d785ef230bb1b1363ad6f5.png)

If that is not the case, please share with us more details on what you mean by the inaccessible URL. Thank you.
