chef / chef/chef-server

knife ec backup errors out with ERROR: Sequel::DatabaseConnectionError: PG::ConnectionBad: FATAL: no pg_hba.conf entry for host "::1", user "opscode_chef", database "opscode_chef", SSL off

Open
#1,371 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Component: others Status: Consider for next release Triage: Try Reproducing Type: Bug
Dominant language
Erlang
Stars
303
Forks
211
Avg merge
1d 8h
Merged PRs (30d)
5

Description

Trying to take a backup on LIVE chef server version 12.8.0 , using:
as root

# export PATH=/opt/opscode/embedded/bin:$PATH
#  knife ec backup backup_aug14_141PM --with-user-sql --with-key-sql -c /etc/opscode/pivotal.rb --sql-host 127.0.0.1 > backup_aug14_141PM.log

Expected Behavior

Data Backed up

Current Behavior

[root@ip-10-103-137-6 vsdeshmu]# knife ec backup backup_8_14_2017_11-AM  --with-user-sql --with-key-sql -c /etc/opscode/pivotal.rb | tee backuplog_8142017_110am.log
ERROR: Sequel::DatabaseConnectionError: PG::ConnectionBad: FATAL:  no pg_hba.conf entry for host "::1", user "opscode_chef", database "opscode_chef", SSL off

Your Environment

  • Chef Server Version:
  • Total/free RAM and disk space:

[root@ip-10-103-137-6 DATA-BACKUP]# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/xvda1 82437788 10704252 67540232 14% /
tmpfs 7648808 0 7648808 0% /dev/shm
/dev/mapper/chef-data
263056452 1415396 248271920 1% /var/opt/opscode/drbd/data

  • Operating System and Version:
    LSB Version: :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
    Distributor ID: RedHatEnterpriseServer
    Description: Red Hat Enterprise Linux Server release 6.7 (Santiago)
    Release: 6.7
    Codename: Santiago
  • If upgrading, previous Chef Server version:
  • Running in a container? no

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the reported knife ec backup command, including --with-user-sql, --with-key-sql, --sql-host 127.0.0.1, and /etc/opscode/pivotal.rb, then reproduce the PG::ConnectionBad failure. Trace how the backup connects to the opscode_chef database and verify the backup completes without the pg_hba.conf error.

Written by the indexing model from the issue text.

Assessment

Tech stack
postgresql
Domain
cli, database
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.