我在Ubuntu 12.04上使用Open Source Chef 11.0.10.这是Postgresql和Apache已经运行的共享服务器,所以我正在尝试自定义Chef端口号.
我创建了文件/etc/chef-server/chef-server.rb,其中包含以下行:
Nginx['ssl_port'] = 8443 postgresql['port'] = 5433
当我执行命令时:
sudo chef-server-ctl reconfigure
它失败了:
execute[/opt/chef-server/embedded/bin/createdb -T template0 -E UTF-8 opscode_chef] action run
并且错误消息说:
---- Begin output of /opt/chef-server/embedded/bin/createdb -T template0 -E UTF-8 opscode_chef ---- STDOUT: STDERR: createdb: Could not connect to database template1: Could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/tmp/.s.PGsql.5432"? ---- End output of /opt/chef-server/embedded/bin/createdb -T template0 -E UTF-8 opscode_chef ----
现在,除了原始实例之外,Postgresql的Chef实例似乎也在运行:
$ps -ef | grep postgresql | grep -v grep postgres 1000 1 0 09:14 ? 00:00:00 /usr/lib/postgresql/9.1/bin/postgres -D /var/lib/postgresql/9.1/main -c config_file=/etc/postgresql/9.1/main/postgresql.conf root 4830 4421 0 09:46 ? 00:00:00 runsv postgresql root 4831 4830 0 09:46 ? 00:00:00 svlogd -tt /var/log/chef-server/postgresql 998 5579 4830 0 09:49 ? 00:00:00 /opt/chef-server/embedded/bin/postgres -D /var/opt/chef-server/postgresql/data
我错过了什么?
更多细节:
我曾使用omnibus包进行初始的Chef-server安装:
https://opscode-omnibus-packages.s3.amazonaws.com/ubuntu/12.04/x86_64/chef-server_11.0.10-1.ubuntu.12.04_amd64.deb
它在同一步骤完成之前失败并出现相同的错误,因为它正在尝试使用已经在使用的默认Postgresql端口.
并且Chef Postgresql实例正在运行:
$sudo /opt/chef-server/embedded/bin/sv status postgresql run: postgresql: (pid 5579) 86034s; run: log: (pid 4831) 86158s
解决方法
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。