Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

empty configuration directory when attempting docker install #4747

Open
scottcmace opened this issue Nov 10, 2020 · 12 comments
Open

empty configuration directory when attempting docker install #4747

scottcmace opened this issue Nov 10, 2020 · 12 comments

Comments

@scottcmace
Copy link

When I attempt to start a docker instance of backdrop, I get an error similar to the following:

Exception: The configuration directory in settings.php is specified as './files/config_a1614e81308b9e6b86be181ef0914335/active', but this directory is either empty or missing crucial files. Check that the $config_directories variable is correct in settings.php. in _backdrop_bootstrap_configuration() (line 3011 of /var/www/html/core/includes/bootstrap.inc).

Steps To Reproduce

To reproduce the behavior:
start a docker container with the latest pull.

I've verified that the database user, password, host, port and db name were all set properly using the "BACKDROP_DB_" environment values to set host, port, db name, db user, and db password.

@stpaultim
Copy link
Member

@scottcmace - I doubt this a core issue. It is usually better to post support questions in the forum. However, we'll try to help where ever you post.

https://forum.backdropcms.org/

Having said that, let's try and figure this out. I think we need more information, for example are you trying to spin up a site with an existing site with an existing database or is this a new installation?

The error message clearly states that the problem is with your config directory. I would try the following.

  1. If you are trying to set up a new site and go through the install process, your config directories should be empty. Have you checked to see if the active config directory is empty?
  2. If this is an existing site the active directory must have the necessary config files. Have you checked to see if they are there?
  3. Have you verified that the path to config in the settings.php file is correct and that the config directory is in the right place. Verify that the hash value in the path is correct.

Check these items and let us know.

A few other possible things to check:

  1. Are permissions set correctly on config directories so that Backdrop can write new config files there?
  2. Are you using Docker or something like Lando or DDev (dev tools that are built on Docker)?

@olafgrabienski
Copy link

@stpaultim It could however be a core issue, at least there were similar ones in the past, e.g.

One more idea to check: does the database password contain certain special characters? There is an open issue for it. The reported message there is different but who knows.

@scottcmace
Copy link
Author

I'm trying to spin up a new site. I've got a Ubuntu 20.04 server, running the latest version of Docker. I've got a mysql container up and running, and can connect to it just fine. I'm keeping it simple, the user, pass, and database are all "backdrop" so there's no special characters involved.

To spin up my container, I literally ran this:

docker run --name mybackdrop
-e BACKDROP_DB_HOST=172.16.3.14
-e BACKDROP_DB_PORT=3307
-e BACKDROP_DB_USER=backdrop
-e BACKDROP_DB_PASSWORD=backdrop
-e BACKDROP_DB_NAME=backdrop
-p 8085:80
-d backdrop

The database remains empty. I get the error message from my original post when I browse to the base url, and if I go to /core/install.php, it tells me that the site is already set up.

Yes, I know that's a non-standard port for mysql, I have an instance running on the "root" of the machine on 3306. I've tried using it, too... same results.

Looking at the /var/www/html directory, it looks to me like the permissions are set incorrectly... "root" is the owner of everything, but even if I change ownership of everything to www-data, it still thinks at this point the site is already set up, and nothing changes.

Since this is a docker container, it's not like I'm getting the option to do anything with file permissions, etc, before launch... which is kind of the point of docker images... set a few things and you're off and running.

I'm curious if anyone else is seeing this behavior with the docker image?

I'm spooling up a VM to do the install the "regular way" so I can see what's supposed to happen with an install... but I was hoping to avoid doing this in the first place by using docker :)

@stpaultim
Copy link
Member

stpaultim commented Nov 11, 2020

@scottcmace - I've seen error messages like the one that quote before. They usually have nothing to do with the database, but are related to my settings.php configuration and/or my config directories.

I don't use docker images directly. All of my work with Docker is through using tools like Lando and DDev and they generally work fine for me, unless I muck-up the config files (which happens on occasion, especially if I'm rebuilding a new site on the same code base).

I keep an eye on most of the BackdropCMS repos, but I have not been watching this one: https://github.com/backdrop-ops/backdrop-docker (I see you posted here, but I don't know if this repo is getting active attention). This could be where the problem is. But, I'm not familiar with using Docker outside of tools like Lando.

@scottcmace
Copy link
Author

So... now I'm wondering, who is maintaining the docker image, because it's getting updated regularly, when it obviously has some issues... at least for me. I've tried it on 2 different systems now (ubuntu 16 and 20) with the same results, by following the instructions on the docker hub page itself.

@stpaultim
Copy link
Member

We have our weekly development meeting tomorrow. I'll bring this up.

@vlombardi
Copy link

Hi stpaultim,
I'm exactly in the same conditions described by scottcmace: just trying the easy path using the official Docker image.
The error is the same.
It's clear that the Docker image has some problems. No configuration directory is created inside /var/www/html/files. It is not a problem of permissions nor md5 since it only contains the files .htaccess and README.md.

A check on the official Docker image would be really appreciated.
Thanks a lot for your great work and support!

Vincenzo

@herbdool
Copy link

herbdool commented Nov 25, 2020

@scottcmace recently I had updated the Backdrop version but that's it. I don't use the docker image so can't help too much. Perhaps there's a way to test a previous version as well? https://github.com/backdrop-ops/backdrop-docker/commits/master. I'm not really sure if that works or not. Or at least could look through the commits to see if something changed that might have affected that.

@klonos
Copy link
Member

klonos commented Nov 25, 2020

Pinging @drupol if you are still around and have the time/energy to help with this.

@drupol
Copy link

drupol commented Nov 25, 2020

Hi there, unfortunately I don't have time for this anymore 👎

@stpaultim
Copy link
Member

We did bring this issue up at a recent development meeting. I think that the problem right now is that we don't have anyone on the core team that is using docker and has the time to keep this repo up to date. We did have someone for a while, but they are no longer active in the project.

I think that we really need someone that uses docker and is willing to help us keep this repo up to date.

@polaroi8d
Copy link

I tried it today and got the same issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants