Dear all,
I am setting up the computer within AiiDA on my personal laptop for a remote HPC (bridges2 from PSC), with the configuration as following:
allow_agent: true
compress: true
gss_auth: false
gss_deleg_creds: false
gss_host: bridges2.psc.edu
gss_kex: false
key_filename: /Users/PATH/.ssh/id_rsa_github
key_policy: AutoAddPolicy
load_system_host_keys: false
look_for_keys: true
port: 22
proxy_command: ''
proxy_jump: ''
safe_interval: 30.0
timeout: 60
use_login_shell: true
username: MyUserName
The configuration is about the login node of PSC HPC.
When I did the test, I got the following error:
* Opening connection... [FAILED]: Error while trying to connect to the computer
Full traceback:
Traceback (most recent call last):
File "/Users/Zhishuo/anaconda3/envs/aiida/lib/python3.11/site-packages/aiida/transports/plugins/ssh.py", line 511, in open
self._sftp = self._client.open_sftp()
^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/Zhishuo/anaconda3/envs/aiida/lib/python3.11/site-packages/paramiko/client.py", line 608, in open_sftp
return self._transport.open_sftp_client()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/Zhishuo/anaconda3/envs/aiida/lib/python3.11/site-packages/paramiko/transport.py", line 1216, in open_sftp_client
return SFTPClient.from_transport(self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/Zhishuo/anaconda3/envs/aiida/lib/python3.11/site-packages/paramiko/sftp_client.py", line 169, in from_transport
chan.invoke_subsystem("sftp")
File "/Users/Zhishuo/anaconda3/envs/aiida/lib/python3.11/site-packages/paramiko/channel.py", line 70, in _check
return func(self, *args, **kwds)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/Zhishuo/anaconda3/envs/aiida/lib/python3.11/site-packages/paramiko/channel.py", line 281, in invoke_subsystem
self._wait_for_event()
File "/Users/Zhishuo/anaconda3/envs/aiida/lib/python3.11/site-packages/paramiko/channel.py", line 1224, in _wait_for_event
raise e
paramiko.ssh_exception.SSHException: Channel closed.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/Zhishuo/anaconda3/envs/aiida/lib/python3.11/site-packages/aiida/cmdline/commands/cmd_computer.py", line 553, in computer_test
with transport:
File "/Users/Zhishuo/anaconda3/envs/aiida/lib/python3.11/site-packages/aiida/transports/transport.py", line 178, in __enter__
self.open()
File "/Users/Zhishuo/anaconda3/envs/aiida/lib/python3.11/site-packages/aiida/transports/plugins/ssh.py", line 514, in open
raise InvalidOperation(
aiida.common.exceptions.InvalidOperation: Error in ssh transport plugin. This may be due to the remote computer not supporting SFTP. Try setting it up with the aiida.transports:ssh_only transport from the aiida-sshonly plugin instead.
Warning: 1 out of 1 tests failed
It is saying that SFTP is not supported on the login node, while based on the tutorial of the PSC HPC, the files can be transferred via SFTP on the data node (data.bridges2.psc.edu).
So I regenerate the setup of computer regarding that data node, with configuration:
allow_agent: true
compress: true
gss_auth: false
gss_deleg_creds: false
gss_host: data.bridges2.psc.edu
gss_kex: false
key_filename: /Users/PATH/.ssh/id_rsa_github
key_policy: AutoAddPolicy
load_system_host_keys: false
look_for_keys: true
port: 22
proxy_command: ''
proxy_jump: ''
safe_interval: 30.0
timeout: 60
use_login_shell: true
username: MyUserName
And I got the following error:
* Opening connection... [OK]
* Checking for spurious output... /Users/Zhishuo/anaconda3/envs/aiida/lib/python3.11/site-packages/aiida/transports/plugins/ssh.py:674: AiidaDeprecationWarning: `chdir()` is deprecated and will be removed in the next major version. Use absolute paths instead. (this will be removed in v3)
warn_deprecation(
[Failed]: TimeoutError:
Full traceback:
Traceback (most recent call last):
File "/Users/Zhishuo/anaconda3/envs/aiida/lib/python3.11/site-packages/paramiko/channel.py", line 697, in recv
out = self.in_buffer.read(nbytes, self.timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/Zhishuo/anaconda3/envs/aiida/lib/python3.11/site-packages/paramiko/buffered_pipe.py", line 154, in read
raise PipeTimeout()
paramiko.buffered_pipe.PipeTimeout
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/Zhishuo/anaconda3/envs/aiida/lib/python3.11/site-packages/aiida/cmdline/commands/cmd_computer.py", line 564, in computer_test
success, message = test(
^^^^^
File "/Users/Zhishuo/anaconda3/envs/aiida/lib/python3.11/site-packages/aiida/cmdline/commands/cmd_computer.py", line 78, in _computer_test_no_unexpected_output
retval, stdout, stderr = transport.exec_command_wait('echo -n')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/Zhishuo/anaconda3/envs/aiida/lib/python3.11/site-packages/aiida/transports/transport.py", line 500, in exec_command_wait
retval, stdout_bytes, stderr_bytes = self.exec_command_wait_bytes(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/Zhishuo/anaconda3/envs/aiida/lib/python3.11/site-packages/aiida/transports/plugins/ssh.py", line 1552, in exec_command_wait_bytes
stdout_bytes.append(stdout.read())
^^^^^^^^^^^^^
File "/Users/Zhishuo/anaconda3/envs/aiida/lib/python3.11/site-packages/paramiko/file.py", line 184, in read
new_data = self._read(self._DEFAULT_BUFSIZE)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/Zhishuo/anaconda3/envs/aiida/lib/python3.11/site-packages/paramiko/channel.py", line 1359, in _read
return self.channel.recv(size)
^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/Zhishuo/anaconda3/envs/aiida/lib/python3.11/site-packages/paramiko/channel.py", line 699, in recv
raise socket.timeout()
TimeoutError
* Getting number of jobs from scheduler... [Failed]: TimeoutError:
Full traceback:
Traceback (most recent call last):
File "/Users/Zhishuo/anaconda3/envs/aiida/lib/python3.11/site-packages/paramiko/channel.py", line 697, in recv
out = self.in_buffer.read(nbytes, self.timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/Zhishuo/anaconda3/envs/aiida/lib/python3.11/site-packages/paramiko/buffered_pipe.py", line 154, in read
raise PipeTimeout()
paramiko.buffered_pipe.PipeTimeout
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/Zhishuo/anaconda3/envs/aiida/lib/python3.11/site-packages/aiida/cmdline/commands/cmd_computer.py", line 564, in computer_test
success, message = test(
^^^^^
File "/Users/Zhishuo/anaconda3/envs/aiida/lib/python3.11/site-packages/aiida/cmdline/commands/cmd_computer.py", line 58, in _computer_test_get_jobs
found_jobs = scheduler.get_jobs(as_dict=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/Zhishuo/anaconda3/envs/aiida/lib/python3.11/site-packages/aiida/schedulers/plugins/bash.py", line 52, in get_jobs
retval, stdout, stderr = self.transport.exec_command_wait(self._get_joblist_command(jobs=jobs, user=user))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/Zhishuo/anaconda3/envs/aiida/lib/python3.11/site-packages/aiida/transports/transport.py", line 500, in exec_command_wait
retval, stdout_bytes, stderr_bytes = self.exec_command_wait_bytes(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/Zhishuo/anaconda3/envs/aiida/lib/python3.11/site-packages/aiida/transports/plugins/ssh.py", line 1552, in exec_command_wait_bytes
stdout_bytes.append(stdout.read())
^^^^^^^^^^^^^
File "/Users/Zhishuo/anaconda3/envs/aiida/lib/python3.11/site-packages/paramiko/file.py", line 184, in read
new_data = self._read(self._DEFAULT_BUFSIZE)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/Zhishuo/anaconda3/envs/aiida/lib/python3.11/site-packages/paramiko/channel.py", line 1359, in _read
return self.channel.recv(size)
^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/Zhishuo/anaconda3/envs/aiida/lib/python3.11/site-packages/paramiko/channel.py", line 699, in recv
raise socket.timeout()
TimeoutError
* Determining remote user name... [Failed]: TimeoutError:
Full traceback:
Traceback (most recent call last):
File "/Users/Zhishuo/anaconda3/envs/aiida/lib/python3.11/site-packages/paramiko/channel.py", line 697, in recv
out = self.in_buffer.read(nbytes, self.timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/Zhishuo/anaconda3/envs/aiida/lib/python3.11/site-packages/paramiko/buffered_pipe.py", line 154, in read
raise PipeTimeout()
paramiko.buffered_pipe.PipeTimeout
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/Zhishuo/anaconda3/envs/aiida/lib/python3.11/site-packages/aiida/cmdline/commands/cmd_computer.py", line 564, in computer_test
success, message = test(
^^^^^
File "/Users/Zhishuo/anaconda3/envs/aiida/lib/python3.11/site-packages/aiida/cmdline/commands/cmd_computer.py", line 115, in _computer_get_remote_username
remote_user = transport.whoami()
^^^^^^^^^^^^^^^^^^
File "/Users/Zhishuo/anaconda3/envs/aiida/lib/python3.11/site-packages/aiida/transports/transport.py", line 858, in whoami
retval, username, stderr = self.exec_command_wait(command)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/Zhishuo/anaconda3/envs/aiida/lib/python3.11/site-packages/aiida/transports/transport.py", line 500, in exec_command_wait
retval, stdout_bytes, stderr_bytes = self.exec_command_wait_bytes(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/Zhishuo/anaconda3/envs/aiida/lib/python3.11/site-packages/aiida/transports/plugins/ssh.py", line 1552, in exec_command_wait_bytes
stdout_bytes.append(stdout.read())
^^^^^^^^^^^^^
File "/Users/Zhishuo/anaconda3/envs/aiida/lib/python3.11/site-packages/paramiko/file.py", line 184, in read
new_data = self._read(self._DEFAULT_BUFSIZE)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/Zhishuo/anaconda3/envs/aiida/lib/python3.11/site-packages/paramiko/channel.py", line 1359, in _read
return self.channel.recv(size)
^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/Zhishuo/anaconda3/envs/aiida/lib/python3.11/site-packages/paramiko/channel.py", line 699, in recv
raise socket.timeout()
TimeoutError
* Creating and deleting temporary file... [Failed]: TimeoutError:
Full traceback:
Traceback (most recent call last):
File "/Users/Zhishuo/anaconda3/envs/aiida/lib/python3.11/site-packages/paramiko/channel.py", line 697, in recv
out = self.in_buffer.read(nbytes, self.timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/Zhishuo/anaconda3/envs/aiida/lib/python3.11/site-packages/paramiko/buffered_pipe.py", line 154, in read
raise PipeTimeout()
paramiko.buffered_pipe.PipeTimeout
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/Zhishuo/anaconda3/envs/aiida/lib/python3.11/site-packages/aiida/cmdline/commands/cmd_computer.py", line 564, in computer_test
success, message = test(
^^^^^
File "/Users/Zhishuo/anaconda3/envs/aiida/lib/python3.11/site-packages/aiida/cmdline/commands/cmd_computer.py", line 135, in _computer_create_temp_file
workdir = authinfo.get_workdir().format(username=transport.whoami())
^^^^^^^^^^^^^^^^^^
File "/Users/Zhishuo/anaconda3/envs/aiida/lib/python3.11/site-packages/aiida/transports/transport.py", line 858, in whoami
retval, username, stderr = self.exec_command_wait(command)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/Zhishuo/anaconda3/envs/aiida/lib/python3.11/site-packages/aiida/transports/transport.py", line 500, in exec_command_wait
retval, stdout_bytes, stderr_bytes = self.exec_command_wait_bytes(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/Zhishuo/anaconda3/envs/aiida/lib/python3.11/site-packages/aiida/transports/plugins/ssh.py", line 1552, in exec_command_wait_bytes
stdout_bytes.append(stdout.read())
^^^^^^^^^^^^^
File "/Users/Zhishuo/anaconda3/envs/aiida/lib/python3.11/site-packages/paramiko/file.py", line 184, in read
new_data = self._read(self._DEFAULT_BUFSIZE)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/Zhishuo/anaconda3/envs/aiida/lib/python3.11/site-packages/paramiko/channel.py", line 1359, in _read
return self.channel.recv(size)
^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/Zhishuo/anaconda3/envs/aiida/lib/python3.11/site-packages/paramiko/channel.py", line 699, in recv
raise socket.timeout()
TimeoutError
* Checking for possible delay from using login shell... [Failed]: TimeoutError:
Full traceback:
Traceback (most recent call last):
File "/Users/Zhishuo/anaconda3/envs/aiida/lib/python3.11/site-packages/paramiko/channel.py", line 697, in recv
out = self.in_buffer.read(nbytes, self.timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/Zhishuo/anaconda3/envs/aiida/lib/python3.11/site-packages/paramiko/buffered_pipe.py", line 154, in read
raise PipeTimeout()
paramiko.buffered_pipe.PipeTimeout
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/Zhishuo/anaconda3/envs/aiida/lib/python3.11/site-packages/aiida/cmdline/commands/cmd_computer.py", line 564, in computer_test
success, message = test(
^^^^^
File "/Users/Zhishuo/anaconda3/envs/aiida/lib/python3.11/site-packages/aiida/cmdline/commands/cmd_computer.py", line 221, in _computer_use_login_shell_performance
timing_false = time_use_login_shell(authinfo, auth_params_clone, False, iterations)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/Zhishuo/anaconda3/envs/aiida/lib/python3.11/site-packages/aiida/cmdline/commands/cmd_computer.py", line 192, in time_use_login_shell
transport.whoami()
File "/Users/Zhishuo/anaconda3/envs/aiida/lib/python3.11/site-packages/aiida/transports/transport.py", line 858, in whoami
retval, username, stderr = self.exec_command_wait(command)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/Zhishuo/anaconda3/envs/aiida/lib/python3.11/site-packages/aiida/transports/transport.py", line 500, in exec_command_wait
retval, stdout_bytes, stderr_bytes = self.exec_command_wait_bytes(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/Zhishuo/anaconda3/envs/aiida/lib/python3.11/site-packages/aiida/transports/plugins/ssh.py", line 1552, in exec_command_wait_bytes
stdout_bytes.append(stdout.read())
^^^^^^^^^^^^^
File "/Users/Zhishuo/anaconda3/envs/aiida/lib/python3.11/site-packages/paramiko/file.py", line 184, in read
new_data = self._read(self._DEFAULT_BUFSIZE)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/Zhishuo/anaconda3/envs/aiida/lib/python3.11/site-packages/paramiko/channel.py", line 1359, in _read
return self.channel.recv(size)
^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/Zhishuo/anaconda3/envs/aiida/lib/python3.11/site-packages/paramiko/channel.py", line 699, in recv
raise socket.timeout()
TimeoutError
Warning: 5 out of 6 tests failed
It seems that the sftp connect was established successfully, but the data node does not allow any operations.
I also checked that, there is one way to use only scp/rsync for file transfer, with the module “aiida_onlyssh”. However, I got a severe error about the version mismatch between the libraries in my Conda environment and the aiida_onlyssh software, as it was developed 5 years ago.
I am wondering if it is possible to disable the sftp file transfer when setting up the computer within AiiDA?
As I have checked, the file transfer with rsync is ok.
I truly appreciate it if anyone could help me out.
I am using AiiDA version 2.7.1, and the no-password ssh connect has been setup between my local laptop and PSC HPC, and the AiiDA was well configured on my local laptop:
✔ version: AiiDA v2.7.1
✔ config: /Users/PATH/.aiida
✔ profile: PSAL_dos
✔ storage: Storage for ...
Warning: RabbitMQ v4.1.4 is not supported and will cause unexpected problems!
Warning: It can cause long-running workflows to crash and jobs to be submitted multiple times.
Warning: See https://github.com/aiidateam/aiida-core/wiki/RabbitMQ-version-to-use for details.
✔ broker: RabbitMQ v4.1.4 ...
✔ daemon: Daemon
Best
Zhishuo