Got unexpected RPC data format from server #424

Closed
opened 2021-06-14 11:28:21 +00:00 by zalzac · 3 comments

What I'm trying to do and why

I'm trying to initialize a repo with sudo borgmatic init --encryption repokey on a Hentzer Storage Box. I'm following the steps on https://torsion.org/borgmatic/docs/how-to/set-up-backups/#initialization

Steps to reproduce (if a bug)

Config:

location:
    source_directories:
        - /home
        - /etc
    repositories:
        - ssh://u11111@u11111.your-storagebox.de:23/./backups/pc
    exclude_patterns:
        - '*.pyc'
        - /home/*/.cache

storage:
    encryption_passphrase: MyPassphrase
    ssh_command: ssh u11111@u11111.your-storagebox.de -F /home/user/.ssh/config

retention:
    keep_daily: 7
    keep_weekly: 4
    keep_monthly: 6
    keep_yearly: 1

consistency:
    checks:
        - repository
        - archives

Actual behavior (if a bug)

sudo borgmatic init --encryption repokey --verbosity 2
Ensuring legacy configuration is upgraded
ssh://u11111@u11111.your-storagebox.de:23/./backups/pc: Initializing repository
borg info --debug ssh://u11111@u11111.your-storagebox.de:23/./backups/pc
borg info --debug ssh://u11111@u11111.your-storagebox.de:23/./backups/pc
using builtin fallback logging configuration
35 self tests completed in 0.06 seconds
SSH command line: ['ssh', 'u11111@u11111.your-storagebox.de', '-F', '/home/user/.ssh/config', '-p', '23', 'u11111@u11111.your-storagebox.de', 'borg', 'serve', '--umask=077', '--debug']
Enter passphrase for key '/home/user/.ssh/borgbackup': 
Got unexpected RPC data format from server:
Command not found

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/borg/archiver.py", line 4621, in main
    exit_code = archiver.run(args)
  File "/usr/lib/python3/dist-packages/borg/archiver.py", line 4553, in run
    return set_ec(func(args))
  File "/usr/lib/python3/dist-packages/borg/archiver.py", line 157, in wrapper
    make_parent_dirs=make_parent_dirs, args=args)
  File "/usr/lib/python3/dist-packages/borg/remote.py", line 573, in __init__
    b'client_version': BORG_VERSION,
  File "/usr/lib/python3/dist-packages/borg/remote.py", line 712, in call
    for resp in self.call_many(cmd, [args], **kw):
  File "/usr/lib/python3/dist-packages/borg/remote.py", line 829, in call_many
    raise UnexpectedRPCDataFormatFromServer(data)
borg.remote.UnexpectedRPCDataFormatFromServer: Got unexpected RPC data format from server:
Command not found


Platform: Linux 4.15.0-144-generic #148-Ubuntu SMP Sat May 8 02:33:43 UTC 2021 x86_64
Linux: Ubuntu 18.04 bionic
Borg: 1.1.15  Python: CPython 3.6.9 msgpack: 0.5.6
PID: 20421  CWD: /home/user
sys.argv: ['/usr/bin/borg', 'info', '--debug', 'ssh://u11111@u11111.your-storagebox.de:23/./backups/pc']
SSH_ORIGINAL_COMMAND: None

borg init --encryption repokey --debug ssh://u11111@u11111.your-storagebox.de:23/./backups/pc > 
using builtin fallback logging configuration
35 self tests completed in 0.07 seconds
SSH command line: ['ssh', 'u11111@u11111.your-storagebox.de', '-F', '/home/user/.ssh/config', '-p', '23', 'u11111@u11111.your-storagebox.de', 'borg', 'serve', '--umask=077', '--debug']
Enter passphrase for key '/home/user/.ssh/borgbackup': 
Got unexpected RPC data format from server:
Command not found

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/borg/archiver.py", line 4621, in main
    exit_code = archiver.run(args)
  File "/usr/lib/python3/dist-packages/borg/archiver.py", line 4553, in run
    return set_ec(func(args))
  File "/usr/lib/python3/dist-packages/borg/archiver.py", line 157, in wrapper
    make_parent_dirs=make_parent_dirs, args=args)
  File "/usr/lib/python3/dist-packages/borg/remote.py", line 573, in __init__
    b'client_version': BORG_VERSION,
  File "/usr/lib/python3/dist-packages/borg/remote.py", line 712, in call
    for resp in self.call_many(cmd, [args], **kw):
  File "/usr/lib/python3/dist-packages/borg/remote.py", line 829, in call_many
    raise UnexpectedRPCDataFormatFromServer(data)
borg.remote.UnexpectedRPCDataFormatFromServer: Got unexpected RPC data format from server:
Command not found


Platform: Linux 4.15.0-144-generic #148-Ubuntu SMP Sat May 8 02:33:43 UTC 2021 x86_64
Linux: Ubuntu 18.04 bionic
Borg: 1.1.15  Python: CPython 3.6.9 msgpack: 0.5.6
PID: 20427  CWD: /home/user
sys.argv: ['/usr/bin/borg', 'init', '--encryption', 'repokey', '--debug', 'ssh://u11111@u11111.your-storagebox.de:23/./backups/pc']
SSH_ORIGINAL_COMMAND: None

ssh://u11111@u11111.your-storagebox.de:23/./backups/pc: Error running actions for repository
Command 'borg init --encryption repokey --debug ssh://u11111@u11111.your-storagebox.de:23/./backups/pc' returned non-zero exit status 2.
/etc/borgmatic/config.yaml: Error running configuration file

summary:
/etc/borgmatic/config.yaml: Error running configuration file
ssh://u11111@u11111.your-storagebox.de:23/./backups/pc: Error running actions for repository
Command 'borg init --encryption repokey --debug ssh://u11111@u11111.your-storagebox.de:23/./backups/pc' returned non-zero exit status 2.

Need some help? https://torsion.org/borgmatic/#issues

Expected behavior (if a bug)

However, when I run borg init --encryption repokey --debug ssh://u11111@u11111.your-storagebox.de:23/./backups/pc manually it works correctly.

Other notes / implementation ideas

Environment

borgmatic version: 1.5.14

borgmatic installation method: pip (global)

Borg version: borg 1.1.15

Python version: Python 3.6.9

operating system and version: Ubuntu 18.04.5 LTS

#### What I'm trying to do and why I'm trying to initialize a repo with `sudo borgmatic init --encryption repokey` on a Hentzer Storage Box. I'm following the steps on https://torsion.org/borgmatic/docs/how-to/set-up-backups/#initialization #### Steps to reproduce (if a bug) Config: ``` location: source_directories: - /home - /etc repositories: - ssh://u11111@u11111.your-storagebox.de:23/./backups/pc exclude_patterns: - '*.pyc' - /home/*/.cache storage: encryption_passphrase: MyPassphrase ssh_command: ssh u11111@u11111.your-storagebox.de -F /home/user/.ssh/config retention: keep_daily: 7 keep_weekly: 4 keep_monthly: 6 keep_yearly: 1 consistency: checks: - repository - archives ``` #### Actual behavior (if a bug) ``` sudo borgmatic init --encryption repokey --verbosity 2 Ensuring legacy configuration is upgraded ssh://u11111@u11111.your-storagebox.de:23/./backups/pc: Initializing repository borg info --debug ssh://u11111@u11111.your-storagebox.de:23/./backups/pc borg info --debug ssh://u11111@u11111.your-storagebox.de:23/./backups/pc using builtin fallback logging configuration 35 self tests completed in 0.06 seconds SSH command line: ['ssh', 'u11111@u11111.your-storagebox.de', '-F', '/home/user/.ssh/config', '-p', '23', 'u11111@u11111.your-storagebox.de', 'borg', 'serve', '--umask=077', '--debug'] Enter passphrase for key '/home/user/.ssh/borgbackup': Got unexpected RPC data format from server: Command not found Traceback (most recent call last): File "/usr/lib/python3/dist-packages/borg/archiver.py", line 4621, in main exit_code = archiver.run(args) File "/usr/lib/python3/dist-packages/borg/archiver.py", line 4553, in run return set_ec(func(args)) File "/usr/lib/python3/dist-packages/borg/archiver.py", line 157, in wrapper make_parent_dirs=make_parent_dirs, args=args) File "/usr/lib/python3/dist-packages/borg/remote.py", line 573, in __init__ b'client_version': BORG_VERSION, File "/usr/lib/python3/dist-packages/borg/remote.py", line 712, in call for resp in self.call_many(cmd, [args], **kw): File "/usr/lib/python3/dist-packages/borg/remote.py", line 829, in call_many raise UnexpectedRPCDataFormatFromServer(data) borg.remote.UnexpectedRPCDataFormatFromServer: Got unexpected RPC data format from server: Command not found Platform: Linux 4.15.0-144-generic #148-Ubuntu SMP Sat May 8 02:33:43 UTC 2021 x86_64 Linux: Ubuntu 18.04 bionic Borg: 1.1.15 Python: CPython 3.6.9 msgpack: 0.5.6 PID: 20421 CWD: /home/user sys.argv: ['/usr/bin/borg', 'info', '--debug', 'ssh://u11111@u11111.your-storagebox.de:23/./backups/pc'] SSH_ORIGINAL_COMMAND: None borg init --encryption repokey --debug ssh://u11111@u11111.your-storagebox.de:23/./backups/pc > using builtin fallback logging configuration 35 self tests completed in 0.07 seconds SSH command line: ['ssh', 'u11111@u11111.your-storagebox.de', '-F', '/home/user/.ssh/config', '-p', '23', 'u11111@u11111.your-storagebox.de', 'borg', 'serve', '--umask=077', '--debug'] Enter passphrase for key '/home/user/.ssh/borgbackup': Got unexpected RPC data format from server: Command not found Traceback (most recent call last): File "/usr/lib/python3/dist-packages/borg/archiver.py", line 4621, in main exit_code = archiver.run(args) File "/usr/lib/python3/dist-packages/borg/archiver.py", line 4553, in run return set_ec(func(args)) File "/usr/lib/python3/dist-packages/borg/archiver.py", line 157, in wrapper make_parent_dirs=make_parent_dirs, args=args) File "/usr/lib/python3/dist-packages/borg/remote.py", line 573, in __init__ b'client_version': BORG_VERSION, File "/usr/lib/python3/dist-packages/borg/remote.py", line 712, in call for resp in self.call_many(cmd, [args], **kw): File "/usr/lib/python3/dist-packages/borg/remote.py", line 829, in call_many raise UnexpectedRPCDataFormatFromServer(data) borg.remote.UnexpectedRPCDataFormatFromServer: Got unexpected RPC data format from server: Command not found Platform: Linux 4.15.0-144-generic #148-Ubuntu SMP Sat May 8 02:33:43 UTC 2021 x86_64 Linux: Ubuntu 18.04 bionic Borg: 1.1.15 Python: CPython 3.6.9 msgpack: 0.5.6 PID: 20427 CWD: /home/user sys.argv: ['/usr/bin/borg', 'init', '--encryption', 'repokey', '--debug', 'ssh://u11111@u11111.your-storagebox.de:23/./backups/pc'] SSH_ORIGINAL_COMMAND: None ssh://u11111@u11111.your-storagebox.de:23/./backups/pc: Error running actions for repository Command 'borg init --encryption repokey --debug ssh://u11111@u11111.your-storagebox.de:23/./backups/pc' returned non-zero exit status 2. /etc/borgmatic/config.yaml: Error running configuration file summary: /etc/borgmatic/config.yaml: Error running configuration file ssh://u11111@u11111.your-storagebox.de:23/./backups/pc: Error running actions for repository Command 'borg init --encryption repokey --debug ssh://u11111@u11111.your-storagebox.de:23/./backups/pc' returned non-zero exit status 2. Need some help? https://torsion.org/borgmatic/#issues ``` #### Expected behavior (if a bug) However, when I run `borg init --encryption repokey --debug ssh://u11111@u11111.your-storagebox.de:23/./backups/pc` manually it works correctly. #### Other notes / implementation ideas #### Environment **borgmatic version:** 1.5.14 **borgmatic installation method:** pip (global) **Borg version:** borg 1.1.15 **Python version:** Python 3.6.9 **operating system and version:** Ubuntu 18.04.5 LTS
Owner

I'm not entirely sure what's going on here, but have you tried directly running the Borg command that borgmatic is initially tripping up on? Example:

borg info --debug ssh://u11111@u11111.your-storagebox.de:23/./backups/pc
I'm not entirely sure what's going on here, but have you tried directly running the Borg command that borgmatic is initially tripping up on? Example: ``` borg info --debug ssh://u11111@u11111.your-storagebox.de:23/./backups/pc ```
Author

Standalone borg commands were working fine.

Anyway, I upgraded my Ubuntu to 20.04 and installed borgmatic through apt (although at version 1.5.1). Everything seems to work now.

The only other thing I changed was ssh_command option in preferences. Previously I had it set to ssh u11111@u11111.your-storagebox.de -F /home/user/.ssh/config -p 23 and it's possible the duplicated user@hostname part caused problems. You can see it in the SSH command line: section of my debug log above.

Standalone `borg` commands were working fine. Anyway, I upgraded my Ubuntu to 20.04 and installed borgmatic through `apt` (although at version 1.5.1). Everything seems to work now. The only other thing I changed was `ssh_command` option in preferences. Previously I had it set to `ssh u11111@u11111.your-storagebox.de -F /home/user/.ssh/config -p 23` and it's possible the duplicated user@hostname part caused problems. You can see it in the `SSH command line:` section of my debug log above.
Owner

Glad to hear it's working now!

Glad to hear it's working now!
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: borgmatic-collective/borgmatic#424
No description provided.