Overv / openstreetmap-tile-server

Docker file for a minimal effort OpenStreetMap tile server
Apache License 2.0
1.2k stars 482 forks source link

Could not start the internal postgreSQL of arm64 images when import data. #389

Open ztistic opened 1 year ago

ztistic commented 1 year ago

it says that the configuration file "/etc/postgresql/15/main/postgresql.conf" contains errors, but the file was generated by the docker image, I didn't change the configuration file.

The script

docker run \
    -it \
    --rm=true \
    --privileged=true \
    -v /home/docked/osm-ts/yunnan.osm.pbf:/data/region.osm.pbf \
    -v /file/osm-ts/data:/data/database \
    overv/openstreetmap-tile-server \
    import

The output

+ service postgresql start
 * Starting PostgreSQL 15 database server                                                                                          * Error: /usr/lib/postgresql/15/bin/pg_ctl /usr/lib/postgresql/15/bin/pg_ctl start -D /var/lib/postgresql/15/main -l /var/log/postgresql/postgresql-15-main.log -s -o  -c config_file="/etc/postgresql/15/main/postgresql.conf"  exited with status 1:
2023-09-13 02:35:28.331 GMT [46] LOG:  could not open configuration file "/etc/postgresql/15/main/conf.d/postgresql.custom.conf": Permission denied
2023-09-13 02:35:28.331 GMT [46] FATAL:  configuration file "/etc/postgresql/15/main/postgresql.conf" contains errors
pg_ctl: could not start server
Examine the log output.

image

Alireza002L9 commented 4 months ago

could you find the solution?

ztistic commented 4 months ago

could you find the solution?

Sorry, I have forgotten whether this problem has been solved or not. I'm pretty sure this problem occurs on servers with arm64 architecture, but not on servers with x86 architecture.

ztistic commented 4 months ago

sorry clicked wrong button.

Istador commented 4 months ago

Does it maybe work if you build and use the image yourself on the target arm64 machine instead of using the provided image that was build in an emulated environment on an amd64 machine?

git  clone  https://github.com/Overv/openstreetmap-tile-server.git
cd  openstreetmap-tile-server
docker  build  -t overv/openstreetmap-tile-server  .