Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strange 'mode' error without any info on ssh tunnel attempt #8302

Open
licht1stein opened this issue Dec 29, 2024 · 5 comments
Open

Strange 'mode' error without any info on ssh tunnel attempt #8302

licht1stein opened this issue Dec 29, 2024 · 5 comments
Assignees
Labels

Comments

@licht1stein
Copy link

licht1stein commented Dec 29, 2024

Describe the bug
When creating an ssh tunnel with an key file, I get a one word error 'mode', without any info on what's wrong or how to fix it.

To Reproduce
Try to connect to a remote database via ssh tunnel using key file.

Expected behavior
Connect to server or give an informative error message.

Error message

'mode'

Screenshots
image

Desktop (please complete the following information):

  • OS: Fedora Linux 41 x86_64
  • Version: 8.14
  • Mode: Desktop
  • Package type: flatpak
@anilsahoo20
Copy link
Contributor

Hi @licht1stein
Can you please share pgAdmin logs? Also we don't ship on flatpak.

@licht1stein
Copy link
Author

Well, somebody does:
https://flathub.org/apps/org.pgadmin.pgadmin4

@licht1stein
Copy link
Author

licht1stein commented Jan 3, 2025

Just attempting to connect doesn't seem to produce a new records in the pgadmin4.log file.

The documentation says to To override the log settings, create a file called config_local.py in the web/ directory of the installation, alongside the existing config.py. , but there is no config.py in the org.pgadmin.pgadmin4 directory. Nor is there a config.py file anywhere else on my system next to anything pgadmin4 related.

There is a config.json file in the ~/.var/app/org.pgadmin.pgadmin4/config/pgadmin4, but I'm not sure that will help.

@licht1stein
Copy link
Author

Installed the dnf version with qt-bindings instead of the flatpak one, and managed to catch the logs for the error:

Traceback (most recent call last):
  File "/usr/lib/pgadmin4/pgadmin/browser/server_groups/servers/__init__.py", line 1219, in create
    status, errmsg = conn.connect(
                     ~~~~~~~~~~~~^
        password=password,
        ^^^^^^^^^^^^^^^^^^
    ...<2 lines>...
        server_types=ServerType.types()
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/usr/lib/pgadmin4/pgadmin/utils/driver/psycopg3/connection.py", line 283, in connect
    status, error = manager.create_ssh_tunnel(tunnel_password)
                    ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
  File "/usr/lib/pgadmin4/pgadmin/utils/driver/psycopg3/server_manager.py", line 585, in create_ssh_tunnel
    self.tunnel_object = SSHTunnelForwarder(
                         ~~~~~~~~~~~~~~~~~~^
        (self.tunnel_host, int(self.tunnel_port)),
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ...<5 lines>...
        set_keepalive=int(self.tunnel_keep_alive)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/usr/lib/python3.13/site-packages/sshtunnel.py", line 965, in __init__
    (self.ssh_password, self.ssh_pkeys) = self._consolidate_auth(
                                          ~~~~~~~~~~~~~~~~~~~~~~^
        ssh_password=ssh_password,
        ^^^^^^^^^^^^^^^^^^^^^^^^^^
    ...<4 lines>...
        logger=self.logger
        ^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/usr/lib/python3.13/site-packages/sshtunnel.py", line 1156, in _consolidate_auth
    ssh_pkey = SSHTunnelForwarder.read_private_key_file(
        pkey_file=ssh_pkey_expanded,
        pkey_password=ssh_pkey_password or ssh_password,
        logger=logger
    )
  File "/usr/lib/python3.13/site-packages/sshtunnel.py", line 1303, in read_private_key_file
    ssh_pkey = pkey_class.from_private_key_file(
        pkey_file,
        password=pkey_password
    )
  File "/usr/lib/python3.13/site-packages/paramiko/pkey.py", line 435, in from_private_key_file
    key = cls(filename=filename, password=password)
  File "/usr/lib/python3.13/site-packages/paramiko/ed25519key.py", line 65, in __init__
    signing_key = self._parse_signing_key_data(data, password)
  File "/usr/lib/python3.13/site-packages/paramiko/ed25519key.py", line 133, in _parse_signing_key_data
    cipher["mode"](key[cipher["key-size"] :]),
    ~~~~~~^^^^^^^^
KeyError: 'mode'

@adityatoshniwal
Copy link
Contributor

Well, somebody does: https://flathub.org/apps/org.pgadmin.pgadmin4

You can reach out to the publisher. We're not able to reproduce on pgAdmin published installers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: No status
Development

No branches or pull requests

3 participants