我正在尝试为 Rubber 构建一个 Docker 镜像,但是在 dbconfig-common 对话框中出现此错误。
unable to connect to postgresql server.
error encountered creating user:
psql: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
还尝试了DEBIAN_FRONTEND=noninteractive
选项,但出现了同样的错误:尝试了这个,但出现了同样的错误:
`Setting up rsyslog-pgsql (7.4.4-1ubuntu2.6rudder1) ...
dbconfig-common: writing config to /etc/dbconfig-common/rsyslog-pgsql.conf
Creating config file /etc/dbconfig-common/rsyslog-pgsql.conf with new version
Creating config file /etc/rsyslog.d/pgsql.conf with new version
unable to connect to postgresql server.
error encountered creating user:
psql: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
dbconfig-common: rsyslog-pgsql configure: noninteractive fail.
dbconfig-common: rsyslog-pgsql configure: ignoring errors from here forwards`
我在 Ubunbu 14.04 Docker 镜像中使用 Rudder 4.1。
答案1
这解决了这个问题:
sudo apt-get remove --purge postgresql-9.3
sudo apt-get install postgresql-9.3
sudo apt-get install -y rudder-server-root
我不知道为什么,但它确实有效。
答案2
您应该使用默认值,并且在 rsyslog-pgsql 对话框弹出时不输入任何内容。
Rudder 包将确保它在安装后正确配置。
在我们的测试过程中,我们总是使用以下命令安装软件包
export DEBIAN_FRONTEND=noninteractive
apt-get -y install rudder-server-root