3

I am using OSGeo Live. It is an Ubuntu system. I installed it in my PC. I was following one pgRouting workshop.

https://workshop.pgrouting.org/index.html

In one step, I needed to connect osm2pgrouting with postgis to import data. But, the commands are not working. It is showing following connection fail error. I did not change anything. All the passwords are as default.

$ osm2pgrouting -file "data/sampledata.osm" \
> -conf "/usr/share/osm2pgrouting/mapconfig.xml" \
> -dbname routing \
> -user postgres \
> -clean
host=127.0.0.1 user=postgres dbname=routing port=5432
connection failed
$

I tried to fix it. I edited /etc/postgresql/8.4/main/pg_hba.conf, and change the postgres connection method to trust from indent. But, it does not work. The result is same, as before.

# Database administrative login by UNIX sockets
# indent
local all postgres trust
Pang
2151 silver badge8 bronze badges
asked Apr 23, 2012 at 18:31

1 Answer 1

1

Which OS are you on.

local means none ip connection, socket connection. That said you may want to add the below since you are connection by ip.

host all all 127.0.0.1/32 trust

For ipv6 connection you would need:

host all all ::1/128 trust

(windows 7 for example usually tries to make an ipv6 connection when you put localhost or 127.0.0.1.

Also don't forget you need to do a config reload for settings to take effect

pg_ctl reload

or if you can't find that just restart your postgresql service.

urcm
22.6k4 gold badges59 silver badges109 bronze badges
answered Apr 28, 2012 at 15:51

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.