Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I can't change postgresql port #459

Closed
diegows opened this issue Jul 30, 2015 · 7 comments
Closed

I can't change postgresql port #459

diegows opened this issue Jul 30, 2015 · 7 comments
Assignees

Comments

@diegows
Copy link

diegows commented Jul 30, 2015

I need to change the port where Chef's PostgreSQL is listening but it fails. I've added the options "postgresql['port'] = 6432" to the chef-server.rb. chef-server-ctl reconfigure fails, because there are some resources in the recipes that use the psql command without getting the port information from somewhere.

@marcparadise
Copy link
Member

There were some recent changes merged into the CHef Server nightlies that should correct this. Is it an option for you to grab a nightly and confirm?

@marcparadise
Copy link
Member

I forgot to include the actual location (assumes ubuntu): https://packagecloud.io/chef/current/packages/ubuntu/trusty/chef-server-core_12.2.0+20150730143118-1_amd64.deb

@diegows
Copy link
Author

diegows commented Jul 30, 2015

I've tried with this package chef-server-core-12.2.0+20150730184117-1.el6.x86_64.rpm and no luck.

[2015-07-30T23:22:30+00:00] FATAL: PG::ConnectionBad: private_chef_pg_database[opscode-pgsql] (private-chef::postgresql line 137) had an error: PG::ConnectionBad: could not connect to server: Connection refused
    Is the server running on host "127.0.0.1" and accepting
    TCP/IP connections on port 6432?
# cat /etc/opscode/chef-server.rb 
postgresql["port"] = 6432

I've tried to specify the new port before running reconfigure the first time, and then (in a fresh instance) I ran reconfigure, modified the port and ran the reconfigure again with the same results.

@auroaj
Copy link

auroaj commented Jul 31, 2015

This files contain commands without port specify:

/opt/opscode/embedded/cookbooks/private-chef/providers/pg_database.rb
/opt/opscode/embedded/cookbooks/private-chef/libraries/ec_postgres.rb
/opt/opscode/embedded/cookbooks/private-chef/recipes/bifrost_database.rb

I changed it manually and it is work sometimes...
But I want to change it from chef recipe and I can't reach work result.

chef-server 12.1.0

@marcparadise marcparadise self-assigned this Aug 31, 2015
@tylercloke
Copy link
Contributor

Bootstrap is definitely also broken for non-default ports, can make a PR soon:

https://github.com/chef/chef-server/blob/master/src/chef-server-bootstrap/bin/bootstrap-platform#L41

@auroaj
Copy link

auroaj commented Sep 18, 2015

As I understand the code, postgresql['port'] used to specify external postgres instance, not chef embedded.
It means that we can't setup embedded postgres to non-standard port.

@marcparadise
Copy link
Member

This fix will be in the next package pushed to chef/current on packagecloud.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants