vorta icon indicating copy to clipboard operation
vorta copied to clipboard

Mac binary cannot connect to borg repo while pip version of Vorta works

Open hasdf opened this issue 7 months ago • 11 comments

Description

I'm having problems with the Mac Version of Vorta - installed via brew or the the release from this github page.

After adding the Repository to Vorta, I get the error: Connection closed by remote host. Is borg working on the server?

Same for stable and beta release.

If I copy the borg command to cli --> works If I install Vorta via pip --> works

Any Idea where to start looking?

Best Regards Martin

Reproduction

  • [X] I tried to reproduce the issue.
  • [ ] I was able to reproduce the issue.

OS

macOS 14.1 23B74 arm64

Version of Vorta

0.8.12

What did you install Vorta with?

Binary

Version of Borg

1.2.6

Logs

2023-11-12 23:59:50,031 - vorta.keyring.darwin - DEBUG - Retrieved password for repo ssh://[email protected]/mnt/user/MacBorg
2023-11-12 23:59:50,798 - vorta.keyring.abc - DEBUG - No module named 'secretstorage'
2023-11-12 23:59:50,799 - vorta.keyring.abc - DEBUG - Using VortaDarwinKeyring
2023-11-12 23:59:50,799 - vorta.borg.borg_job - DEBUG - Using VortaDarwinKeyring keyring to store passwords.
2023-11-12 23:59:50,800 - vorta.keyring.darwin - DEBUG - Retrieved password for repo ssh://[email protected]/mnt/user/MacBorg
2023-11-12 23:59:50,800 - vorta.borg.borg_job - DEBUG - Password not found in primary keyring. Falling back to VortaDBKeyring.
2023-11-12 23:59:50,806 - vorta.borg.borg_job - INFO - Running command /opt/homebrew/bin/borg info --info --json --log-json ssh://[email protected]/mnt/user/MacBorg
2023-11-12 23:59:51,007 - vorta.borg.borg_job - WARNING - Using a pure-python msgpack! This will result in lower performance.
2023-11-12 23:59:51,013 - vorta.borg.borg_job - ERROR - Connection closed by remote host. Is borg working on the server?

hasdf avatar Nov 21 '23 19:11 hasdf

Maybe some firewall issue or related to the borg version used for each installation method?

real-yfprojects avatar Nov 21 '23 19:11 real-yfprojects

Did you try the latest beta version? https://github.com/borgbase/vorta/releases

m3nu avatar Nov 21 '23 22:11 m3nu

Also, if you have Borg in your PATH, Vorta will use that instead of the built-in one.

m3nu avatar Nov 21 '23 22:11 m3nu

As mentioned, I already tried the beta version. Homebrew binarys are in my PATH. And as you can see in the following logs, vorta always uses the homebrew binary in /opt/homebrew/bin/borg.

Firewall issue is not possible, the Client is on the same subnet without any firewall rules. And pip version works from same client. Command line borg also works. Mac OS Software firewall only applies to incoming traffic.

I have appended logs of all Vorta versions I've tried. Last one working, first two not working. It always uses the same settings from /Users/martin/Library/Application Support/Vorta/settings.db. But the issue is also present for a new installation without settings file. Then I cannot add the repository at all, but with the same error message. I tried the brew and binary version before testing the pip version.

Vorta 0.9.1-beta2 binary - not working

2023-11-22 21:41:21,314 - vorta.keyring.abc - DEBUG - No module named 'secretstorage'
2023-11-22 21:41:21,314 - vorta.keyring.abc - DEBUG - Using VortaDarwinKeyring
2023-11-22 21:41:21,314 - vorta.borg.borg_job - DEBUG - Using VortaDarwinKeyring keyring to store passwords.
2023-11-22 21:41:21,333 - vorta.keyring.darwin - DEBUG - Retrieved password for repo ssh://[email protected]/mnt/user/MacBorg
2023-11-22 21:41:21,428 - root - DEBUG - Command ipconfig getpacket en0 failed
2023-11-22 21:41:21,445 - root - DEBUG - Command ipconfig getpacket en4 failed
2023-11-22 21:41:21,463 - root - DEBUG - Command ipconfig getpacket en5 failed
2023-11-22 21:41:21,480 - root - DEBUG - Command ipconfig getpacket bridge0 failed
2023-11-22 21:41:21,516 - root - DEBUG - Command ipconfig getpacket en2 failed
2023-11-22 21:41:21,533 - root - DEBUG - Command ipconfig getpacket en3 failed
2023-11-22 21:41:21,543 - vorta.borg.jobs_manager - DEBUG - Add job for site 1
2023-11-22 21:41:21,544 - vorta.borg.jobs_manager - DEBUG - Start job on site: 1
2023-11-22 21:41:21,548 - vorta.borg.borg_job - INFO - Running command /opt/homebrew/bin/borg create --list --progress --info --log-json --json --filter=AM -C lz4 --exclude-from /var/folders/zr/7g316q5j29j9y14dr3kwf51c0000gn/T/tmpsyuxgqms ssh://[email protected]/mnt/user/MacBorg::Mac-mini-2-2023-11-22-214121 /Users/martin
2023-11-22 21:41:21,704 - vorta.borg.borg_job - WARNING - Using a pure-python msgpack! This will result in lower performance.
2023-11-22 21:41:21,709 - vorta.borg.borg_job - ERROR - Connection closed by remote host. Is borg working on the server?
2023-11-22 21:41:21,827 - vorta.borg.jobs_manager - DEBUG - Finish job for site: 1
2023-11-22 21:41:21,827 - vorta.borg.jobs_manager - DEBUG - No more jobs for site: 1
2023-11-22 21:41:21,827 - vorta.scheduler - DEBUG - Scheduler for profile 1 is disabled.

Vorta 0.8.11 installed via brew - not working

2023-11-22 21:49:07,699 - vorta.keyring.abc - DEBUG - No module named 'secretstorage'
2023-11-22 21:49:07,700 - vorta.keyring.abc - DEBUG - Using VortaDarwinKeyring
2023-11-22 21:49:07,700 - vorta.borg.borg_job - DEBUG - Using VortaDarwinKeyring keyring to store passwords.
2023-11-22 21:49:07,705 - vorta.keyring.darwin - DEBUG - Retrieved password for repo ssh://[email protected]/mnt/user/MacBorg
2023-11-22 21:49:07,802 - root - DEBUG - Command ipconfig getpacket en0 failed
2023-11-22 21:49:07,812 - root - DEBUG - Command ipconfig getpacket en4 failed
2023-11-22 21:49:07,821 - root - DEBUG - Command ipconfig getpacket en5 failed
2023-11-22 21:49:07,831 - root - DEBUG - Command ipconfig getpacket bridge0 failed
2023-11-22 21:49:07,850 - root - DEBUG - Command ipconfig getpacket en2 failed
2023-11-22 21:49:07,860 - root - DEBUG - Command ipconfig getpacket en3 failed
2023-11-22 21:49:07,862 - vorta.borg.jobs_manager - DEBUG - Add job for site 1
2023-11-22 21:49:07,862 - vorta.borg.jobs_manager - DEBUG - Start job on site: 1
2023-11-22 21:49:07,865 - vorta.borg.borg_job - INFO - Running command /opt/homebrew/bin/borg create --list --progress --info --log-json --json --filter=AM -C lz4 --exclude-from /var/folders/zr/7g316q5j29j9y14dr3kwf51c0000gn/T/tmptciqhlff ssh://[email protected]/mnt/user/MacBorg::Mac-mini-2.localdomain-2023-11-22-214907 /Users/martin
2023-11-22 21:49:07,991 - vorta.borg.borg_job - WARNING - Using a pure-python msgpack! This will result in lower performance.
2023-11-22 21:49:07,997 - vorta.borg.borg_job - ERROR - Connection closed by remote host. Is borg working on the server?
2023-11-22 21:49:08,114 - vorta.borg.jobs_manager - DEBUG - Finish job for site: 1
2023-11-22 21:49:08,114 - vorta.borg.jobs_manager - DEBUG - No more jobs for site: 1
2023-11-22 21:49:08,115 - vorta.scheduler - DEBUG - Scheduler for profile 1 is disabled.

Vorta 0.8.12 installed via pip - works like expected, just manually cancelled backup after a few seconds

2023-11-22 21:43:14,096 - vorta.keyring.abc - DEBUG - No module named 'secretstorage'
2023-11-22 21:43:14,096 - vorta.keyring.abc - DEBUG - Using VortaDarwinKeyring
2023-11-22 21:43:14,096 - vorta.borg.borg_job - DEBUG - Using VortaDarwinKeyring keyring to store passwords.
2023-11-22 21:43:14,112 - vorta.keyring.darwin - DEBUG - Retrieved password for repo ssh://[email protected]/mnt/user/MacBorg
2023-11-22 21:43:14,175 - root - DEBUG - Command ipconfig getpacket en0 failed
2023-11-22 21:43:14,184 - root - DEBUG - Command ipconfig getpacket en4 failed
2023-11-22 21:43:14,193 - root - DEBUG - Command ipconfig getpacket en5 failed
2023-11-22 21:43:14,202 - root - DEBUG - Command ipconfig getpacket bridge0 failed
2023-11-22 21:43:14,220 - root - DEBUG - Command ipconfig getpacket en2 failed
2023-11-22 21:43:14,230 - root - DEBUG - Command ipconfig getpacket en3 failed
2023-11-22 21:43:14,232 - vorta.borg.jobs_manager - DEBUG - Add job for site 1
2023-11-22 21:43:14,232 - vorta.borg.jobs_manager - DEBUG - Start job on site: 1
2023-11-22 21:43:14,236 - vorta.borg.borg_job - INFO - Running command /opt/homebrew/bin/borg create --list --progress --info --log-json --json --filter=AM -C lz4 --exclude-from /var/folders/zr/7g316q5j29j9y14dr3kwf51c0000gn/T/tmp9sf_z_9b ssh://[email protected]/mnt/user/MacBorg::Mac-mini-2.localdomain-2023-11-22-214314 /Users/martin
2023-11-22 21:43:14,358 - vorta.borg.borg_job - WARNING - Using a pure-python msgpack! This will result in lower performance.
2023-11-22 21:43:16,794 - vorta.borg.borg_job - INFO - Creating archive at "ssh://[email protected]/mnt/user/MacBorg::Mac-mini-2.localdomain-2023-11-22-214314"
2023-11-22 21:43:24,590 - vorta.borg.borg_job - INFO - Synchronizing chunks cache...
2023-11-22 21:43:24,596 - vorta.borg.borg_job - INFO - Archives: 7, w/ cached Idx: 0, w/ outdated Idx: 0, w/o cached Idx: 7.
2023-11-22 21:43:24,606 - vorta.borg.borg_job - INFO - Fetching and building archive index for Mac-mini-2.local-2023-11-16-220505.checkpoint ...
2023-11-22 21:43:41,027 - vorta.borg.borg_job - DEBUG - Cancel job on site default
2023-11-22 21:43:41,028 - vorta.borg.borg_job - DEBUG - Cancel job on site 1
2023-11-22 21:43:44,030 - vorta.borg.jobs_manager - INFO - Finished cancelling all jobs

hasdf avatar Nov 22 '23 20:11 hasdf

Thanks for the detailed logs. Nothing stands out though. My best guess would be that some Apple security features gets in the way. Like Full disk access? When you run Vorta from the terminal after installing it via Pip, it will run with Terminal privs, else with Vorta privs.

m3nu avatar Nov 22 '23 21:11 m3nu

Could it be ssh related?

real-yfprojects avatar Nov 22 '23 21:11 real-yfprojects

@m3nu both iTerm and Vorta have full disk access. I ran into this problem with the pip version, but the error messages are different. Should not be this issue.

@real-yfprojects I guess not.

Really not any idea where to start looking. Happy to provide more testing. Does anyone use the mac binary without problems?

hasdf avatar Nov 27 '23 23:11 hasdf

I test every mac binary locally first after building it on Github. This is on an Intel mac though, not Arm.

m3nu avatar Nov 27 '23 23:11 m3nu

Ok. I will try on another ARM mac. But it will take until next Weekend.

hasdf avatar Nov 27 '23 23:11 hasdf

Having the same issue on my M1 Mac. Problem even persists in latest beta. Stable release was installed via homebrew. Latest v0.9.1-beta3 has been installed manually through binary download.

sn0opy avatar Dec 11 '23 23:12 sn0opy

so it must be something broken with the borgbackup homebrew formula. With version 1.2.6, it was upgraded to Python 3.12 with a few more changes. I went back to 1.2.5 which fixed the problem for me since I was not even able to run borg manually via the CLI.

The way I worked around the problem:

brew tap-new $USER/local-borgbackup
brew tap homebrew/core
brew extract --version=1.2.5 borgbackup $USER/local-borgbackup
brew install [email protected]

sn0opy avatar Dec 12 '23 09:12 sn0opy

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Apr 08 '24 02:04 github-actions[bot]

This issue was closed because it has been stalled for 7 days with no activity.

github-actions[bot] avatar Apr 15 '24 02:04 github-actions[bot]