Ircama / osm-carto-tutorials

OpenStreetMap Carto Tutorials - Unofficial guides for openstreetmap-carto
https://ircama.github.io/osm-carto-tutorials/
GNU General Public License v3.0
28 stars 9 forks source link

Error at Load data to PostGIS #13

Closed MajidDehnamaki closed 1 year ago

MajidDehnamaki commented 5 years ago

hi i have problem when i run this command : osm2pgsql -s -C 300 -c -G --hstore --style openstreetmap-carto.style --tag-transform-script openstreetmap-carto.lua -d gis -H $HOSTNAME -U postgres [.osm or .pbf file] , i see this error: Allocating memory for dense node cache Allocating dense node cache in one big chunk Allocating memory for sparse node cache Sharing dense sparse Node-cache: cache=300MB, maxblocks=4800*65536, allocation method=11 Mid: pgsql, cache=300 Setting up table: planet_osm_nodes Connection to database failed: fe_sendauth: no password supplied Error occurred, cleaning up

what can i do?

Ircama commented 5 years ago

It looks a security issue. I think you should try fixing fe_sendauth: no password supplied error.

Did you follow the tutorial step by step?

MajidDehnamaki commented 5 years ago

It looks a security issue. I think you should try fixing fe_sendauth: no password supplied error.

Did you follow the tutorial step by step?

yes

Ircama commented 5 years ago

It looks like a PostgreSQL configuration issue. Did you create the postgres user with the same password you are using to access the database? Did you set the environment variables?

MajidDehnamaki commented 5 years ago

yes,i did everything let me do all step one more time in new server

mw-mjobtime commented 4 years ago

I managed to work around the issue by removing the PGUSER, PGPASSWORD, PGHOST, and PGPORT variables and every single reference to them. I had to edit trim_osc.py to not attempt to use them. The problem seems to be that local connections to pgsql from the osm account don't need to be validated. Attempting to do so will fail. These values would be needed if running the script from another machine.