Azure-Samples / Azure-Samples/rag-postgres-openai-python
[HELP] - unable to connect to db using psql or pgadmin
- Lingua principale
- Python
- Stelle
- 505
- Fork
- 1.1k
- Merge medio
- 3g 13h
- PR unite (30g)
- 1
Descrizione
I was running the demo in **codespace**
I followed the guide to export the token generated as password
`export PGPASSWORD={"eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI...........VPNUlKeXlxUjZqekRTNWlBYnBlNDJKdyJ9"}`
and then run the following
`$ psql -h $(azd env get-value POSTGRES_HOST) -U $(azd env get-value POSTGRES_USERNAME) -d $(azd env get-value POSTGRES_DATABASE) -p 5432`
but getting this error:
```
psql: error: connection to server at "justin-test-3a*****bi-postgresql.postgres.database.azure.com" (172.177.167.194), port 5432
failed: FATAL: The access token has invalid format.
Please ensure the token is passed exactly as returned by the authentication endpoint and retry.
connection to server at "justin-test-3a******zbi-postgresql.postgres.database.azure.com" (172.177.167.194), port 5432
failed: FATAL: no pg_hba.conf entry for host "20.227.141.210", user "adminupjcfh45d******" database "postgres", no encryption
```
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Non sono identificati file del repository né test. Inizia riproducendo la connessione psql mostrata dal Codespace con i valori dell’ambiente azd, quindi confronta gli errori di autenticazione e crittografia con i passaggi token-export della guida. Il lavoro è completato quando il metodo di connessione documentato funziona oppure la guida spiega chiaramente la correzione necessaria.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- azure, postgresql
- Ambito
- cloud, databases
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 25/100