geotekne-argentina / osm-geoserver-postgis

Docker-compose that assembles the necessary components to implement a Geoserver instance that publishes the OpenStreetMap (OSM) layers locally on a single host.
Apache License 2.0
17 stars 6 forks source link

No Such Directory Failures | No tiles in URL #4

Closed LanceMcDermott closed 7 months ago

LanceMcDermott commented 7 months ago

Im getting this when i run the setup-dataset.sh. I went as far as manually adding the LOWres and still I am getting nothing when I localhost the browser for OSM Local. I am able to get to the Geoserver instance and it lists all the layers, but all of them are broken when loading into software as basemaps. using http;//ip:8080/geoserver/wms

[root@localhost ~]# ./osm-geoserver-postgis/setup-datasets.sh ./osm-geoserver-postgis/setup-datasets.sh: line 3: ./config.sh: No such file or directory

Setup High and Low resolution datasets.

----- OSM Low resolution file (./data/geoserver/data_dir/data/osm-lowres-modified.gpkg) does not exist.

----- Download and configure file in data folder. % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 1245M 100 1245M 0 0 8857k 0 0:02:24 0:02:24 --:--:-- 9918k Archive: ./osm-lowres-modified.zip inflating: osm-lowres-modified.gpkg
inflating: README.txt
mv: cannot move ‘./osm-lowres-modified.gpkg’ to ‘./data/geoserver/data_dir/data/osm-lowres-modified.gpkg’: No such file or directory mv: cannot move ‘./README.txt’ to ‘./data/geoserver/data_dir/data/README.txt’: No such file or directory

----- OSM High resolution file (./pbfs/planet-240408.osm.pbf) does not exist.

----- Download and configure file in data folder. curl: no URL specified! curl: try 'curl --help' or 'curl --manual' for more information [root@localhost ~]#

jemacchi commented 7 months ago

hi @LanceMcDermott did you reach to resolve it ? let me know if something can be improved (at least as a logging improvement which makes simple to understand if user missed some step or anything to consider). Best, Jose

LanceMcDermott commented 7 months ago

I was able to resolve that but I’m noticing that if download all of the planet and drop it in the pbfs folder that when I run ./start-up.sh it’s not pulling in the new data showing the whole world, it still just shows the Low RES and the bit that you used. I restarted the Linux VM and ran through it again with the same result. Am I missing a step? Does my manually dropped in data of the planet have to be called selection.osm.pbf?

LanceMcDermott commented 7 months ago

For the logging improvement, I would just change the message the you receive of the set-up process has already been ran and data already downloaded. Right now it just returns something that doesn’t really say “you already did this”.

jemacchi commented 7 months ago

mmm..no, I am quite sure -since you are trying to import the full planet- that what it's happening is that the imposm worker (a docker container which runs imposm to import the pbf into the database) is still executing (or so) and then the database is still not ready. You should see logs in the related container (it will be alive until finish, and once importation is done, the container exits).

Probably I can add some logging/warnings, that will help. (I need to check what to do, considering what is best for the user experience) Thanks for feedback !

LanceMcDermott commented 7 months ago

Okay thanks. I’ll look at the logs. So it will not render any of the new data until all of it has completed?

jemacchi commented 7 months ago

exactly, during the ingestion process imposm will be blocking the database in some way so probably geoserver will see schema, but not data (I'm assuming that it's part of the transactional expected behavior), and for such amount of data, make sense that it will take some time (ie. for me, adding a complete countly like Latvia took about 3-4 minutes, so if during that process I try to access the demo, it does not show anything)

LanceMcDermott commented 7 months ago

I assume this is it building it out?

{"log":"[2024-04-22T13:32:26Z] 0:00:00 [info] reading /pbfs/selection.osm.pbf with data till 2024-04-07 23:59:59 +0000 UTC\n","stream":"stderr","time":"2024-04-22T13:32:26.7989758Z"} {"log":"[2024-04-22T13:33:26Z] 0:01:00 [progress] 1m0s C: 2851000/s (170496000) N: 31000/s (1855098) W: 0/s (0) R: 0/s (0)\n","stream":"stderr","time":"2024-04-22T13:33:26.804937065Z"} {"log":"[2024-04-22T13:34:26Z] 0:02:00 [progress] 2m0s C: 2804000/s (335920000) N: 48900/s (5866112) W: 0/s (0) R: 0/s (0)\n","stream":"stderr","time":"2024-04-22T13:34:26.814655691Z"} {"log":"[2024-04-22T13:35:26Z] 0:03:00 [progress] 3m0s C: 2888000/s (519248000) N: 49000/s (8821847) W: 0/s (0) R: 0/s (0)\n","stream":"stderr","time":"2024-04-22T13:35:26.848714261Z"} {"log":"[2024-04-22T13:36:26Z] 0:04:00 [progress] 4m0s C: 3012000/s (722368000) N: 51800/s (12431307) W: 0/s (0) R: 0/s (0)\n","stream":"stderr","time":"2024-04-22T13:36:26.852323051Z"} {"log":"[2024-04-22T13:37:26Z] 0:05:00 [progress] 5m0s C: 3009000/s (902224000) N: 52900/s (15866175) W: 0/s (0) R: 0/s (0)\n","stream":"stderr","time":"2024-04-22T13:37:26.82193907Z"} {"log":"[2024-04-22T13:38:26Z] 0:06:00 [progress] 6m0s C: 3139000/s (1129504000) N: 50100/s (18034111) W: 0/s (0) R: 0/s (0)\n","stream":"stderr","time":"2024-04-22T13:38:26.825708595Z"} {"log":"[2024-04-22T13:39:26Z] 0:07:00 [progress] 7m0s C: 3217000/s (1350816000) N: 48700/s (20483024) W: 0/s (0) R: 0/s (0)\n","stream":"stderr","time":"2024-04-22T13:39:26.818084386Z"} {"log":"[2024-04-22T13:40:26Z] 0:08:00 [progress] 8m0s C: 3259000/s (1563984000) N: 47200/s (22695445) W: 0/s (0) R: 0/s (0)\n","stream":"stderr","time":"2024-04-22T13:40:27.241851203Z"} {"log":"[2024-04-22T13:41:26Z] 0:09:00 [progress] 9m0s C: 3324000/s (1794272000) N: 47900/s (25870750) W: 0/s (0) R: 0/s (0)\n","stream":"stderr","time":"2024-04-22T13:41:26.831419881Z"} {"log":"[2024-04-22T13:42:26Z] 0:10:00 [progress] 10m0s C: 3347000/s (2007840000) N: 51400/s (30835219) W: 0/s (0) R: 0/s (0)\n","stream":"stderr","time":"2024-04-22T13:42:26.814015416Z"} {"log":"[2024-04-22T13:43:26Z] 0:11:00 [progress] 11m0s C: 3371000/s (2224368000) N: 60900/s (40235916) W: 0/s (0) R: 0/s (0)\n","stream":"stderr","time":"2024-04-22T13:43:26.833592915Z"} {"log":"[2024-04-22T13:44:26Z] 0:12:00 [progress] 12m0s C: 3381000/s (2434208000) N: 61700/s (44420535) W: 0/s (0) R: 0/s (0)\n","stream":"stderr","time":"2024-04-22T13:44:26.814648871Z"} {"log":"[2024-04-22T13:45:26Z] 0:13:00 [progress] 13m0s C: 3431000/s (2675968000) N: 60000/s (46832283) W: 0/s (0) R: 0/s (0)\n","stream":"stderr","time":"2024-04-22T13:45:26.815771073Z"} {"log":"[2024-04-22T13:46:26Z] 0:14:00 [progress] 14m0s C: 3451000/s (2898208000) N: 58900/s (49495034) W: 0/s (0) R: 0/s (0)\n","stream":"stderr","time":"2024-04-22T13:46:26.826296355Z"} {"log":"[2024-04-22T13:47:26Z] 0:15:00 [progress] 15m0s C: 3490000/s (3140560000) N: 57600/s (51865341) W: 0/s (0) R: 0/s (0)\n","stream":"stderr","time":"2024-04-22T13:47:26.820122921Z"} {"log":"[2024-04-22T13:48:26Z] 0:16:00 [progress] 16m0s C: 3520000/s (3378736000) N: 57100/s (54900883) W: 0/s (0) R: 0/s (0)\n","stream":"stderr","time":"2024-04-22T13:48:26.825746831Z"} {"log":"[2024-04-22T13:49:26Z] 0:17:00 [progress] 17m0s C: 3550000/s (3620864000) N: 57000/s (58199130) W: 0/s (0) R: 0/s (0)\n","stream":"stderr","time":"2024-04-22T13:49:26.834996035Z"} {"log":"[2024-04-22T13:50:27Z] 0:18:00 [progress] 18m0s C: 3581000/s (3867616000) N: 55800/s (60336672) W: 0/s (0) R: 0/s (0)\n","stream":"stderr","time":"2024-04-22T13:50:27.072427015Z"} {"log":"[2024-04-22T13:51:26Z] 0:19:00 [progress] 19m0s C: 3613000/s (4118320000) N: 55000/s (62705343) W: 0/s (0) R: 0/s (0)\n","stream":"stderr","time":"2024-04-22T13:51:26.819670789Z"} {"log":"[2024-04-22T13:52:26Z] 0:20:00 [progress] 20m0s C: 3645000/s (4373312000) N: 55100/s (66177654) W: 0/s (0) R: 0/s (0)\n","stream":"stderr","time":"2024-04-22T13:52:26.818710276Z"} {"log":"[2024-04-22T13:53:26Z] 0:21:00 [progress] 21m0s C: 3673000/s (4627872000) N: 55000/s (69375956) W: 0/s (0) R: 0/s (0)\n","stream":"stderr","time":"2024-04-22T13:53:26.811048842Z"} {"log":"[2024-04-22T13:54:26Z] 0:22:00 [progress] 22m0s C: 3692000/s (4873248000) N: 54600/s (72087869) W: 0/s (0) R: 0/s (0)\n","stream":"stderr","time":"2024-04-22T13:54:26.83784777Z"} {"log":"[2024-04-22T13:55:26Z] 0:23:00 [progress] 23m0s C: 3667000/s (5060832000) N: 53500/s (73924122) W: 0/s (0) R: 0/s (0)\n","stream":"stderr","time":"2024-04-22T13:55:27.099658191Z"} {"log":"[2024-04-22T13:56:26Z] 0:24:00 [progress] 24m0s C: 3685000/s (5305824000) N: 53400/s (76973632) W: 0/s (0) R: 0/s (0)\n","stream":"stderr","time":"2024-04-22T13:56:26.825498378Z"} {"log":"[2024-04-22T13:57:26Z] 0:25:00 [progress] 25m0s C: 3681000/s (5520832000) N: 53300/s (80051427) W: 0/s (0) R: 0/s (0)\n","stream":"stderr","time":"2024-04-22T13:57:26.827017594Z"} {"log":"[2024-04-22T13:58:26Z] 0:26:00 [progress] 26m0s C: 3687000/s (5752176000) N: 52800/s (82461572) W: 0/s (0) R: 0/s (0)\n","stream":"stderr","time":"2024-04-22T13:58:26.808975861Z"} {"log":"[2024-04-22T13:59:26Z] 0:27:00 [progress] 27m0s C: 3683000/s (5966240000) N: 52100/s (84418679) W: 0/s (0) R: 0/s (0)\n","stream":"stderr","time":"2024-04-22T13:59:26.818828513Z"} {"log":"[2024-04-22T14:00:26Z] 0:28:00 [progress] 28m0s C: 3705000/s (6223808000) N: 51300/s (86329603) W: 0/s (0) R: 0/s (0)\n","stream":"stderr","time":"2024-04-22T14:00:26.814260281Z"} {"log":"[2024-04-22T14:01:26Z] 0:29:00 [progress] 29m0s C: 3743000/s (6513280000) N: 51300/s (89380690) W: 0/s (0) R: 0/s (0)\n","stream":"stderr","time":"2024-04-22T14:01:26.817781622Z"} {"log":"[2024-04-22T14:02:26Z] 0:30:00 [progress] 30m0s C: 3771000/s (6787856000) N: 52500/s (94626783) W: 0/s (0) R: 0/s (0)\n","stream":"stderr","time":"2024-04-22T14:02:26.82331972Z"} {"log":"[2024-04-22T14:03:26Z] 0:31:00 [progress] 31m0s C: 3797000/s (7063200000) N: 53500/s (99561629) W: 0/s (0) R: 0/s (0)\n","stream":"stderr","time":"2024-04-22T14:03:26.81112256Z"} {"log":"[2024-04-22T14:04:26Z] 0:32:00 [progress] 32m0s C: 3821000/s (7336240000) N: 53000/s (101864259) W: 0/s (0) R: 0/s (0)\n","stream":"stderr","time":"2024-04-22T14:04:26.823053451Z"}

LanceMcDermott commented 7 months ago

By the way greatly appreciate the assistance and the time you took to build out this function. Definitely helps to have basemaps in non-connected environments.

jemacchi commented 7 months ago

yes, that is the kind of log from imposm. Maybe it would be a good idea to check this https://groups.google.com/g/imposm/c/r1DUfJ4uQ1Q?pli=1 since you are trying to ingest same kind of dataset (based on the thread, some tweaks should/could be done in the tools - imposm as much as in postgres - so in that case potentially you will need to start changing/adapting the docker-compose file (or simply - for instance - use a database managed service instead of the containerized postgres instance)

jemacchi commented 7 months ago

By the way greatly appreciate the assistance and the time you took to build out this function. Definitely helps to have basemaps in non-connected environments.

Glad to know that it could help you. Based on same idea -along with opendata - I did a 2nd PoC which did the same work but for satellite (https://github.com/geotekne-argentina/satellite-geoserver/ ) and one that mixed satellite+vector (https://github.com/geotekne-argentina/all-basemaps-geoserver , which I should still document and apply some changes). You can see it in action here https://www.youtube.com/watch?v=PQFKiLogSxM

LanceMcDermott commented 7 months ago

So is this normal? I guess it is now done reading it and is starting to write it?

{"log":"[2024-04-22T14:36:54Z] 1:04:27 [step] Finished: Imposm in 1h4m27.668442074s\n","stream":"stderr","time":"2024-04-22T14:36:54.442992845Z"} {"log":"\n","stream":"stdout","time":"2024-04-22T14:36:54.482600682Z"} {"log":"----------- Running imposm, write to database at osm-geoserver-postgis_postgis\n","stream":"stdout","time":"2024-04-22T14:36:54.482636349Z"} {"log":"[2024-04-22T14:36:54Z] 0:00:00 [warn]: exclude_tags filter is deprecated and will be removed. See require and reject filter.\n","stream":"stderr","time":"2024-04-22T14:36:54.501225644Z"} {"log":"[2024-04-22T14:36:54Z] 0:00:00 [warn]: exclude_tags filter is deprecated and will be removed. See require and reject filter.\n","stream":"stderr","time":"2024-04-22T14:36:54.50127865Z"} {"log":"[2024-04-22T14:36:54Z] 0:00:00 [warn]: exclude_tags filter is deprecated and will be removed. See require and reject filter.\n","stream":"stderr","time":"2024-04-22T14:36:54.501281363Z"} {"log":"[2024-04-22T14:36:54Z] 0:00:00 [warn] pseudoarea type is deprecated and will be removed. See area and webmerc_area type.\n","stream":"stderr","time":"2024-04-22T14:36:54.501283203Z"} {"log":"[2024-04-22T14:36:54Z] 0:00:00 [warn]: exclude_tags filter is deprecated and will be removed. See require and reject filter.\n","stream":"stderr","time":"2024-04-22T14:36:54.501284779Z"} {"log":"[2024-04-22T14:36:54Z] 0:00:00 [warn]: exclude_tags filter is deprecated and will be removed. See require and reject filter.\n","stream":"stderr","time":"2024-04-22T14:36:54.501286328Z"} {"log":"[2024-04-22T14:36:54Z] 0:00:00 [warn] pseudoarea type is deprecated and will be removed. See area and webmerc_area type.\n","stream":"stderr","time":"2024-04-22T14:36:54.501287947Z"} {"log":"[2024-04-22T14:36:54Z] 0:00:00 [step] Starting: Imposm\n","stream":"stderr","time":"2024-04-22T14:36:54.551357598Z"} {"log":"[2024-04-22T14:36:54Z] 0:00:00 [step] Starting: Importing OSM data\n","stream":"stderr","time":"2024-04-22T14:36:54.551382685Z"} {"log":"[2024-04-22T14:36:54Z] 0:00:00 [step] Starting: Writing OSM data\n","stream":"stderr","time":"2024-04-22T14:36:54.551384535Z"} {"log":"[2024-04-22T14:37:54Z] 0:01:00 [progress] 1m0s C: 0/s (0) N: 0/s (0) W: 0/s (0) R: 10/s (860)\n","stream":"stderr","time":"2024-04-22T14:37:54.594675755Z"} {"log":"[2024-04-22T14:38:54Z] 0:02:00 [progress] 2m0s C: 0/s (0) N: 0/s (0) W: 0/s (0) R: 10/s (1545)\n","stream":"stderr","time":"2024-04-22T14:38:54.568364182Z"} {"log":"[2024-04-22T14:39:54Z] 0:03:00 [progress] 3m0s C: 0/s (0) N: 0/s (0) W: 0/s (0) R: 10/s (1816)\n","stream":"stderr","time":"2024-04-22T14:39:54.565028905Z"} {"log":"[2024-04-22T14:40:54Z] 0:04:00 [progress] 4m0s C: 0/s (0) N: 0/s (0) W: 0/s (0) R: 0/s (1993)\n","stream":"stderr","time":"2024-04-22T14:40:54.602219195Z"} {"log":"[2024-04-22T14:41:54Z] 0:05:00 [progress] 5m0s C: 0/s (0) N: 0/s (0) W: 0/s (0) R: 0/s (2566)\n","stream":"stderr","time":"2024-04-22T14:41:54.579773395Z"} {"log":"[2024-04-22T14:42:54Z] 0:06:00 [progress] 6m0s C: 0/s (0) N: 0/s (0) W: 0/s (0) R: 0/s (3258)\n","stream":"stderr","time":"2024-04-22T14:42:54.5925275Z"}

jemacchi commented 7 months ago

yes, now it's writing to db (I would say: check the postgis docker container and how you are mapping the volumes, since it will grow!)

LanceMcDermott commented 7 months ago

for sure. thank you. I will probably work on building the Imagery based one this week as well as the vecor layered one. Great stuff! Have you attempted to download the entire world imagery? I am curious to how large I should make this VM for that instance.

jemacchi commented 7 months ago

check here https://link.storjshare.io/s/jv5m557e5rc2r5yjkl6o7zmfowba/satellite/ . It' a subset of countries/regions based on devs/population rate (and some small ones). The entire world surely is about 500-600GB

LanceMcDermott commented 7 months ago

2024-04-24_09-17-24

LanceMcDermott commented 7 months ago

have you seen this behavior? it appears that its not bringing in the local language as it shows in OSM, just getting those boxes

LanceMcDermott commented 7 months ago

Also, it looks like when I added Asia that it removed all the stuff I had already imported for South America

jemacchi commented 7 months ago

have you seen this behavior? it appears that its not bringing in the local language as it shows in OSM, just getting those boxes

cannot see the attached image (like if it's only visible to you)

jemacchi commented 7 months ago

Also, it looks like when I added Asia that it removed all the stuff I had already imported for South America

you need to setup the imposm behavior to be additive instead of overwritting that is here https://github.com/geotekne-argentina/osm-geoserver-postgis/blob/master/docker-compose.yml#L37-L45 and depends on the PARAMETERS for the worker

LanceMcDermott commented 7 months ago

2024-04-24_09-17-24

LanceMcDermott commented 7 months ago

can you see this?

LanceMcDermott commented 7 months ago

Also, it looks like when I added Asia that it removed all the stuff I had already imported for South America

you need to setup the imposm behavior to be additive instead of overwritting that is here https://github.com/geotekne-argentina/osm-geoserver-postgis/blob/master/docker-compose.yml#L37-L45 and depends on the PARAMETERS for the worker

Okay, I was looking through the documentation and couldnt see the specific PARAMETER to add to the ImpOSM

jemacchi commented 7 months ago

can you see this?

yes, now I can see it. Looks like the renderer (which is the geoserver) is not able to recognize the fonts used for those chars. So I think that probably I would have to add some fonts on the used geoserver container (or change it for a different one). https://github.com/geotekne-argentina/docker-geoserver-flavors

in this line https://github.com/geotekne-argentina/osm-geoserver-postgis/blob/master/docker-compose.yml#L4
to use geotekne/geoserver:lime-buster-2.16.2 and try to see what happen (the version based on Alpine is not including the fonts-hanazono , may be it's that. Note: when moving to buster will increase containers size)

jemacchi commented 7 months ago

Also, it looks like when I added Asia that it removed all the stuff I had already imported for South America

you need to setup the imposm behavior to be additive instead of overwritting that is here https://github.com/geotekne-argentina/osm-geoserver-postgis/blob/master/docker-compose.yml#L37-L45 and depends on the PARAMETERS for the worker

Okay, I was looking through the documentation and couldnt see the specific PARAMETER to add to the ImpOSM

PARAMETERS is just the sequence which will allow you to add explicit things to the imposm-worker https://github.com/geotekne-argentina/imposm-worker

added to execute the pg-import script (on the entrypoint.sh) https://github.com/geotekne-argentina/imposm-worker/blob/main/scripts/import-pg.sh

LanceMcDermott commented 7 months ago

apologies, but I am not a strong script writer, and not sure what I need to do to change the script to make it additive and not remove

LanceMcDermott commented 7 months ago

environment:

LanceMcDermott commented 7 months ago

would adding --merge-cache as shown above solve this?

LanceMcDermott commented 7 months ago

Or is the change in here?

Create importation working files, from PBF file or files (depending on PBF_LOCATION value)

IMPOSM=false if [ -f "$PBF_LOCATION" ]; then echo -e "\n----------- Running imposm, read from pbf" /root/go/bin/imposm import -mapping /scripts/mapping.yml -read $PBF_LOCATION -cachedir work/tmp IMPOSM=true else for pbf in $PBF_LOCATION/*.pbf; do if [ -f "$pbf" ]; then echo -e "\n----------- Running imposm, reading file $pbf" /root/go/bin/imposm import -mapping /scripts/mapping.yml -read $pbf --appendcache -cachedir work/tmp IMPOSM=true fi done fi

jemacchi commented 7 months ago

yes, it's about modifiying that script, and considering the imposm documentation https://imposm.org/docs/imposm3/latest/tutorial.html#deploy-production-tables it will be required to do some adaptation to script

LanceMcDermott commented 7 months ago

ok. Not sure I have the skill set to rewrite that script

jemacchi commented 7 months ago

I will try to do it myself, but be patience. Meanwhile, something that you can do it's to keep all the pbf files in the folder (it will re-run the process several times if you start/stop it, but at least once it's done then pbf files are deleted/moved and so no need to reingest them)

LanceMcDermott commented 7 months ago

okay so I can just move all continents to that folder and if it is interrupted, itll just pick up where it left off? thanks for the assistance

jemacchi commented 7 months ago

yes, exactly. Just remember that you are porting all the info (so you should expect several GBs of data)

LanceMcDermott commented 7 months ago

the documentation for the geoserver made it seem easy. drop .ttf files at /data-dir/styles and recache from geoserver UI, but it doesnt take..

jemacchi commented 7 months ago

hi @LanceMcDermott not sure what you mean about ttf files. Can you share the geoserver documentation link ?Maybe I can point you in right direction.

LanceMcDermott commented 7 months ago

This is the route i tried from teh forum and it didnt work, many report that it doesnt.

https://gis.stackexchange.com/questions/30151/how-do-i-use-custom-fonts-for-labelling-in-geoserver

THis is from geoserver site, but I did not have a fonts folder in any java folders, and adding one didnt work either.

To add custom fonts to the GeoServer, first, you have to download your favorite fonts from the web, then copy them to the “Java installation folder\jre\lib\fonts”. After restarting the Apache Tomcat software, the new fonts will be added to the Available Fonts list.

LanceMcDermott commented 7 months ago

im assuming it ran out of space on the C: drive? I was hoping 300 gigs would cover it.

me\", \"type\", \"tunnel\", \"intermittent\", \"bridge\", \"lock\") FROM STDIN\n","stream":"stderr","time":"2024-04-27T04:52:45.0621765Z"} tail: ‘7ff1c9339958d43d8a6ce52d04be46c6b5aa247ebfc3bea5eb1e08876883979e-json.log’ has become inaccessible: No such file or directory

jemacchi commented 7 months ago

im assuming it ran out of space on the C: drive? I was hoping 300 gigs would cover it.

me", "type", "tunnel", "intermittent", "bridge", "lock") FROM STDIN\n","stream":"stderr","time":"2024-04-27T04:52:45.0621765Z"} tail: ‘7ff1c9339958d43d8a6ce52d04be46c6b5aa247ebfc3bea5eb1e08876883979e-json.log’ has become inaccessible: No such file or directory

hi ! sorry for delay to response. Yes, probably it's the case ! if you tried to use the full world dataset it's a lot of information (you need to consider that you need the pbfs, but then that info is imported into postgres and in middle of process, probably you have logs, and tmp files.

LanceMcDermott commented 7 months ago

Yeah did all that and forgot Europe so starting over on the ingest...sigh

LanceMcDermott commented 6 months ago

I was able to get everything working well but could never sort out the font issue. I tried adding the fonts to the styles folder for geoserver and dumping the cache, but that did nothing and didnt add the Droid Sans to the list.

jemacchi commented 6 months ago

Hi @LanceMcDermott sorry for long delay to answer, but I just needed some spare time to answer you with the solution. Please check this branch: https://github.com/geotekne-argentina/osm-geoserver-postgis/tree/taiwan-example it contains the example which will allow you to understand what changes should be introduced.

In particular, check this PR https://github.com/geotekne-argentina/osm-geoserver-postgis/pull/6 since it explains what was necessary and the considerations. Hopefully, we found (together) a way which will allow not only you -also more people- to understand how to adapt the "solution" for your particular needs (it's not so easy to catch all the pieces and make them working together, that was reason behind sharing this. An initial thing, a kick off which works. A quick win :) .

LanceMcDermott commented 6 months ago

Much appreciated. I understand the space time aspect, so no need to apologize. I was able to get all but the asian countries to work correctly by adding fonts to the current build. I am assuming that swapping the geoserver to buster would require that I reprocess the osm planet again and that will just take too long, the last time took 6 days

jemacchi commented 6 months ago

No, the postgis database should not be touch (it's only a matter of changing the docker image for geoserver). What you should consider is that NOT all the asian countries will work with the same fonts (ie. I tried Bangladesh as initial test and I found that none of the usual fonts that are bundled into the Buster container are the right one for them). So, at that point the only thing you can do it's to add the extra_fonts as mentioned in section "Installing extra fonts" in the Kartoza Geoserver docker documentation (https://hub.docker.com/r/kartoza/geoserver) In short, you should add a new volume in the docker-compose.yaml file with something like this:

And create the folder your-folder at same level than the data folder, and on it add as much ttf files (fonts files) as you want to install (ie. these are the ones for Bangali language https://github.com/shmilon/Bangla-fonts-for-linux ) The docker container then will read that mapped folder with all the fonts and include them at startup time.

Once you have imported the data in postgis, the labeling/rendering issue is a matter of Geoserver understanding how to "draw" the character code using the fonts (what you can check it's which expected encoding is using the OSM data, so you wont be guessing which are the required fonts to install).

LanceMcDermott commented 6 months ago

Okay seems easy. So I just make those changes to the config.sh, docker-compose.yml, and geoserver.env and run ./startup like usual?

LanceMcDermott commented 6 months ago

And the additional font folder dir add for the yml would be something like ./data/geoserver/data_dir/:/opt/fonts or would it be ./opt/fonts

LanceMcDermott commented 6 months ago

followed all the steps and made the changes. I didnt want to pull in Taiwan using config as it would overwrite my previous work. I am seeing the updated geoserver with the larger font pool after running ./startup.sh but the geoserver is completely blank, no layers

jemacchi commented 6 months ago

it's ok to avoid the part of reloading the data. In your case, it's just about changing the docker-compose.yaml file. I think that you are getting no layers, since you are confusing the volumes definition. You need to keep the data_dir as it is and ADD the fonts as an additional mounted folder.

image

You can see it in the capture. You need to keep the data_dir mounted as well as a new folder (local at same level as in the data/ ) which will contain your fonts, as follow image

LanceMcDermott commented 6 months ago

okay that got the geoserver working. last question, hopefully. I am seeing a blank localhost map for 'local' and when I try and do a preview in geoserver it downloads a wms file that states

<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE ServiceExceptionReport SYSTEM "http://10.10.10.13:8080/geoserver/schemas/wms/1.1.1/WMS_exception_1_1_1.dtd"> java.lang.RuntimeException: java.io.IOException java.io.IOExceptionUnable to obtain connection: Cannot create PoolableConnectionFactory (Connection to postgis:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.) Cannot create PoolableConnectionFactory (Connection to postgis:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.) Connection to postgis:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections. Connection refused (Connection refused)

jemacchi commented 6 months ago

no problem about questions It looks like the postgis container is not up and running, can you check that ?

LanceMcDermott commented 6 months ago

2024-05-16_09-39-42