Support thread for pgadmin Docker template


runraid

Recommended Posts

Support thread for the pgadmin Docker template.

 

Application Name: pgadmin

Application Site: https://www.pgadmin.org/

Docker Hub: https://hub.docker.com/r/fenglc/pgadmin4/

Application Github: https://github.com/postgres/pgadmin4

Template Github: https://github.com/rroller/unraid-templates

 

Admins: Please configure  https://github.com/rroller/unraid-templates for use with CA. Thanks!

Link to comment
  • 10 months later...
  • 1 month later...
  • 7 months later...
  • 6 months later...

I'm having trouble setting up pg_restore.

There is no pg_restore bin that I can find, so I pulled a copy from the Linux (other version) EnterpriseDB tar.gz archive for Postgres10. I used the Postgres10 docker (by postgres) to ensure the pg_restore matched the PostgreSQL version. I placed the pg_restore bin in the /appdata/pgadmin/config/storage/pgadmin4 which I found mapped to "/" in pgadmin4 (for some reason the additional paths I setup in the docker configuration are not working).

In pgadmin4, I set the File > Preferences > Paths > Binary Paths all to "/" since that is there I placed the pg_restore bin.

When I setup a server and attempt to restore my .backup file the process starts and runs infinitely. Upon checking the logs, I get the following message:

Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/pgadmin4/pgadmin/misc/bgprocess/process_executor.py", line 312, in execute
command, stdout=PIPE, stderr=PIPE, stdin=None, **kwargs
File "/usr/local/lib/python3.6/subprocess.py", line 709, in __init__
restore_signals, start_new_session)
File "/usr/local/lib/python3.6/subprocess.py", line 1344, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/pg_restore': '/pg_restore'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/pgadmin4/pgadmin/misc/bgprocess/process_executor.py", line 533, in <module>
execute()
File "/usr/local/lib/python3.6/site-packages/pgadmin4/pgadmin/misc/bgprocess/process_executor.py", line 349, in execute
info = _log_exception()
File "/usr/local/lib/python3.6/site-packages/pgadmin4/pgadmin/misc/bgprocess/process_executor.py", line 70, in _log_exception
fp.write('EXCEPTION::\n{0}'.format(res))
TypeError: a bytes-like object is required, not 'str'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/pgadmin4/pgadmin/misc/bgprocess/process_executor.py", line 535, in <module>
_log_exception()
File "/usr/local/lib/python3.6/site-packages/pgadmin4/pgadmin/misc/bgprocess/process_executor.py", line 70, in _log_exception
fp.write('EXCEPTION::\n{0}'.format(res))
TypeError: a bytes-like object is required, not 'str'


Obviously, pgadmin4 can't find my pg_restore binary, or something else is wrong. I'd appreciate any help in restoring my .backup so I can store and serve it from unraid.

Cheers,

Edited by njdowdy
clarity
Link to comment

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...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.