Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Need Help with Docker PostgreSQL 14 - "psql: error: connection to server on socket failed: FATAL: role 'max' does not exist"

Featured Replies

Hello fellow Unraid enthusiasts,

 

I'm currently facing a perplexing issue with my Docker PostgreSQL 14 setup and could really use some valuable insights from this knowledgeable community. As a relative newcomer to SQL, I'm struggling to resolve the problem, and I'm hoping someone here might be able to lend a hand.

 

Here's the situation: Recently, I decided to tidy up my database and consolidate it for various Docker apps, aiming for better organization. However, since this reconfiguration, I'm encountering the following error whenever I try to connect with "psql -U max":

 

psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL: role "max" does not exist

Despite my best efforts to fix the issue, following tutorials and guides, the error stubbornly remains. I even went to the extent of deleting the Docker image and starting from scratch, but to no avail.

 

To provide some context, here's a brief overview of what I've done:

  1. Attempted to consolidate all my Docker databases into a single location for improved organization.
  2. Ended up with the "role 'max' does not exist" error whenever I try to connect using "psql -U max."

 

To make it easier for you to help me, here are some additional details:

  • My system is running Unraid with Docker version 14 for PostgreSQL.
  • I followed the official documentation and various online resources, but the issue persists.

 

Given my limited experience with SQL, I might be overlooking something obvious, and that's where I hope this wonderful community can lend a hand.

 

Additionally, to aid in troubleshooting, I've attached a diagnostics zip file containing relevant information about my setup.

 

If anyone has encountered a similar problem or has any insights on how to troubleshoot and fix this error, I would be immensely grateful for your guidance. Your expertise and advice could really make a difference in getting my setup back on track.

 

Thank you all in advance for your support and understanding. Looking forward to your responses!

NeZios-diagnostics-20230724-2059.zip

  • Author

Here is my docker command execution : 

 

docker run
-d
--name='postgresql14'
--net='blancnet'
-e TZ="Europe/Paris"
-e HOST_OS="Unraid"
-e HOST_HOSTNAME="FamilyXXX"
-e HOST_CONTAINERNAME="postgresql14"
-e 'POSTGRES_PASSWORD'='XXXX'
-e 'POSTGRES_USER'='max'
-e 'POSTGRES_DB'='FamilyXXX'
-l net.unraid.docker.managed=dockerman
-l net.unraid.docker.icon='https://github.com/juusujanar/unraid-templates/raw/master/img/PostgreSQL-logo.png'
-p '5432:5432/tcp'
-v '/mnt/cache/appdata/postgresql14':'/var/lib/postgresql/data':'rw' 'postgres:14'
24dc6abb9dcb940eacfa00a8c78d76ba73529916d9dfa509b635ddb7c257f27d

 

  • 6 months later...

 

Hi, were you able to solve the problem? I have the same issue. I need postgres for install immich.

 

Grüße

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.