Baserow docker container - Error on startup - Cannot "mv" file

Please fill in the questionnaire below.

Technical Help Questionnaire

Self-Hosted Installation and Setup Questions

How have you self-hosted Baserow.

Docker compose or docker run.
The error happens regardless of using docker compose or docker run.

What are the specs of the service or server you are using to host Baserow.

4 vCPU, 2GB of RAM

Which version of Baserow are you using.

1.20.2

How have you configured your self-hosted installation?

Docker compose file content

version: "3.4"
services:
  baserow:
    container_name: baserow
    image: baserow/baserow:1.20.2
    environment:
      BASEROW_PUBLIC_URL: 'http://172.16.10.102:8020'
      WEB_FRONTEND_PORT: '8020'
    ports:
      - "8020:80"
      - "8021:443"
    volumes:
      - /var/lib/docker/volumes/baserow_data:/baserow/data
volumes:
  baserow_data:

Docker run command (when used)

docker run \
  -d \
  --name baserow \
  -e BASEROW_PUBLIC_URL=http://172.16.10.102:8020 \
  -v baserow_data_v2:/baserow/data \
  -p 8020:80 \
  -p 8021:443 \
  --restart unless-stopped \
  baserow/baserow:1.20.2  

Environment variables

BASEROW_IMAGE_TYPE = all-in-one
BASEROW_PLUGIN_DIR = /baserow/data/plugins
BASEROW_PUBLIC_URL = http://172.16.10.102:8020
DATA_DIR           = /baserow/data
DOCKER_USER	       = baserow_docker_user
GID	               = 9999
PATH	           = /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
POSTGRES_LOCATION  = /etc/postgresql/11/main
POSTGRES_VERSION   = 11
UID		           = 9999
WEB_FRONTEND_PORT  = 8020

Describe the problem

When I try to start a baserow docker container I see the below error in the logs:
mv: cannot move '/baserow/supervisor/includes/disabled/embedded-postgres.conf' to a subdirectory of itself, '/baserow/supervisor/includes/enabled/embedded-postgres.conf'

The command has been defined in the below file, line 48: deploy/all-in-one/supervisor/start.sh Β· develop Β· Baserow / baserow Β· GitLab

The machine where the error happens is running on Debian GNU/Linux 11 (bullseye). It has 4vCPUS and 2GB RAM.

I tested starting a new baserow docker container on other two machines, one running on Debian GNU/Linux 11 (bullseye) and the other one running on Ubuntu 22.04.3 LTS. It worked on both machines.

After that, I cloned the baserow repository and modified the file at /deploy/all-in-one/supervisor/start.sh
I replaced the β€œmv” command with β€œcp”. Then I created a new docker image and started a new container. It worked.

I’m assuming that the error is caused by some (mis) configuration from my server. But it would be great to know what is causing it, so we can prevent it in the future.

Thanks.

How many rows in total do you have in your Baserow tables?

Zero.

Please attach full logs from all of Baserow’s services

Hey @lucasuds, thanks for spotting this and for your (technical) feedback! I tried to reproduce this error locally and also on a VPS. I’m using Ubuntu 18.04.3 LTS (GNU/Linux 4.15.0-197-generic x86_64) and I used the same command, just replaced your IP with my server’s IP:

docker run \
  -d \
  --name baserow \
  -e BASEROW_PUBLIC_URL=http://<my_ip>:8020 \
  -v baserow_data_v2:/baserow/data \
  -p 8020:80 \
  -p 8021:443 \
  --restart unless-stopped \
  baserow/baserow:1.20.2

…and it seems I can access Baserow on this IP, I couldn’t reproduce the error I’m afraid.

Did you run Baserow on a fresh install or were some other libraries already installed as well? Just thinking out loud, but maybe that’s causing these permission errors.

The server where I tried to deploy the new baserow container has been running for at least 6 months. During this time, several services have been deployed using docker containers.
Considering that this server is mainly used to host docker containers, we have not installed much other software on it besides docker.

I’m getting this same error on version 1.21.2.
Docker version 24.0.7
docker-compose version 1.29.2

I have not run baserow before. I started a new stack with this configuration from here.

version: "3.4"
services:
  baserow:
    container_name: baserow
    image: baserow/baserow:1.21.2
    environment:
      BASEROW_PUBLIC_URL: 'http://localhost'
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - baserow_data:/baserow/data
volumes:
  baserow_data:

Every time I try to run it, it stops with this error message.

baserow    | Version 1.21.2
baserow    |
baserow    | =========================================================================================
baserow    | Welcome to Baserow. See https://baserow.io/installation/install-with-docker/ for detailed instructions on
baserow    | how to use this Docker image.
baserow    |  [STARTUP][2023-12-09 17:37:10] Running setup of embedded baserow database.
baserow    |  [POSTGRES_INIT][2023-12-09 17:37:10] Becoming postgres superuser to run setup SQL commands:
baserow    |  [POSTGRES_INIT][2023-12-09 17:37:10]
baserow    |  [POSTGRES_INIT][2023-12-09 17:37:10] PostgreSQL Database directory appears to contain a database; Skipping initialization
baserow    |  [POSTGRES_INIT][2023-12-09 17:37:10]
baserow    | mv: cannot move '/baserow/supervisor/includes/disabled/embedded-postgres.conf' to a subdirectory of itself, '/baserow/supervisor/includes/enabled/embedded-postgres.conf'

@gharden91 I copied the contents of your docker-compose file into a fresh docker-compose.yml file and was just successfully able to start Baserow on a fresh Ubuntu server.

Since it says mv: cannot move '/baserow/supervisor/includes/disabled/embedded-postgres.conf' to a subdirectory of itself, '/baserow/supervisor/includes/enabled/embedded-postgres.conf', I suspect there might be something corrupted with your volumes. Could you maybe try the following approach?

  1. Run docker volume ls | grep -i "baserow", this will return the name of your data volume for Baserow, for me it returns baserow_baserow_data
  2. Run docker container prune
  3. Run docker volume rm baserow_baserow_data (or the name of your volume that was returned by the 1st command)
  4. Make sure there’s no Baserow volume available after running docker volume ls | grep -i "baserow"
  5. Make sure there are no active containers already running using docker ps | grep -i "baserow"
  6. Start Baserow again using docker-compose up

I’d be happy to look into your logs after this if the problem still persists.

Thank you for the response! @Eimantas I’ve followed your steps, and to the best of my knowledge all traces of the downloaded container and it’s volume have been removed from my machine. I also tried running the vanilla docker command to start everything up and ran into the same issue.
I’m also running this on the LTS Ubuntu. Here is the output from my terminal.

root@framework:/home/user/DockerStacks/baserow-app# docker volume ls | grep -i "baserow"
local     baserow-app_baserow
root@framework:/home/user/DockerStacks/baserow-app# docker container prune
WARNING! This will remove all stopped containers.
Are you sure you want to continue? [y/N] y
Deleted Containers:
c99c2172468611b8082efcc8779556a257bdb42d707fed98f9586ca4825cfd13

Total reclaimed space: 25.45kB
root@framework:/home/user/DockerStacks/baserow-app# docker volume rm baserow-app_baserow
baserow-app_baserow
root@framework:/home/user/DockerStacks/baserow-app# docker volume ls | grep -i "baserow"
root@framework:/home/user/DockerStacks/baserow-app# docker ps | grep -i "baserow"
root@framework:/home/user/DockerStacks/baserow-app# docker-compose up
Creating volume "baserow-app_baserow" with default driver
Creating baserow ... done
Attaching to baserow
baserow    |  [STARTUP][2023-12-12 18:23:22] No DATABASE_HOST or DATABASE_URL provided, using embedded postgres.
baserow    |  [STARTUP][2023-12-12 18:23:22] Using embedded baserow redis as no REDIS_HOST or REDIS_URL provided.
baserow    |  [STARTUP][2023-12-12 18:23:22] Creating REDIS_PASSWORD secret in /baserow/data/.redispass
baserow    |  [STARTUP][2023-12-12 18:23:22] Importing REDIS_PASSWORD secret from /baserow/data/.redispass
baserow    |  [STARTUP][2023-12-12 18:23:22] Creating SECRET_KEY secret in /baserow/data/.secret
baserow    |  [STARTUP][2023-12-12 18:23:22] Importing SECRET_KEY secret from /baserow/data/.secret
baserow    |  [STARTUP][2023-12-12 18:23:22] Creating BASEROW_JWT_SIGNING_KEY secret in /baserow/data/.jwt_signing_key
baserow    |  [STARTUP][2023-12-12 18:23:22] Importing BASEROW_JWT_SIGNING_KEY secret from /baserow/data/.jwt_signing_key
baserow    |  [STARTUP][2023-12-12 18:23:22] Creating DATABASE_PASSWORD secret in /baserow/data/.pgpass
baserow    |  [STARTUP][2023-12-12 18:23:22] Importing DATABASE_PASSWORD secret from /baserow/data/.pgpass
baserow    | =========================================================================================
baserow    |
baserow    | β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•—    β–ˆβ–ˆβ•—
baserow    | β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘    β–ˆβ–ˆβ•‘
baserow    | β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘ β–ˆβ•— β–ˆβ–ˆβ•‘
baserow    | β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•‘β•šβ•β•β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•  β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘
baserow    | β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β•šβ–ˆβ–ˆβ–ˆβ•”β–ˆβ–ˆβ–ˆβ•”β•
baserow    | β•šβ•β•β•β•β•β• β•šβ•β•  β•šβ•β•β•šβ•β•β•β•β•β•β•β•šβ•β•β•β•β•β•β•β•šβ•β•  β•šβ•β• β•šβ•β•β•β•β•β•  β•šβ•β•β•β•šβ•β•β•
baserow    |
baserow    | Version 1.21.2
baserow    |
baserow    | =========================================================================================
baserow    | Welcome to Baserow. See https://baserow.io/installation/install-with-docker/ for detailed instructions on
baserow    | how to use this Docker image.
baserow    |  [STARTUP][2023-12-12 18:23:22] Running setup of embedded baserow database.
baserow    |  [POSTGRES_INIT][2023-12-12 18:23:25] Becoming postgres superuser to run setup SQL commands:
baserow    |  [POSTGRES_INIT][2023-12-12 18:23:25] CREATE DATABASE
baserow    |  [POSTGRES_INIT][2023-12-12 18:23:25] CREATE ROLE
baserow    |  [POSTGRES_INIT][2023-12-12 18:23:25] GRANT
baserow    |  [POSTGRES_INIT][2023-12-12 18:23:25]
baserow    |  [POSTGRES_INIT][2023-12-12 18:23:25] PostgreSQL init process complete; ready for start up.
baserow    |  [POSTGRES_INIT][2023-12-12 18:23:25]
baserow    | mv: cannot move '/baserow/supervisor/includes/disabled/embedded-postgres.conf' to a subdirectory of itself, '/baserow/supervisor/includes/enabled/embedded-postgres.conf'
baserow exited with code 1
root@framework:/home/user/DockerStacks/baserow-app#

@gharden91 I tried to inspect it, but can’t really understand what’s happening haha, it’s very strange. These directories shouldn’t be a subdirectories of each other unless you have some weird volume cache (which I think it’s not the case) or some weird symlinks, which I don’t think should be the case either.

As a temporary workaround, could you maybe try to change the mv (move) command to cp (copy) and see if it helps? So at baserow/deploy/all-in-one/supervisor/start.sh Line 48 change the command from:

mv "$SUPERVISOR_DISABLED_CONF_DIR/embedded-postgres.conf" "$SUPERVISOR_ENABLED_CONF_DIR/embedded-postgres.conf"

to:

cp "$SUPERVISOR_DISABLED_CONF_DIR/embedded-postgres.conf" "$SUPERVISOR_ENABLED_CONF_DIR/embedded-postgres.conf"

…and see if that helps?

I would advise to clear the container / volumes again just in case. You can wipe out your entire Docker cache (volumes, containers, build cache) using such command:

docker system prune && docker system prune --volumes && docker volume prune && docker image prune -a && docker-compose down -v

@Eimantas To clarify for me as I’m still a bit new to docker. Would you like me to edit these settings in the container? (if so, how? I’ve tried with exec but due to the container starting and stopping so fast I’m not really able to do that.)
Or to try and make a new container from a dockerfile with these modifications?

@gharden91 Sorry for the delayed reply. I made a mistake and now realised you’re launching Baserow directly from the Docker image, so you can’t really edit the code in that way :confused:

Since I can not really reproduce the problem, I have 1 more idea in mind. Are you running Baserow locally or in your server? If it’s the first case, what you could do, is launch the Development version of Baserow. As you can see, this requires cloning the repository, so in that way you could make this small change that I suggested in my previous comment and we could see if that helps. If you’re running Baserow in your server, trying to launch Baserow in your local machine (if it’s successful) would indicate there might be some OS-related errors.

Hey @Eimantas. I switched from running Docker/Docker Compose on Ubuntu to Unraid a few days ago, and Baserow is running just fine right now when I pulled it with the same config. It must’ve been some OS related error that we couldn’t track down. I’m sorry I wasn’t able to test by cloning the repository but thank you so much for all the help!! I really appreciate it!

1 Like