Skip to content

Incorrect PostgreSQL Connection String When Using Unix Sockets with port #28864

Closed
@sdvcrx

Description

@sdvcrx

Description

Hi! I want connect PostgreSQL DB via unix socket.

Based on documentation and #24552 (comment) , I have configured HOST as follows:

DB_TYPE = postgres
HOST = /var/run/postgresql:6432

However, I'm encountering an error during the ORM engine initialization. The error log is as follows:

routers/common/db.go:23:InitDBEngine() [I] Beginning ORM engine initialization.
routers/common/db.go:30:InitDBEngine() [I] ORM engine initialization attempt #1/10...
cmd/web.go:194:serveInstalled() [I] PING DATABASE postgres
routers/common/db.go:36:InitDBEngine() [E] ORM engine initialization attempt #1/10 failed. Error: dial unix /var/run/postgresql:6432/.s.PGSQL.6432: connect: no such file or directory

Gitea Version

1.21.3

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

command-line

Database

PostgreSQL

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions