GithubHelp home page GithubHelp logo

Comments (6)

WhyNotHugo avatar WhyNotHugo commented on May 30, 2024

This is very odd, looks like a network error before vdirsyncer can send the full request.

Do you have access to the server logs? Can you run it with --dump-dav-xml?

from vdirsyncer.

kohane27 avatar kohane27 commented on May 30, 2024

I was having issue syncing this morning. Then I realized I can't even reach my Nextcloud service provider in the browser. An hour later I saw there's a new Nextcloud release and I can access the browser again and vidrsyncer works again. Please OP can try again?

from vdirsyncer.

maxigaz avatar maxigaz commented on May 30, 2024

@WhyNotHugo I'm using Xandikos with uwsgi (for password-based authentication) and I'm having trouble with passing the argument --dump-dav-xml to Xandikos. Could you provide me with some pointers on how to do that?

This is the content of my /etc/uwsgi/xandikos.ini (with sensitive data removed):

[uwsgi]
http-socket = URL:PORT
umask = 022
master = true
cheaper = 0
processes = 1
plugins = python
route = ^/ basicauth:myrealm,USERNAME:PASSWORD
module = xandikos.wsgi:app
env = XANDIKOSPATH=/home/USERNAME/dav
env = CURRENT_USER_PRINCIPAL=/user1/
env = AUTOCREATE=principal
uid = USERNAME

Currently, uwsgi is run through a systemd service file provided by the Arch Linux package uwsgi, which is enabled with systemctl enable [email protected].

from vdirsyncer.

clustor avatar clustor commented on May 30, 2024

I see the same issue with 0.19.1. With Wireshark, what I notice is that uWsgi/xandikos is closing the connection right after PROPFIND and PUT throws an error. It seems to me that aiohttp session might need to be opened after every request. Not sure why uWsgi is closing the session right after sending the response.

Syncing tasks_calendar/calendar
debug: ====================
debug: PROPFIND http://192.168.1.117:8080/dav/user1/calendars/calendar/
debug: {'User-Agent': 'vdirsyncer/0.19.1', 'Content-Type': 'application/xml; charset=UTF-8', 'Depth': '1'}
debug: b'<?xml version="1.0" encoding="utf-8" ?>\n            <propfind xmlns="DAV:">\n                <prop>\n                    <resourcetype/>\n                    <getcontenttype/>\n                    <getetag/>\n                </prop>\n            </propfind>\n            '
debug: Sending request...
debug: 207
debug: <CIMultiDictProxy('Content-Type': 'text/xml; charset="utf-8"', 'Content-Length': '465')>
debug: <StreamReader 465 bytes eof>
debug: Already normalized: '/dav/user1/calendars/calendar/'
debug: Skipping '/dav/user1/calendars/calendar/', is collection.
Copying (uploading) item HM0EFH6MBHY76Y6E2N8S5AQ62KFSW9SH68OP to tasks_remote/calendar
debug: Normalized URL from 'HM0EFH6MBHY76Y6E2N8S5AQ62KFSW9SH68OP.ics' to '/dav/user1/calendars/calendar/HM0EFH6MBHY76Y6E2N8S5AQ62KFSW9SH68OP.ics'
debug: ====================
debug: PUT http://192.168.1.117:8080/dav/user1/calendars/calendar/HM0EFH6MBHY76Y6E2N8S5AQ62KFSW9SH68OP.ics
debug: {'User-Agent': 'vdirsyncer/0.19.1', 'Content-Type': 'text/calendar', 'If-None-Match': '*'}
debug: b'BEGIN:VCALENDAR\r\nVERSION:2.0\r\nPRODID:-//PIMUTILS.ORG//NONSGML khal / icalendar //EN\r\nBEGIN:VEVENT\r\nSUMMARY:16:30 Test event from Khal\r\nDTSTART;VALUE=DATE:20230718\r\nDTEND;VALUE=DATE:20230719\r\nDTSTAMP:20230717T172436Z\r\nUID:HM0EFH6MBHY76Y6E2N8S5AQ62KFSW9SH68OP\r\nEND:VEVENT\r\nEND:VCALENDAR\r\n'
debug: Sending request...
error: Unknown error occurred for tasks_calendar/calendar: [Errno None] Can not write request body for http://192.168.1.117:8080/dav/user1/calendars/calendar/HM0EFH6MBHY76Y6E2N8S5AQ62KFSW9SH68OP.ics
error: Use `-vdebug` to see the full traceback.
debug:   File "/usr/local/Cellar/vdirsyncer/0.19.1/libexec/lib/python3.11/site-packages/vdirsyncer/cli/utils.py", line 70, in handle_cli_error
debug:     raise e
debug:   File "/usr/local/Cellar/vdirsyncer/0.19.1/libexec/lib/python3.11/site-packages/vdirsyncer/sync/__init__.py", line 158, in sync
debug:     await action.run(a_info, b_info, conflict_resolution, partial_sync)
debug:   File "/usr/local/Cellar/vdirsyncer/0.19.1/libexec/lib/python3.11/site-packages/vdirsyncer/sync/__init__.py", line 181, in run
debug:     await self._run_impl(a, b)
debug:   File "/usr/local/Cellar/vdirsyncer/0.19.1/libexec/lib/python3.11/site-packages/vdirsyncer/sync/__init__.py", line 210, in _run_impl
debug:     href, etag = await self.dest.storage.upload(self.item)
debug:                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
debug:   File "/usr/local/Cellar/vdirsyncer/0.19.1/libexec/lib/python3.11/site-packages/vdirsyncer/storage/base.py", line 22, in inner
debug:     return await f(self, *args, **kwargs)
debug:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
debug:   File "/usr/local/Cellar/vdirsyncer/0.19.1/libexec/lib/python3.11/site-packages/vdirsyncer/storage/base.py", line 22, in inner
debug:     return await f(self, *args, **kwargs)
debug:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
debug:   File "/usr/local/Cellar/vdirsyncer/0.19.1/libexec/lib/python3.11/site-packages/vdirsyncer/storage/dav.py", line 601, in upload
debug:     rv = await self._put(href, item, None)
debug:          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
debug:   File "/usr/local/Cellar/vdirsyncer/0.19.1/libexec/lib/python3.11/site-packages/vdirsyncer/storage/dav.py", line 569, in _put
debug:     response = await self.session.request(
debug:                ^^^^^^^^^^^^^^^^^^^^^^^^^^^
debug:   File "/usr/local/Cellar/vdirsyncer/0.19.1/libexec/lib/python3.11/site-packages/vdirsyncer/storage/dav.py", line 416, in request
debug:     return await http.request(method, url, session=session, **more)
debug:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
debug:   File "/usr/local/Cellar/vdirsyncer/0.19.1/libexec/lib/python3.11/site-packages/vdirsyncer/http.py", line 132, in request
debug:     response = await session.request(method, url, **kwargs)
debug:                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
debug:   File "/usr/local/Cellar/vdirsyncer/0.19.1/libexec/lib/python3.11/site-packages/aiohttp/client.py", line 560, in _request
debug:     await resp.start(conn)
debug:   File "/usr/local/Cellar/vdirsyncer/0.19.1/libexec/lib/python3.11/site-packages/aiohttp/client_reqrep.py", line 901, in start
debug:     message, payload = await protocol.read()  # type: ignore[union-attr]
debug:                        ^^^^^^^^^^^^^^^^^^^^^
debug:   File "/usr/local/Cellar/vdirsyncer/0.19.1/libexec/lib/python3.11/site-packages/aiohttp/streams.py", line 616, in read
debug:     await self._waiter

from vdirsyncer.

clustor avatar clustor commented on May 30, 2024

Using gunicorn instead of uwsgi solved this issue for me. Not clear why uwsgi is closing the connection after first request.

from vdirsyncer.

WhyNotHugo avatar WhyNotHugo commented on May 30, 2024

I might be wrong here, but it sounds like uwsgi's behaviour is incorrect.

This is likely worth reporting on the uwsgi side.

from vdirsyncer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.