[Docker] Postgresql init error

Hi brocaar,
I removed all loraserver containers and images, then reinstalled loraserver.
There’re postgresql init error info as follows:

postgresql_1 | LOG: database system was shut down at 2019-07-08 10:11:04 UTC
postgresql_1 | LOG: MultiXact member wraparound protections are now enabled
postgresql_1 | LOG: database system is ready to accept connections
postgresql_1 | LOG: autovacuum launcher started
postgresql_1 | ERROR: type “hstore” does not exist at character 45
postgresql_1 | STATEMENT: alter table device
postgresql_1 | add column variables hstore,
postgresql_1 | add column tags hstore;

Even if I reinstalled loraserver for many times, the errors still exists.

Any suggestions will be greatly appreciated!


Did you also remove the PostgreSQL volume after removing all containers? Note that the first time you spin up the Docker Compose environment, it will initialize the PostgreSQL database.

The following does not remove your PostgreSQL and Redis volumes:

  • docker-compose stop
  • docker-compose rm -f

When you run docker volume ls you will probably see something like:

local               loraserver-docker_postgresqldata
local               loraserver-docker_redisdata

Run docker volume rm loraserver-docker_postgresqldata to remove this PostgreSQL data volume, then do a docker-compose up.

1 Like

Thanks Brocaar.

I cleared all the containers, images, volumes and networks but the problem still exists.

commands that I executed are as follows:

sudo docker stop $(docker ps -a -q)
sudo docker rm $(docker ps -a -q)
sudo docker rmi $(docker images -q)
sudo docker volume prune
sudo docker network prune

Just to confirm, did you pull the latest loraserver-docker changes? More specifically, does your clone contain this file:

@brocaar Thanks very much!
I didn’t pull the latest loraserver-docker changes.

After I pulling the latest loraserver-docker changes, now it works fine.