콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
4 답글
41732 화면

I got issue in my odoo 13 conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
psycopg2.OperationalError: could not connect to server: Connection refused
Is the server running on host "localhost" (127.0.0.1) and accepting
TCP/IP connections on port 5432?

How can i solve this problem.Yesterday was everything working fine.

아바타
취소
베스트 답변

Goto Postgres Conf file pg_hba.conf and add your Postgres user in the format of

host    <user name>   <ip/network>   md5

For Example, create a new Postgres user odoo and add it section after Linux/UNIX domain.

Follow these steps:

  • Make a backup copy of the pg_hba.conf file before you alters it.
  • If the PostgreSQL postmaster is already running, stop it using the pg_ctl stop command or windows defined way.  
  • Open the pg_hba.conf file in a text editor. 
  • Here my IP is a default and not configured any extra. So using localhost/127.0.0.1 and update

  • # "local" is for Unix domain socket connections only, Here accepts all users and ips with peer auth
    local all all peer
    # Windows with new User odoo, all ips, with auth trust
    host all             odoo trust
    # IPv4 local connections:
    host all all 127.0.0.1/32 md5
  • you can change the auth method as md5/trust with a new user. The authentication method varies according to your needs. I can share with you the basic PSQL Windows deployment DOC.

    WIndows Postgres Deployment

    TO know more about the Postgres configuration file, please refer here

    https://www.postgresql.org/docs/9.3/auth-pg-hba-conf.html

    https://desktop.arcgis.com/en/arcmap/10.3/manage-data/gdbs-in-postgresql/configure-postgresql-accept-connections.htm


    아바타
    취소
    베스트 답변

    Hi,

    Please check the answer given by Ermin here in this question and update the pg_hba.conf file accordingly: Is the server running on host "localhost" (127.0.0.1) and accepting TCP/IP connections on port 5432?

    Thanks

    아바타
    취소
    작성자

    not working for me

    베스트 답변

    i have the same issue at linux environment i edited the pg_hpa.conf and it didn't work could anyone tell me the correct way to edit it (the line i should add and where should i add it exactly ) because I'm new to programming

        conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
    psycopg2.OperationalError: could not connect to server: Connection refused
        Is the server running on host "localhost" (127.0.0.1) and accepting
        TCP/IP connections on port 5432? - - -



    아바타
    취소
    관련 게시물 답글 화면 활동
    0
    8월 22
    1714
    0
    8월 23
    1650
    3
    5월 24
    8268
    1
    3월 15
    5832
    0
    2월 22
    6947