Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

Backup Upload Failed #20

Open
knudeh opened this issue Jan 12, 2021 · 5 comments
Open

Backup Upload Failed #20

knudeh opened this issue Jan 12, 2021 · 5 comments
Labels
bug Something isn't working

Comments

@knudeh
Copy link

knudeh commented Jan 12, 2021

Output of bench version

erpnext 13.x.x-develop
frappe 13.x.x-develop
nextcloud_integration 0.0.1

Steps to reproduce the issue

  1. Install according to Readme
  2. set settings, save
  3. backup now

Observed result

Got an Email to "Send Notifications To" with back log, see below.
There are no files uploaded/backed up.

Expected result

Successful backup

Stacktrace / full error message

Error message: Traceback (most recent call last): 
 File "/home/erpnext/erpnext-test/env/lib/python3.9/site-packages/urllib3/connectionpool.py", line 670, in urlopen httplib_response = self._make_request( 
 File "/home/erpnext/erpnext-test/env/lib/python3.9/site-packages/urllib3/connectionpool.py", line 426, in _make_request six.raise_from(e, None) 
 File "", line 3, in raise_from 
 File "/home/erpnext/erpnext-test/env/lib/python3.9/site-packages/urllib3/connectionpool.py", line 421, in _make_request httplib_response = conn.getresponse() 
 File "/usr/lib/python3.9/http/client.py", line 1347, in getresponse response.begin() 
 File "/usr/lib/python3.9/http/client.py", line 307, in begin version, status, reason = self._read_status() 
 File "/usr/lib/python3.9/http/client.py", line 268, in _read_status line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1") 
 File "/usr/lib/python3.9/socket.py", line 704, in readinto return self._sock.recv_into(b) 
 File "/home/erpnext/erpnext-test/env/lib/python3.9/site-packages/urllib3/contrib/pyopenssl.py", line 318, in recv_into raise SocketError(str(e)) OSError: (104, 'ECONNRESET') During handling of the above exception, another exception occurred: Traceback (most recent call last): 
 File "/home/erpnext/erpnext-test/env/lib/python3.9/site-packages/requests/adapters.py", line 439, in send resp = conn.urlopen( 
 File "/home/erpnext/erpnext-test/env/lib/python3.9/site-packages/urllib3/connectionpool.py", line 724, in urlopen retries = retries.increment( 
 File "/home/erpnext/erpnext-test/env/lib/python3.9/site-packages/urllib3/util/retry.py", line 403, in increment raise six.reraise(type(error), error, _stacktrace) 
 File "/home/erpnext/erpnext-test/env/lib/python3.9/site-packages/urllib3/packages/six.py", line 734, in reraise raise value.with_traceback(tb) 
 File "/home/erpnext/erpnext-test/env/lib/python3.9/site-packages/urllib3/connectionpool.py", line 670, in urlopen httplib_response = self._make_request( 
 File "/home/erpnext/erpnext-test/env/lib/python3.9/site-packages/urllib3/connectionpool.py", line 426, in _make_request six.raise_from(e, None) 
 File "", line 3, in raise_from 
 File "/home/erpnext/erpnext-test/env/lib/python3.9/site-packages/urllib3/connectionpool.py", line 421, in _make_request httplib_response = conn.getresponse() 
 File "/usr/lib/python3.9/http/client.py", line 1347, in getresponse response.begin() 
 File "/usr/lib/python3.9/http/client.py", line 307, in begin version, status, reason = self._read_status() 
 File "/usr/lib/python3.9/http/client.py", line 268, in _read_status line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1") 
 File "/usr/lib/python3.9/socket.py", line 704, in readinto return self._sock.recv_into(b) 
 File "/home/erpnext/erpnext-test/env/lib/python3.9/site-packages/urllib3/contrib/pyopenssl.py", line 318, in recv_into raise SocketError(str(e)) urllib3.exceptions.ProtocolError: ('Connection aborted.', OSError("(104, 'ECONNRESET')")) During handling of the above exception, another exception occurred: Traceback (most recent call last): 
 File "/home/erpnext/erpnext-test/apps/nextcloud_integration/nextcloud_integration/nextcloud_integration/doctype/nextcloud_setting/nextcloud_setting.py", line 26, in start_taking_backup self.backup_to_nextcloud(upload_db_backup) 
 File "/home/erpnext/erpnext-test/apps/nextcloud_integration/nextcloud_integration/nextcloud_integration/doctype/nextcloud_setting/nextcloud_setting.py", line 58, in backup_to_nextcloud self.check_for_upload_folder() 
 File "/home/erpnext/erpnext-test/apps/nextcloud_integration/nextcloud_integration/nextcloud_integration/doctype/nextcloud_setting/nextcloud_setting.py", line 135, in check_for_upload_folder response = self.session.request("PROPFIND", self.upload_path, headers={"Depth": "0"}, allow_redirects=False) 
 File "/home/erpnext/erpnext-test/env/lib/python3.9/site-packages/requests/sessions.py", line 530, in request resp = self.send(prep, **send_kwargs) 
 File "/home/erpnext/erpnext-test/env/lib/python3.9/site-packages/requests/sessions.py", line 643, in send r = adapter.send(request, **kwargs) 
 File "/home/erpnext/erpnext-test/env/lib/python3.9/site-packages/requests/adapters.py", line 498, in send raise ConnectionError(err, request=request) requests.exceptions.ConnectionError: ('Connection aborted.', OSError("(104, 'ECONNRESET')"))

Might be related:
https://stackoverflow.com/questions/43165341/python3-requests-connectionerror-connection-aborted-oserror104-econnr

@knudeh knudeh added the bug Something isn't working label Jan 12, 2021
@wojosc
Copy link
Contributor

wojosc commented Mar 23, 2021

@knudeh I just ran this on v12 and it works. I will try it on v13 soon and let you know if I had a similar problem.

@markusrock
Copy link

It's also not working here.

Output of bench version

ERPNext: v13.0.2 (version-13)
Frappe Framework: v13.0.3 (version-13)
Nextcloud Integration: v0.0.1 (HEAD)

Stacktrace / full error message

Error message: ./xxxx.frappe.cloud/private/backups/20210422_121022-xxxx_frappe_cloud-database.sql.gz - Failed while uploading Site Config ./xxxx.frappe.cloud/private/backups/20210422_121022-werock1_frappe_cloud-site_config_backup.json - Failed while uploading DB Traceback (most recent call last): File "/home/frappe/frappe-bench/apps/nextcloud_integration/nextcloud_integration/nextcloud_integration/doctype/nextcloud_setting/nextcloud_setting.py", line 28, in start_taking_backup raise Exception Exception 

Additional information

Installed via Frappcloud

@knudeh
Copy link
Author

knudeh commented Apr 26, 2021

Follow-up:

  • moved nextcloud to a differnet server, might be unrelated

  • some bench update inbetween

  • got a differnet error:
    File "/home/erpnext/erpnext-test/apps/frappe/frappe/utils/backups.py", line 443, in take_dump frappe.utils.execute_in_shell(command, low_priority=True) TypeError: execute_in_shell() got an unexpected keyword argument 'low_priority'
    Removed ", low_priority=True" and got successful backup

  • Checked "Backup Files"
    File "/home/erpnext/erpnext-test/apps/frappe/frappe/utils/backups.py", line 329, in backup_files frappe.utils.execute_in_shell( TypeError: execute_in_shell() got an unexpected keyword argument 'low_priority' and backup failed again

frappe/frappe/utils/init.py
310 def execute_in_shell(cmd, verbose=0, low_priority=False):

@aditsanghvi
Copy link

any updates??

@thejoe8495
Copy link

I repaired the nextcloud long time ago for my version 13 installation, can you try my version?

https://github.com/thejoe8495/nextcloud-integration

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants