# Cannot install new plugins: structure needs cleaning

**URL:** https://meta.discourse.org/t/cannot-install-new-plugins-structure-needs-cleaning/184106
**Category:** Self-hosting
**Tags:** server-resources
**Created:** [March 22, 2021, 8:55pm UTC](https://meta.discourse.org/t/cannot-install-new-plugins-structure-needs-cleaning/184106 "2021-03-22T20:55:00Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![koen360](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/koen360/32/194302_2.png) [@koen360](https://meta.discourse.org/u/koen360)
#### Post date: [March 22, 2021, 8:55pm UTC](https://meta.discourse.org/t/cannot-install-new-plugins-structure-needs-cleaning/184106/1 "2021-03-22T20:55:00Z")

</div>

Hi when I add the reactions plugin or the translation plugin in the containers/app.yml and try to rebuild the app I get the following output. Weirdly enmough also with a dutch phrase in the error message.

```
Ensuring launcher is up to date
Fetching origin
warning: unable to access '.git/info/grafts': Structure moet worden opgeschoond
warning: unable to access '.git/info/grafts': Structure moet worden opgeschoond
warning: unable to access '.git/info/grafts': Structure moet worden opgeschoond
Updating Launcher...
warning: unable to access '.git/info/grafts': Structure moet worden opgeschoond
warning: unable to access '.git/info/grafts': Structure moet worden opgeschoond
warning: unable to access '.git/info/grafts': Structure moet worden opgeschoond
Updating 333b879..f982cc4
warning: unable to access '.git/info/attributes': Structure moet worden opgeschoond
warning: unable to access '.git/info/exclude': Structure moet worden opgeschoond
error: Your local changes to the following files would be overwritten by merge:
        image/base/Dockerfile
        image/base/install-gifsicle
        image/base/install-imagemagick
        image/base/install-nginx
        image/base/install-pngcrush
        image/base/install-pngquant
        image/base/install-redis
Please commit your changes or stash them before you merge.
Aborting
failed to update
Launcher updated, restarting...

```

And this repeats indefinitely until I hit CTRL+C.

Probably doing something wrong. I tried updating everything to the latest version, but to no avail.

---

<div class="post-metadata">

### Author: ![koen360](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/koen360/32/194302_2.png) [@koen360](https://meta.discourse.org/u/koen360)
#### Post date: [March 23, 2021, 1:24pm UTC](https://meta.discourse.org/t/cannot-install-new-plugins-structure-needs-cleaning/184106/2 "2021-03-23T13:24:32Z")

</div>

Is there any more information that I can provide? Is there some cleanup procedure that I could try and then try to install the plugins again?

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [March 23, 2021, 2:12pm UTC](https://meta.discourse.org/t/cannot-install-new-plugins-structure-needs-cleaning/184106/3 "2021-03-23T14:12:27Z")

</div>

You added the two lines to clone those plugins and did a

```
 ./launcher rebuild app

```

?

---

<div class="post-metadata">

### Author: ![koen360](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/koen360/32/194302_2.png) [@koen360](https://meta.discourse.org/u/koen360)
#### Post date: [March 24, 2021, 3:14pm UTC](https://meta.discourse.org/t/cannot-install-new-plugins-structure-needs-cleaning/184106/4 "2021-03-24T15:14:15Z")

</div>

Hi, I followed [this procedure](https://meta.discourse.org/t/install-plugins-in-discourse/19157).

The plugin part of the containers/app.yml:

```
## Plugins go here
## see https://meta.discourse.org/t/19157 for details
hooks:
  after_code:
- exec:
    cd: $home/plugins
    cmd:
      - git clone https://github.com/discourse/docker_manager.git
      - git clone https://github.com/paviliondev/discourse-locations.git
      - git clone https://github.com/discourse/discourse-sitemap.git
# - git clone https://github.com/discourse/discourse-reactions.git
      - git clone https://github.com/discourse/discourse-translator.git

```

Tried it again just now, same cycle of output repeating over and over.

---

<div class="post-metadata">

### Author: ![koen360](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/koen360/32/194302_2.png) [@koen360](https://meta.discourse.org/u/koen360)
#### Post date: [March 26, 2021, 8:34pm UTC](https://meta.discourse.org/t/cannot-install-new-plugins-structure-needs-cleaning/184106/5 "2021-03-26T20:34:33Z")

</div>

Hey Jay, any clue on this one? Any thing I could do to provide more info?

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [March 26, 2021, 8:40pm UTC](https://meta.discourse.org/t/cannot-install-new-plugins-structure-needs-cleaning/184106/6 "2021-03-26T20:40:24Z")

</div>

Sorry. Nothing jumped out at me. You might need two spaces in front of `- exec` (or maybe it pasted funny?). It’s not an error I recognize or would expect to cause that error. . .. Yeah. Maybe you need 4 spaces in front of `- exec` and 2 more in front of the rest. You could (or rename) your `app.yml` and re-run `discourse-setup` then carefully copy/paste the discourse\_docker line and edit it for the additional plugins.

If you want to throw money at this problem, see [Redirecting…](https://www.literatecomputing.com/automatic-rebuilds-when-they-are-needed/) or [Redirecting…](https://www.literatecomputing.com/discourse-support/) and I can take a look.

---

<div class="post-metadata">

### Author: ![koen360](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/koen360/32/194302_2.png) [@koen360](https://meta.discourse.org/u/koen360)
#### Post date: [March 26, 2021, 9:39pm UTC](https://meta.discourse.org/t/cannot-install-new-plugins-structure-needs-cleaning/184106/7 "2021-03-26T21:39:49Z")

</div>

Tried your suggestion and I think I got something when running discourse-setup I got this:

```
WARNING: Discourse requires at least 2GB of swap when running with 2GB of RAM
or less. This system does not appear to have sufficient swap space.

Without sufficient swap space, your site may not work properly, and future
upgrades of Discourse may not complete successfully.

Ctrl+C to exit or wait 5 seconds to have a 2GB swapfile created.
install: kan geen toegang krijgen tot '/swapfile': Structure moet worden opgeschoond
fallocate: cannot open /swapfile: Structure moet worden opgeschoond
mkswap: cannot open /swapfile: Structure moet worden opgeschoond
swapon: cannot open /swapfile: Structure moet worden opgeschoond
/swapfile swap swap auto 0 0
vm.swappiness = 10
Failed to create swap: are you root? Are you running on real hardware, or a fully virtualized server?

```

free indicates no swap available on my VPS. Strange thing I never had it before either and the site runs nicely otherwise. Have succesfully installed plugins too.

Get swap in or is there some cleanup I can do?

---

<div class="post-metadata">

### Author: ![koen360](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/koen360/32/194302_2.png) [@koen360](https://meta.discourse.org/u/koen360)
#### Post date: [March 26, 2021, 9:47pm UTC](https://meta.discourse.org/t/cannot-install-new-plugins-structure-needs-cleaning/184106/8 "2021-03-26T21:47:56Z")

</div>

did ./launcher cleanup. Didn’t help.

What is intriguing me is this dutch error line:

```plaintext
Structure moet worden opgeschoond

```

It happens when doing discourse-setup and when trying for the swap. And it occurs while trying to access .git/info/grafts.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [March 26, 2021, 9:51pm UTC](https://meta.discourse.org/t/cannot-install-new-plugins-structure-needs-cleaning/184106/9 "2021-03-26T21:51:48Z")

</div>

So you deleted/renamed your app.yml and re-ran Discourse setup and still got the error? That is strange.

I’d not expect `./launcher cleanup` to help. That just (attempts) to clean up docker stuff (mostly).

```
Failed to create swap: are you root? Are you running on real hardware, or a fully virtualized server?

```

Hey. Here’s a question: Are you root? Are you on a fully virtualized server?

Did you install a long, long time ago?

But I’m mostly out of ideas on this one.

---

<div class="post-metadata">

### Author: ![koen360](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/koen360/32/194302_2.png) [@koen360](https://meta.discourse.org/u/koen360)
#### Post date: [March 26, 2021, 9:57pm UTC](https://meta.discourse.org/t/cannot-install-new-plugins-structure-needs-cleaning/184106/10 "2021-03-26T21:57:17Z")

</div>

OK, must be something with the filesystem. Check this out: I can’t even cd into the ‘info’ directory:

```
root@skrzat:/var/discourse/.git# ls -al
ls: kan geen toegang krijgen tot 'info': Structure moet worden opgeschoond
totaal 32
drwxr-xr-x 8 root root 198 mrt 26 21:54 .
drwxr-xr-x 11 root root 246 jan 7 22:18 ..
drwxr-xr-x 2 root root 6 nov 13 11:43 branches
-rw-r--r-- 1 root root 274 nov 13 11:43 config
-rw-r--r-- 1 root root 73 nov 13 11:43 description
-rw-r--r-- 1 root root 0 mrt 26 21:53 FETCH_HEAD
-rw-r--r-- 1 root root 23 nov 13 11:43 HEAD
drwxr-xr-x 2 root root 301 nov 13 11:43 hooks
-rw-r--r-- 1 root root 7395 jan 7 22:18 index
d????????? ? ? ? ? ? info
drwxr-xr-x 3 root root 30 nov 13 11:43 logs
drwxr-xr-x 155 root root 4096 mrt 24 15:13 objects
-rw-r--r-- 1 root root 41 mrt 26 21:52 ORIG_HEAD
-rw-r--r-- 1 root root 1572 nov 13 11:43 packed-refs

```

drwxr-xr-x 5 root root 46 nov 13 11:43 refs

weirdest thing all those question marks.

I’ll do my own research, probably nothing to do with Discourse at all.

---

<div class="post-metadata">

### Author: ![koen360](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/koen360/32/194302_2.png) [@koen360](https://meta.discourse.org/u/koen360)
#### Post date: [April 7, 2021, 8:40pm UTC](https://meta.discourse.org/t/cannot-install-new-plugins-structure-needs-cleaning/184106/11 "2021-04-07T20:40:56Z")

</div>

Hi all, just to report back about how I resolved this.

It was indeed the XFS filesystem that got corrupted badly. Repairing that required installing XFSprogs which I couldn’t do because using apt-get to install gave same errors.

I’ve come to understand that installing plugins and rebuilding the app is a memory intensive task. However, I have a small forum with dito hardware underneath 2GB ram and 15 gb disk space. Had no swap enabled and my hypothesis is that I ran into memory issues because I had to reboot the system a couple of times while trying to install the plugins. Probably not good for the filesystem and XFS put safeguards around amongst others the GIT folder.

So I pulled a backup (fortunately on S3 so no issues with that), made backup of the app.yml file and respawned the VPS and setup SWAP with [this guide](https://www.digitalocean.com/community/tutorials/how-to-add-swap-space-on-debian-10) (debian VPS). Under an hour I had things up and running again. Few 😅

And the reactions plugin I set out for, working great!

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [May 7, 2021, 8:41pm UTC](https://meta.discourse.org/t/cannot-install-new-plugins-structure-needs-cleaning/184106/12 "2021-05-07T20:41:00Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
