ruby on rails - host can not recognized in postgres -


we have seen issue in log

fatal:  lock file "/tmp/.s.pgsql.5432.lock" exists hint:  postmaster (pid 4696) using socket file "/tmp/.s.pgsql.5432"? log:  not bind ipv4 socket: address in use 

we have deleted /tmp/.s.pgsql.5432.lock

we restarted postgres service service restarted

but psql -h localhost -d database -u newuser

shows error role 'newuser' not exists

but if connect without host

psql -d database -u newuser 

it worked, how can work host options ?

is there ,missing somthing after deleting tmp file?

same last one, have 2 instances of postgresql running on machine.

you delete socket file rather shutting down instance. allows second instance start, it's listening on unix socket. presumably listen_addresses unset/empty doesn't attempt bind tcp/ip socket, since it'd fail if tried , port 5432 in use.

the other instance still running , still listening on port 5432 tcp/ip connections. when specify -h localhost tcp/ip connection instead of default unix socket connection, connecting other instance of postgresql on system.

all problems caused going around deleting , killing things rather identifying underlying problem - second postgresql instance - , addressing that.


Comments

Popular posts from this blog

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -

YouTubePlayerFragment cannot be cast to android.support.v4.app.Fragment -