Bootstrap failed — could not open relation mapping file "global/pg_filenode.map"

I get this error when trying to bootstrap. I bootstraped because I only had a white page in my community. This is the error I got:

FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate' failed with return #<Process::Status: pid 480 exit 1>
Location of failure: /pups/lib/pups/exec_command.rb:112:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"db_migrate", "cmd"=>["su discourse -c 'bundle exec rake db:migrate'"]}
8de8295fc6d21ad08ab4b53946e3c07713933594869ebe0c636b959a59777dec
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one

How can I fix this?

I suggest you do a command line rebuild to start with.

Do you have any plugins installed? Are you out of disk space?

I get same error with bootstrap.

I have more than enough diskspace left.
My current plugins installed are:

  • Docker Manager
  • Discourse Voting
  • Staff Notes
  • Canned Replies
  • Yearly Review
  • Spoiler Alert
  • Characters Required
  • Solved
  • Cakeday
  • Chat Integration
  • Data Explorer
  • Assign
  • Styleguide
  • Checklist
  • Translator
  • Perspective API
  • Akismet
  • Algolia

You will need to scroll up per the error printed in your first post in this topic.

I would comment out the unofficial plugins as a first step.

I see an error some lines above:

I, [2019-06-15T14:59:57.981315 #15]  INFO -- : > cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate'
rake aborted!
PG::ConnectionBad: FATAL:  could not open relation mapping file "global/pg_filenode.map": Permission denied
FATAL:  could not open relation mapping file "global/pg_filenode.map": Permission denied

That is an unusual error, I don’t think I have seen that one before. Disks are not full or anything?

My disk is not full.

Try rebooting as a first step

If fails, upgrade docker and reboot

4 Likes

Reboot didn’t helped
I already have the latest docker version:
docker-ce is already the newest version (5:18.09.6~3-0~ubuntu-bionic).

Look at permissions on the pg folder you may need to reset them

Where is that folder located?

ls -l
total 20
drwxr-xr-x  3 www-data www-data 4096 Apr 26 21:24 log
drwxr-xr-x  2 www-data www-data 4096 Apr 26 21:24 postgres_backup
drwxr-xr-x 19 www-data www-data 4096 Jun 15 00:20 postgres_data
drwxrwsr-x  3 www-data www-data 4096 Jun 15 00:20 postgres_run
drwxr-xr-x  2 www-data www-data 4096 Jun 15 01:05 redis_data

Still doesn’t work :frowning:

So does anyone know what is the issue causing this problem to occur and how to fix it?

It doesn’t look like it. It sounds like a permissions problem., but there is no obvious fix.

You could make those files world writable and see if that fixes it and then see what user new files belong to. Or then take a backup and do a clean install and restore.

Did you follow the standard install document?

If you have a budget I could take look on Monday. My contact info is in my profile.

2 Likes

I just found the issue. So we have our Community split up into data and web_only container. The issue wasn’t located in the web_only container as I thought but it was located in the data container.
In the data container there was this issue located:

2019-06-23 14:03:11.780 UTC [68] FATAL: data directory “/shared/postgres_data” has group or world access
2019-06-23 14:03:11.780 UTC [68] DETAIL: Permissions should be u=rwx (0700).

So I basically changed the permissions of that folder to 0700 and it worked and after that our web_only container had no errors or issues anymore.
Thank you for your help. My bad I should have told you that our community is split up in 2 containers.

1 Like

Glad you got it! I guess the old “fix anything by making stuff world readable” trick doesn’t work anymore. :slight_smile:

1 Like

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