Code Monkey home page Code Monkey logo

Comments (7)

gelbander avatar gelbander commented on June 14, 2024 6

Try adding the following environment variable in db-deployment.yaml.

- name: POSTGRES_HOST_AUTH_METHOD
  value: trust

from example-voting-app.

feriva22 avatar feriva22 commented on June 14, 2024 1

If you install postgres with minimum version 12, u must add argument for authentication encryption method to md5 , u can add this environtment variable to postgres deployment file
name: POSTGRES_INITDB_ARGS
value: "--auth-host=md5 --auth-local=md5"

from example-voting-app.

mluelmo avatar mluelmo commented on June 14, 2024 1

If you install postgres with minimum version 12, u must add argument for authentication encryption method to md5 , u can add this environtment variable to postgres deployment file name: POSTGRES_INITDB_ARGS value: "--auth-host=md5 --auth-local=md5"

I've solved worker to db connection issues after adding this env variable. Thanks @feriva22

worker log showed this message:

System.NotSupportedException: Authentication method not supported (Received: 10)
at Npgsql.NpgsqlConnector.ParseServerMessage(ReadBuffer buf, BackendMessageCode code, Int32 len, DataRowLoadingMode dataRowLoadingMode, Boolean isPrependedMessage)
at Npgsql.NpgsqlConnector.DoReadMessage(DataRowLoadingMode dataRowLoadingMode, Boolean isPrependedMessage)
at Npgsql.NpgsqlConnector.ReadMessageWithPrepended(DataRowLoadingMode dataRowLoadingMode)
at Npgsql.NpgsqlConnector.HandleAuthentication(String username, NpgsqlTimeout timeout)
at Npgsql.NpgsqlConnector.Open(NpgsqlTimeout timeout)
at Npgsql.ConnectorPool.Allocate(NpgsqlConnection conn, NpgsqlTimeout timeout)
at Npgsql.NpgsqlConnection.OpenInternal()
at Worker.Program.OpenDbConnection(String connectionString) in /code/src/Worker/Program.cs:line 78
at Worker.Program.Main(String[] args) in /code/src/Worker/Program.cs:line 19

from example-voting-app.

thejordanclark avatar thejordanclark commented on June 14, 2024

I'm getting the same error.

from example-voting-app.

prabhatsingh014 avatar prabhatsingh014 commented on June 14, 2024

With the given yamls, worker-app uses the db credentials "postgres:postgres", so you'll need to specify two environment variables with the db (postgres) deployment i.e. POSTGRES_USER: postgres and POSTGRES_PASSWORD: postgres.
Once that's done, worker-app will automatically connect to the db.

from example-voting-app.

mumong avatar mumong commented on June 14, 2024

With the given yamls, worker-app uses the db credentials "postgres:postgres", so you'll need to specify two environment variables with the db (postgres) deployment i.e. POSTGRES_USER: postgres and POSTGRES_PASSWORD: postgres. Once that's done, worker-app will automatically connect to the db.

this is right i fix my problem by doing this. add two environment postgres name and postgres password to connect postgres,so the db container will run consistantly without exited.
db:
image: postgres:9.4
environment:
POSTGRES_USER: "postgres"
POSTGRES_PASSWORD: "postgres"
them docker-compose up

from example-voting-app.

BretFisher avatar BretFisher commented on June 14, 2024

We're sorry for the late response. Linux images have been refreshed, cleaned up, and are now multi-platform. If you're still having issues with the latest images, feel free to reopen this ticket.

from example-voting-app.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.