I don't know how to stop the server.

Asked 2 years ago, Updated 2 years ago, 95 views

Thank you for your help.
Rails server does not work.
I used nodejs before, so I think it's probably because of that's why.
I want to stop nodejs, but I don't know.I am using CentOS with Virtualbox.

Console (Error in Rails)

Couldn't create database for {"adapter"=>"postgresql", "pool"=>5, "timeout"=>5000, "host"=>"localhost", "database"=>"db/test.pg"}
rake aborted!
PG:: ConnectionBad: could not connect to server: Connection refused
    Is the server running on host "localhost"(::1) and accepting
    TCP/IP connections on port 5432?
could not connect to server —Connection refused
    Is the server running on host "localhost" (127.0.0.1) and accepting
    TCP/IP connections on port 5432?

Tasks: TOP=>db:migrate

Console

40 2395 1313 200 96080 3816 unix_s Ss?0:00 sshd:vagrant [priv]
5501 2397 2395 2000 96080 2168 poll_s S?0:00 sshd:vagrant@pts/0
0 5012398 2397 200 112632 2028 wait Spspts / 00:00-bash
10 2425 1 200 17296 652 rt_sig Ss?0:00/usr/sbin/anacron-s
0 501 2439 2398 200 108128 1032-R+pts/00:00 ps alx

I couldn't delete it with kill2439, what should I do?
Thank you for your cooperation.

ruby-on-rails node.js

2022-09-30 20:50

2 Answers

Failed to connect to PostgreSQL.Make sure PostgreSQL is up and configured to connect over the network.


2022-09-30 20:50

node.js is innocent and seems to have other causes.

Does AVC appear in /var/log/audit/audit.log?
I don't know how you installed CentOS, but the source is that apache is not allowed to actively open the port, so if you want to connect to DB, you must allow it yourself.

CentOS 7

#setsebool-P httpd_can_network_connect1

Why don't you try ?


2022-09-30 20:50

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.