Cannot install new plugins: structure needs cleaning

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.

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?

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

 ./launcher rebuild app

?

Hi, I followed this procedure.

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.

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

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 https://www.literatecomputing.com/automatic-rebuilds-when-they-are-needed/ or Discourse Support — Literate Computing, LLC and I can take a look.

1 Like

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?

did ./launcher cleanup. Didn’t help.

What is intriguing me is this dutch error line:

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.

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.

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.

1 Like

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 (debian VPS). Under an hour I had things up and running again. Few :sweat_smile:

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

4 Likes

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