Exec format error when using psql functions
Summary
PGAdmin unable to backup or open psql tools
Steps to reproduce
connect to DB and run backup, restore, or open psql tools
What is the current bug behavior?
GUI side shows backup running but no output and will go on forever.
Running the commands on the pod cli itself shows cannot execute binary file: Exec format error
What is the expected correct behavior?
DB dump file created
Relevant logs and/or screenshots
Opening SQL Tools
Exception in thread Thread-166 (read_and_forward_pty_output):
Traceback (most recent call last):
File "/usr/local/lib/python3.11/threading.py", line 1045, in _bootstrap_inner
self.run()
File "/usr/local/lib/python3.11/threading.py", line 982, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/lib/python3.11/site-packages/flask/ctx.py", line 184, in wrapper
return ctx.app.ensure_sync(f)(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/pgadmin4/pgadmin/tools/psql/__init__.py", line 287, in read_and_forward_pty_output
pty_handel_io(connection_data, data, sid)
File "/pgadmin4/pgadmin/tools/psql/__init__.py", line 273, in pty_handel_io
p, parent, fd = create_pty_terminal(connection_data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/pgadmin4/pgadmin/tools/psql/__init__.py", line 181, in create_pty_terminal
p = subprocess.Popen(connection_data,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/eventlet/green/subprocess.py", line 58, in __init__
subprocess_orig.Popen.__init__(self, args, 0, *argss, **kwds)
File "/usr/local/lib/python3.11/subprocess.py", line 1026, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/local/lib/python3.11/subprocess.py", line 1953, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
OSError: [Errno 8] Exec format error: '/usr/local/pgsql-14/psql
Starting a backup [2024-03-29 20:22:06 +0000] [1] [ERROR] Worker (pid:452) exited with code 1
Permissions and who the pod is running as.
-rwxr-xr-x. 1 root root 501560 Feb 13 14:39 pg_dump
-rwxr-xr-x. 1 root root 155280 Feb 13 14:39 pg_dumpall
-rwxr-xr-x. 1 root root 230800 Feb 13 14:39 pg_restore
-rwxr-xr-x. 1 root root 789800 Feb 13 14:39 psql
sh-5.1$ whoami
pgadminr
sh-5.1$ pwd
/usr/local/pgsql-14
Possible fixes
permissions or binary compiled for wrong target.
Tasks
-
Bug has been identified and corrected within the container.
Please read the Iron Bank Documentation for more info
Edited by Zoey Hill