ZFS Replication to Proxmox Backup Server

flamelcadet

Cadet
Joined
May 20, 2021
Messages
4
Hello, I am trying to set up replication to the proxmox server, but I ran into a problem:
I create a bunch of ssh keys on the proxmox server, insert the public key into TrueNas gui->, SSH Keypair, then add SSH Connection and get the Remote Host Key
And when I try to create a replication job, I get an error:
Code:
Ошибка: 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 1205, in _call
    return await methodobj(*prepared_call.args)
  File "/usr/local/lib/python3.9/site-packages/middlewared/schema.py", line 973, in nf
    return await f(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/middlewared/plugins/replication.py", line 642, in list_datasets
    return await self.middleware.call("zettarepl.list_datasets", transport, ssh_credentials)
  File "/usr/local/lib/python3.9/site-packages/middlewared/main.py", line 1248, in call
    return await self._call(
  File "/usr/local/lib/python3.9/site-packages/middlewared/main.py", line 1205, in _call
    return await methodobj(*prepared_call.args)
  File "/usr/local/lib/python3.9/site-packages/middlewared/plugins/zettarepl.py", line 409, in list_datasets
    datasets = await self.middleware.run_in_thread(list_datasets, shell)
  File "/usr/local/lib/python3.9/site-packages/middlewared/utils/run_in_thread.py", line 10, in run_in_thread
    return await self.loop.run_in_executor(self.run_in_thread_executor, functools.partial(method, *args, **kwargs))
  File "/usr/local/lib/python3.9/site-packages/middlewared/utils/io_thread_pool_executor.py", line 25, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.9/site-packages/zettarepl/dataset/list.py", line 13, in list_datasets
    return [dataset["name"] for dataset in list_datasets_with_properties(shell, dataset, recursive)]
  File "/usr/local/lib/python3.9/site-packages/zettarepl/dataset/list.py", line 30, in list_datasets_with_properties
    output = shell.exec(args)
  File "/usr/local/lib/python3.9/site-packages/zettarepl/transport/interface.py", line 88, in exec
    return self.exec_async(args, encoding, stdout).wait(timeout)
  File "/usr/local/lib/python3.9/site-packages/zettarepl/transport/interface.py", line 92, in exec_async
    async_exec.run()
  File "/usr/local/lib/python3.9/site-packages/zettarepl/transport/base_ssh.py", line 27, in run
    client = self.shell.get_client()
  File "/usr/local/lib/python3.9/site-packages/zettarepl/transport/base_ssh.py", line 127, in get_client
    pkey=self._parse_private_key(self.transport.private_key),
  File "/usr/local/lib/python3.9/site-packages/zettarepl/transport/base_ssh.py", line 141, in _parse_private_key
    return key_class.from_private_key(io.StringIO(private_key))
  File "/usr/local/lib/python3.9/site-packages/paramiko/pkey.py", line 256, in from_private_key
    key = cls(file_obj=file_obj, password=password)
  File "/usr/local/lib/python3.9/site-packages/paramiko/rsakey.py", line 52, in __init__
    self._from_private_key(file_obj, password)
  File "/usr/local/lib/python3.9/site-packages/paramiko/rsakey.py", line 179, in _from_private_key
    data = self._read_private_key("RSA", file_obj, password)
  File "/usr/local/lib/python3.9/site-packages/paramiko/pkey.py", line 316, in _read_private_key
    m = self.BEGIN_TAG.match(lines[start])
IndexError: list index out of range

What am I doing wrong?
I also tried adding the private and public keys of the proxmox server to TrueNas, but then I get an authorization error
 

flamelcadet

Cadet
Joined
May 20, 2021
Messages
4
ssh connect established, now i watch this:
Code:
Task State
Error

sh: 1: zfs: not found.

Logs

[2021/10/22 16:26:53] INFO     [Thread-39] [zettarepl.paramiko.replication_task__task_2] Connected (version 2.0, client OpenSSH_8.4p1)
[2021/10/22 16:26:53] INFO     [Thread-39] [zettarepl.paramiko.replication_task__task_2] Authentication (publickey) successful!
[2021/10/22 16:26:53] ERROR    [replication_task__task_2] [zettarepl.replication.run] For task 'task_2' unhandled replication error ExecException(127, 'sh: 1: zfs: not found\n')
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/zettarepl/replication/run.py", line 163, in run_replication_tasks
    retry_stuck_replication(
  File "/usr/local/lib/python3.9/site-packages/zettarepl/replication/stuck.py", line 18, in retry_stuck_replication
    return func()
  File "/usr/local/lib/python3.9/site-packages/zettarepl/replication/run.py", line 164, in
    lambda: run_replication_task_part(replication_task, source_dataset, src_context, dst_context,
... 5 more lines ...
    return get_properties(shell, dataset, {property: type}, include_source)[property]
  File "/usr/local/lib/python3.9/site-packages/zettarepl/transport/zfscli/__init__.py", line 104, in get_properties
    return get_properties_recursive(shell, [dataset], properties, include_source)[dataset]
  File "/usr/local/lib/python3.9/site-packages/zettarepl/transport/zfscli/__init__.py", line 90, in get_properties_recursive
    output = shell.exec(cmd)
  File "/usr/local/lib/python3.9/site-packages/zettarepl/transport/interface.py", line 88, in exec
    return self.exec_async(args, encoding, stdout).wait(timeout)
  File "/usr/local/lib/python3.9/site-packages/zettarepl/transport/base_ssh.py", line 54, in wait
    raise ExecException(exitcode, stdout)
zettarepl.transport.interface.ExecException: sh: 1: zfs: not found
 

Inxsible

Guru
Joined
Aug 14, 2017
Messages
1,123
Can you please detail what exactly you did?

I am trying to set up zfs replication between my TrueNAS and Proxmox servers and I am getting the same error as your first post. Were you able to set up the ZFS Replication between TrueNAS and Proxmox? How did you achieve it?
 
Top