Remote Replication Error

The_Elder

Cadet
Joined
Jul 1, 2022
Messages
5
Dear Forum Members.

I am at my wits end and I will appreciate your help.

I have two Truenas Servers - a local and a remote one (on a static ip address). The remote runs Truenas 13.0 while the local runs TrueNAS-12.0-U7. I am running the ssh task on the remote and has changed the ssh port to xxxx. On the remote router, I have configured an external port yyyy to be forwarded to the xxxx port of the remote NAS.

I am trying to set up replication task from the local NAS to the remote. I have run the SSH keypairs and generated both the private and public keys. When i try to establish a replication task, I am faced with two options, each posing a different challenge:

Option 1: Manual ssh connection
  • I populated the host with the remote static ip address
  • changed the port from 22 to yyyy
  • select a private key i had established from the ssh keypairs and then press "Create SSH connection"
It gives me the following error:

"[EFAULT] ssh-keyscan failed: getaddrinfo https://aaa.aaa.aaa.aaa: Non-recoverable failure in name resolution getaddrinfo https://aaa/aaa/aaa/aaa: Non-recoverable failure in name resolution getaddrinfo https://aaa.aaa.aaa.aaa: Non-recoverable failure in name resolution"

Error: Traceback (most recent call last):

File "/usr/local/lib/python3.9/site-packages/middlewared/main.py", line 138, in call_method

result = await self.middleware._call(message['method'], serviceobj, methodobj, params, app=self,

File "/usr/local/lib/python3.9/site-packages/middlewared/main.py", line 1213, in _call

return await methodobj(*prepared_call.args)

File "/usr/local/lib/python3.9/site-packages/middlewared/schema.py", line 975, in nf

return await f(*args, **kwargs)

File "/usr/local/lib/python3.9/site-packages/middlewared/plugins/keychain.py", line 525, in remote_ssh_host_key_scan

raise CallError(f"ssh-keyscan failed: {proc.stderr}")

middlewared.service_exception.CallError: [EFAULT] ssh-keyscan failed: getaddrinfo https://aaa.aaa.aaa.aaa: Non-recoverable failure in name resolution

getaddrinfo https://aaa,aaa,aaa,aaa: Non-recoverable failure in name resolution

getaddrinfo https://aaa.aaa.aaa.aaa Non-recoverable failure in name resolution


Option 2: semi-automatic
  • I populated the host with the remote static ip address
  • put in my root password (at the same time enable root password logging on the remote server)
  • select a private key I had established from the ssh keypairs and then press "Create SSH connection"

It gives me the following error:
"[EFAULT] Unable to connect to remote system: timed out"

Error: Traceback (most recent call last):

File "/usr/local/lib/python3.9/site-packages/middlewared/plugins/keychain.py", line 571, in remote_ssh_semiautomatic_setup

client = Client(os.path.join(re.sub("^http", "ws", data["url"]), "websocket"))

File "/usr/local/lib/python3.9/site-packages/middlewared/client/client.py", line 283, in __init__

self._ws.connect()

File "/usr/local/lib/python3.9/site-packages/middlewared/client/client.py", line 124, in connect

rv = super(WSClient, self).connect()

File "/usr/local/lib/python3.9/site-packages/ws4py/client/__init__.py", line 216, in connect

self.sock.connect(self.bind_addr)

File "/usr/local/lib/python3.9/ssl.py", line 1342, in connect

self._real_connect(addr, False)

File "/usr/local/lib/python3.9/ssl.py", line 1329, in _real_connect

super().connect(addr)

socket.timeout: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "/usr/local/lib/python3.9/site-packages/middlewared/main.py", line 138, in call_method

result = await self.middleware._call(message['method'], serviceobj, methodobj, params, app=self,

File "/usr/local/lib/python3.9/site-packages/middlewared/main.py", line 1224, in _call

return await self.run_in_executor(prepared_call.executor, methodobj, *prepared_call.args)

File "/usr/local/lib/python3.9/site-packages/middlewared/main.py", line 1128, in run_in_executor

return await loop.run_in_executor(pool, functools.partial(method, *args, **kwargs))

File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run

result = self.fn(*self.args, **self.kwargs)

File "/usr/local/lib/python3.9/site-packages/middlewared/schema.py", line 979, in nf

return f(*args, **kwargs)

File "/usr/local/lib/python3.9/site-packages/middlewared/plugins/keychain.py", line 573, in remote_ssh_semiautomatic_setup

raise CallError(f"Unable to connect to remote system: {e}")

middlewared.service_exception.CallError: [EFAULT] Unable to connect to remote system: timed out
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
This is already addressed in the Release Notes for 13:

By default, TrueNAS 12 cannot initiate a replication to or from TrueNAS 13 due to an outdated SSH client library. Allowing replication to or from TrueNAS 13 to TrueNAS 12 requires allowing ssh.rsa algorithms. See OpenSSH 8.2 Release for security considerations. Log into the TrueNAS 13 system and go to Services->SSH. Add the SSH Auxiliary Parameter: PubkeyAcceptedAlgorithms +ssh-rsa.
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
Have you tried SSHing manually to the remote 13 system? Did you add the SSH Auxiliary parameter on the 12 side or the 13 side? It has to be on the 13 side.
 

The_Elder

Cadet
Joined
Jul 1, 2022
Messages
5
Yes, I am able to ssh into the remote machine. From the shell of the local machine, using root ssh -p xxxx user@xxx.xxx.xxx.xxx and once I supplied the password, i am in. Additionally from the local machine, I have set up passwordless ssh into the remote and it works.
 

The_Elder

Cadet
Joined
Jul 1, 2022
Messages
5
I added the auxiliary
Yes, I am able to ssh into the remote machine. From the shell of the local machine, using root ssh -p xxxx user@xxx.xxx.xxx.xxx and once I supplied the password, i am in. Additionally from the local machine, I have set up passwordless ssh into the remote and it works.
I added the parameter on the 13 side - the remote machine.

To eliminate the 12/13 debacle, I have now updated the local machine to 13 and I am still having the same errors.
 

The_Elder

Cadet
Joined
Jul 1, 2022
Messages
5
I believe there are Experts on this forum that have done this replication across systems severally. Kindly help, if you could, as I am truly at my wits end in getting this done.

I can ssh into the remote TrueNAS but I can't simply get the local NAS to replicate to the remote. I also tried replicating from the remote to the local, I have similar issues.

Please assist a newbie and your kindness will not go unnoticed.
 
Top