1

I encountered something weird with connecting to a PostgreSQL database from Tomcat on a Linux server. For some weird reason I cannot connect to the database eventhough if I run the same application and configuration on a Windows machine the authentication works just fine. I can also login with pgAdmin from my Windows machine.

So when I login with pgAdmin I update the password to be the same as it was before and that all off a sudden it works :-S. If I look at the MD5 hash that was generated it's exactly the same as before. Does anybody know what might be going on?

I suspect something with case sensitivity but I can't really figure out how that is possible since I use exactly the same configuration on the Linux server and on the Windows machine.

2
  • Where's the PostgreSQL instance living? On the Windows box or the Linux box? Or both, ie in both cases testing against a different local PostgreSQL instance? Are you absolutely sure you connected to the same PostgreSQL server when you re-tried after resetting the password? Commented Jul 12, 2012 at 2:09
  • PostgreSQL is installed on Linux and I tried connecting from the Linux environment to the database. But like my answer states I made a stupid mistake with the creation of the role. Thnx anyway :) Commented Jul 12, 2012 at 18:45

1 Answer 1

1

It was something really stupid. I used the wrong syntax for creating a user. I copy pasted the SQL statements from pgAdmin which contained the hashed password so when I tried logging in with the actual password the authentication failed.

The reason why it was working from my Windows machine is because I configured my internal network to be trusted so it didn't use my specified password at all. So it looked like it was only working from Windows but in fact it wasn't.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.