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

PgSQL SSL and PgSQL dsn hostname. #437

Open
volga629-1 opened this issue Oct 5, 2020 · 1 comment
Open

PgSQL SSL and PgSQL dsn hostname. #437

volga629-1 opened this issue Oct 5, 2020 · 1 comment

Comments

@volga629-1
Copy link

volga629-1 commented Oct 5, 2020

Hello Everyone,
I need assistant with following issues.

1 PgSQL driver set to sslmode=disable is possible it make configurable with values according postgres ssl client.

In database/database.go

 dsn = "sslmode=disable connect_timeout=4" +
                        " host=" + addr[0] +
                        " port=" + addr[1] +
                        " dbname=" + dbName +
                        " user=" + config.Setting.DBUser +
                        " password=" + config.Setting.DBPass

2 FQDN is correct form in database connection in dsn, but connection is rejected .
In database/database.go

func ConnectString(dbName string) (string, error) {
        var dsn string
        driver := config.Setting.DBDriver
        addr := strings.Split(config.Setting.DBAddr, ":")
        if len(addr) != 2 {
                return "", fmt.Errorf("wrong database connection format: %v, it should be localhost:3306", config.Setting.DBAddr)
        }

  1. Rotator.go is not follow config file for database connection start.
Oct 06 02:23:17 voice-diag /usr/bin/heplify-server[64948]: rotator.go:352: dial tcp [::1]:5432: connect: connection refused
Oct 06 02:23:17 voice-diag /usr/bin/heplify-server[64948]: rotator.go:355: dial tcp [::1]:5432: connect: connection refused

@nathanleyton
Copy link

+1 on this, our db requires ssl which is preventing us form using homer atm. Thanks

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

2 participants