ich versucht, die Schienen-Server starten und dessen geben die folgende Ausgabe:Postgres PG :: ConnectionBad Fehler kommen beim Start Schienen Server
[email protected]:~/work/code/$ rails s
=> Booting Puma
=> Rails 3.2.22 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
Exiting
/home/neha/.rvm/gems/[email protected]/gems/activerecord-3.2.22/lib/active_record/connection_adapters/postgresql_adapter.rb:1222:in `initialize': FATAL: no pg_hba.conf entry for host "[local]", user "postgres", database "dev2", SSL off (PG::ConnectionBad)
Wenn ich versuche, den postgresql-Dienst starten seine den folgenden Fehler geben:
[email protected]:~/work/code/$ sudo service postgresql start
* Starting PostgreSQL 9.3 database server * Error: Port conflict: another instance is already running on /var/run/postgresql with port 5432
[fail]
Meine /etc/postgresql/9.3/main/pg_hba.conf Datei ist als:
# Database administrative login by Unix domain socket
local all postgres md5
# TYPE DATABASE USER ADDRESS METHOD
# "local" is for Unix domain socket connections only
local all all peer
# IPv4 local connections:
host all all 127.0.0.1/32 md5
# IPv6 local connections:
host all all ::1/128 md5
# Allow replication connections from localhost, by a user with the
# replication privilege.
#local replication postgres peer
#host replication postgres 127.0.0.1/32 md5
#host replication postgres ::1/128 md5
Wird auch überprüft, indem der laufende Prozess an Port 5432 wie folgt abgebrochen wird:
[email protected]:~/work/code/lms(ac-99)$ sudo lsof -t -i:3000
[email protected]:~/work/code/lms(ac-99)$ sudo lsof -t -i:5432
9981
[email protected]:~/work/code/lms(ac-99)$ sudo kill -9 9981
[email protected]:~/work/code/lms(ac-99)$ sudo service postgresql start
* Starting PostgreSQL 9.3 database server * Error: Port conflict: another instance is already running on /var/run/postgresql with port 5432
Kann mir bitte jemand eine Lösung vorschlagen.
Ich habe keine Ausgabe für lsof -i: 3000 Befehl – Neha
ohhh dann Schienen s sollte funktionieren !!! ok .. versuchen Sie "$ netstat -tulpn" diesen Befehl zu verwenden. –
Ich habe meine Frage bearbeitet. – Neha