I have been setup an authentication with Postgresql 12 using gssAPI on centos.I follow an example :https://paquier.xyz/manuals/postgresql/kerberos/ .But when i finish and run to conect with gssapi:
"psql -U "postgres/myrealm.example#MYREALM.EXAMPLE" -h myrealm.example postgres"
and i met an error :
psql: FATAL: could not accept GSSAPI security context
FATAL: accepting GSS security context failed
DETAIL: Unspecified GSS failure. Minor code may provide more information: Key table entry not found
I want to know if I'm missing any configuration steps/commands or implementing something wrong.Any kind help is highly appreciated. Thanks in advance.
Reason for problem
I ran into this same issue and spent a couple days debugging it. The issue ended up being that PostgreSQL was not configured to use the keytab that I thought I was using.
I had tried putting my keytab in the following locations:
/etc/krb5.keytab
/usr/local/pgsql/etc/krb5.keytab
And I tried setting the following in /var/lib/postgresql/data/postgresql.conf:
krb_server_keyfile = /etc/krb5.keytab
This should have worked, but I think because I was using PostgreSQL through a Docker container, the config wasn't being honored properly. I also tried doing a SHOW ALL query which also showed the expected entry of krb_server_keyfile = /etc/krb5.keytab
Solution
Finally, I set the environment variable KRB5_KTNAME=/etc/krb5.keytab and then my keytab got used.
Related
I just install Strapi but with PostgreQL DB (not using -- quickstart which means SQLite)
1. yarn create strap'-app name-of-my-project,
2. submit all QA=default step-by-step (database=strapi, port=default, login/password nothing fancy, and last without SSL connection)
And the finall result is not so descriptive. Only server error with connecting, which I don't know
Connection test failed: connect ECONNREFUSED 127.0.0.1:5433
Problem solved! (after 2 hours of trying instalation)
The answer is => You have to install PostgreSQL DB too on your computer
Once its done, next, you can run Strapi by yarn develop
So the problem is solved. Other problem in meantime solved
`Server wasn't able to start properly. Error: The server does not support SSL connections. Try to install without SSL connection (last question in Strapi install process)
I know you resolved the issue but just posting this in case anybody needs specific instructions.
I followed this tutorial and it's working for me now.
Sidenote: Once I installed Postgres and ran the command psql postgres it prompted me to enter my password. Despite putting in the correct password it still gave me an error that it is the wrong password, so I ran psql postgres postgres and then entering my password resolved the issue for me.
Instead of downloading postgres you can apply docker and it works the same
Link: https://blog.dehlin.dev/docker-with-strapi-v4
I had the same problem and as Kris says above, you need to install postgresql, pgAdmin and create the database first to then can create your Strapi project linked to you database.
I followed this youtube tutorial (in spanish) to solve it very easy.
Also need to avoid enable SSL for your local project. If you need to change this option in the future you can make it in the strapi config/database.js file.
Good luck!
I am a new user of PostgreSQL, and I am learning it so that I can use it with Django, so I am trying to use the createdb command to create a new database, but even though I am entering the correct password for my account, I am getting this error. I reinstalled everything and checked everything I could think of but I was not able to solve this error. So, if I can get some help regarding this issue it would be nice.
Even using the command psql, and submitting the correct password, gives the same error.
I am using Windows 10.
As far as I checked, I needed to enter the password I used while installing PostgreSQL.
By the way, I am using the latest version of PostgreSQL 14.1
The command I used:
createdb testdatabase
createdb: error: connection to server at "localhost" (::1), port 5432 failed:
FATAL: password authentication failed for user "<username_placeholder>"
So, basically, I figured the solution myself. I am just posting it here because mostly answers are available for Linux and not Windows. So, if a windows user has a similar problem, maybe this answer could help them.
So, the first thing is, if you need to open psql, use the command:
psql -U postgres
and then enter the password you used while installing PostgreSQL. Now, if you wish to do something similar to what I tried, what I mean is to use createdb command in the terminal itself, then you will have to create a new user using the same username as you do for your PC, like in my case, it is aryan.
(For example: C:\Users\aryan\).
I followed instructions from this website.
I personally used pgAdmin 4 to do it, you could also use the SQL commands themselves.
After doing everything, when I used the createdb command directly from the terminal/powershell, it asked my the password which I had used to create the other user( with the same username as my system/pc) using pgAdmin 4. That's it. This helped me out.
So I'm using postgresql 13 and SQL Workbench on Windows 10 for the first time. I'm trying to connect the database to the server to no avail. I keep getting this error message: FATAL: password authentication failed for user postgres [SQL State=28P01]. From Stack Overflow and other documentation, I'm able to gather things about older versions of postgres or how to address this issue in Ubuntu and/or from the command line. But I have yet to find a remedy that fits my specific circumstance. Anyone have tips on how I can fix this or even better search terms that point towards a more precise solution? Let me know. Thanks!
I am trying to install Joomla using Postgres and in the installer I have the following error:
Could not connect to the database. Connector returned number: Error connecting to PGSQL database.
This isn't telling me very much. Any ideas?
Unfortunately the installer does not return the real error.
Here are some general tips:
make sure the provided database already exists
check if your database needs some specific settings, such as a different port or sslmode=require
Put your connection details in a normal php file and run the script, having error reporting enabled:
<?php
$connection = 'host=127.0.0.1 port=5432 dbname=joomla3 user=postgres password=postgres';
$dbconn = pg_connect($connection);
var_dump($dbconn);
When running the script you might get a proper error. When you get a resource, the connection is successful: resource(4) of type (pgsql link)
Check selinux configuration:
$ sudo setenforce Permissive
and try again. If it works you can disable selinux at /etc/selinux/config and change the line
SELINUX=enforcing
by
SELINUX=permissive
I'm trying to run a Drupal migration via SSH and drush (a command line shell), copying data from a postgres database to mysql.
It works fine for a while (~5 mins or so), but then I get the error:
SQLSTATE[HY000]: General error: 7 SSL [error] SYSCALL error: EOF detected
The postgres database connection seems to have gone, and I just get errors:
SQLSTATE[HY000]: General error: 7 no [error] connection to the server
It works fine locally, so I think the problem must be with postgres and running a script over SSH - but googling these errors returns nothing useful. Does anyone know what could be causing this?
Could be a timeout. first inspect the log (maybe change ssl_renegotiation_limit)
BTW: IIRC, the renegotiation does not take place after a fixed amount of time, but after a certain amount of transmitted characters (2GB?)
You should check both your PostgreSQL and MySQL logs for further potential details. If there's not much in the PostgreSQL log, look at the log_min_error_statement in postgresql.conf. As you'll find through that link, you can tune it to increase the amount of logging. If there's still not clues in the PostgreSQL log, I would look at other components in your system for the problem.