pimutils / vdirsyncer

📇 Synchronize calendars and contacts.
https://vdirsyncer.pimutils.org/
Other
1.53k stars 157 forks source link

Add `retry` parameter to http-ish storages #603

Open ahemwe opened 7 years ago

ahemwe commented 7 years ago

I use vdirsyncer with cron to backup caldav and carddav data from posteo.de

At one of two sync actions, I get at least one "connection refused" error.

error: Unknown error occured for my_calendar/jtmfam: HTTPSConnectionPool(host='posteo.de', port=8443): Max retries exceeded with url: /calendars/its.me/abc/ (Caused by NewConnectionError('<requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x71797070>: Failed to establish a new connection: [Errno 111] Connection refused',))
error: Use `-vdebug` to see the full traceback.
error: Unknown error occured for my_calendar/default: HTTPSConnectionPool(host='posteo.de', port=8443): Max retries exceeded with url: /calendars/its.me/default/ (Caused by NewConnectionError('<requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x717dbd10>: Failed to establish a new connection: [Errno 111] Connection refused',))
error: Use `-vdebug` to see the full traceback.
error: 2 out of 12 tasks failed.

Is there a possibility to allow more than one retry? Thanks a lot for this great tool!

untitaker commented 7 years ago

Makes sense, though you really should look into what causes those connection drops.

anotherwon commented 7 years ago

Since I have the same problem, I'd be interested in this too. I'm guessing it is caused by rate limiting at the hoster.

untitaker commented 7 years ago

Patches welcome :)

On Mon, May 22, 2017 at 07:09:09AM -0700, anotherwon wrote:

Since I have the same problem, I'd be interested in this too. I'm guessing it is caused by rate limiting at the hoster.

-- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/pimutils/vdirsyncer/issues/603#issuecomment-303110738

SinBirb commented 7 years ago

@ahemwe: May I ask for your config for Posteo? I haven't got mine to work.

Seeing several problems, among:

/.well-known/caldav was not found on this server.
Failed to discover collections
Unknown error occured: local variable 'discovered' referenced before assignment
ahemwe commented 7 years ago

@SinBirb You're wellcome :-)

[general]
# A folder where vdirsyncer can store some metadata about each pair.
status_path = "/home/pi/.vdirsyncer/status/"

# CARDDAV
[pair my_contacts]
a = "my_contacts_local"
b = "my_contacts_remote"

collections = ["from a", "from b"]

metadata = ["displayname"]

[storage my_contacts_local]
# A storage references actual data on a remote server or on the local disk.
# Similar to repositories in OfflineIMAP.
type = "filesystem"
path = "/home/pi/contacts/my.name@posteo.de"
fileext = ".vcf"

[storage my_contacts_remote]
type = "carddav"
url = "https://posteo.de:8443"
username = "my.name@posteo.de"
password.fetch = ["command", "...", "..."]
read_only = true

# CALDAV
[pair my_calendar]
a = "my_calendar_local"
b = "my_calendar_remote"
collections = ["from a", "from b"]

# Calendars also have a color property
metadata = ["displayname", "color"]

[storage my_calendar_local]
type = "filesystem"
path = "/home/pi/calendars/my.name@posteo.de"
fileext = ".ics"

[storage my_calendar_remote]
type = "caldav"
url = "https://posteo.de:8443"
username = "my.name@posteo.de"
password.fetch = ["command", "...", "..."]
read_only = true
trmendes commented 6 years ago

I was getting back the same error during discover "/.well-known/caldav was not found on this server."

But when I change my password fetch command from

password.fetch =  ["command", "pass", "email/posteo"]

to

password.fetch = ["prompt", "Posteo password: "]

it started to work :o

untitaker commented 6 years ago

Hmmm ok, please open a new issue for this

On 3 June 2018 14:48:12 GMT+02:00, Thiago Mendes notifications@github.com wrote:

I was getting back the same error during discover "/.well-known/caldav was not found on this server." When I change my password fetch commando from

password.fetch =  ["command", "pass", "email/posteo"]

to

password.fetch = ["prompt", "Posteo password: "]

it started to work :o

-- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/pimutils/vdirsyncer/issues/603#issuecomment-394160138

-- Sent from my Android device with K-9 Mail. Please excuse my brevity.