Sync doesn't work on wifi but else is ok


  • Hello All,

    I am puzzled because if I turn off wifi, sync will work fine, else it will return the following error(s):

    --- BEGIN DEBUG INFO ---
    
    SYNCHRONIZATION INFO
    
    Account: Account {name= XXXXXXXXX, type=at.bitfire.davdroid.address_book}
    
    Authority: com.android.contacts
    
    EXCEPTION
    
    java.net.ConnectException: Failed to connect to *********.net/**.***.***.**:443
    
        at okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.kt:25)
    
        at okhttp3.internal.connection.RealConnection.connect(RealConnection.kt:26)
    
        at okhttp3.internal.connection.ExchangeFinder.findHealthyConnection(ExchangeFinder.kt:111)
    
        at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.kt:20)
    
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:14)
    
        at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.kt:205)
    
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:14)
    
        at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.kt:37)
    
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:14)
    
        at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:36)
    
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:14)
    
        at okhttp3.brotli.BrotliInterceptor.intercept(BrotliInterceptor.kt:30)
    
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:14)
    
        at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:25)
    
        at okhttp3.internal.connection.RealCall.execute(RealCall.kt:12)
    
        at at.bitfire.dav4jvm.DavResource$propfind$2.invoke(DavResource.kt:19)
    
        at at.bitfire.dav4jvm.DavResource$propfind$2.invoke(DavResource.kt:1)
    
        at at.bitfire.dav4jvm.DavResource.followRedirects$build(DavResource.kt:1)
    
        at at.bitfire.dav4jvm.DavResource.propfind(DavResource.kt:10)
    
        at at.bitfire.davdroid.syncadapter.ContactsSyncManager$queryCapabilities$1.invoke(ContactsSyncManager.kt:3)
    
        at at.bitfire.davdroid.syncadapter.ContactsSyncManager$queryCapabilities$1.invoke(ContactsSyncManager.kt:1)
    
        at at.bitfire.davdroid.syncadapter.SyncManager.remoteExceptionContext(SyncManager.kt:1)
    
        at at.bitfire.davdroid.syncadapter.SyncManager.remoteExceptionContext(SyncManager.kt:8)
    
        at at.bitfire.davdroid.syncadapter.ContactsSyncManager.queryCapabilities(ContactsSyncManager.kt:1)
    
        at at.bitfire.davdroid.syncadapter.SyncManager$performSync$1.invoke(SyncManager.kt:6)
    
        at at.bitfire.davdroid.syncadapter.SyncManager$performSync$1.invoke(SyncManager.kt:1)
    
        at at.bitfire.davdroid.syncadapter.SyncManager.unwrapExceptions(SyncManager.kt:1)
    
        at at.bitfire.davdroid.syncadapter.SyncManager.performSync(SyncManager.kt:3)
    
        at at.bitfire.davdroid.syncadapter.ContactsSyncAdapterService$ContactsSyncAdapter.sync(ContactsSyncAdapterService.kt:15)
    
        at at.bitfire.davdroid.syncadapter.SyncAdapterService$SyncAdapter.onPerformSync(SyncAdapterService.kt:14)
    
        at android.content.AbstractThreadedSyncAdapter$SyncThread.run(AbstractThreadedSyncAdapter.java:334)
    
    Caused by: java.net.ConnectException: failed to connect to *********.net/**.***.***.** (port 443) from /10.67.36.102 (port 39972) after 15000ms: isConnected failed: ECONNABORTED (Software caused connection abort)
    
        at libcore.io.IoBridge.isConnected(IoBridge.java:278)
    
        at libcore.io.IoBridge.connectErrno(IoBridge.java:187)
    
        at libcore.io.IoBridge.connect(IoBridge.java:129)
    
        at java.net.PlainSocketImpl.socketConnect(PlainSocketImpl.java:137)
    
        at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:391)
    
        at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:231)
    
        at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:213)
    
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:436)
    
        at java.net.Socket.connect(Socket.java:621)
    
        at okhttp3.internal.platform.AndroidPlatform.connectSocket(AndroidPlatform.kt:1)
    
        at okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.kt:18)
    
        ... 30 more
    
    Caused by: android.system.ErrnoException: isConnected failed: ECONNABORTED (Software caused connection abort)
    
        at libcore.io.IoBridge.isConnected(IoBridge.java:267)
    
        ... 40 more
    
    REMOTE RESOURCE
    
    https://*********.net/remote.php/dav/addressbooks/users/gian/contacts/
    
    SOFTWARE INFORMATION
    
    ┌────────────────────────────────┬─────────────────────────────┬────────────┬──────────────────────┬───────┐
    
    │ Package                        │ Version                     │ Code       │ Installer            │ Notes │
    
    ├────────────────────────────────┼─────────────────────────────┼────────────┼──────────────────────┼───────┤
    
    │ at.bitfire.davdroid            │ 3.4.0.1-gplay               │ 304000100  │ com.android.vending  │       │
    
    │ org.dmfs.tasks                 │ 1.4.2                       │ 82200      │ com.android.vending  │       │
    
    │ com.android.providers.contacts │ 9.2.0.324                   │ 90200324   │ —                    │       │
    
    │ com.android.providers.calendar │ 9.0.4.310                   │ 90004310   │ —                    │       │
    
    │ com.android.contacts           │ 9.3.4.370                   │ 90304370   │ —                    │       │
    
    │ com.google.android.contacts    │ 3.54.2.396470576            │ 2678776    │ com.android.vending  │       │
    
    │ com.android.calendar           │ 9.1.7.352                   │ 90107352   │ com.huawei.appmarket │       │
    
    │ com.google.android.calendar    │ 2021.37.1-399144959-release │ 2017034908 │ com.android.vending  │       │
    
    │ org.wikipedia                  │ 2.7.50374-r-2021-09-13      │ 50374      │ com.android.vending  │       │
    
    └────────────────────────────────┴─────────────────────────────┴────────────┴──────────────────────┴───────┘
    
    
    SYSTEM INFORMATION
    
    Android version: 9 (ANE-LX1 9.1.0.368(C432E6R1P7))
    
    Device: HUAWEI ANE-LX1 (HWANE)
    
    Locale(s): [it_IT,en_GB,ru_RU]
    
    
    CONNECTIVITY
    
     ☒ wlan0
    
       - [ Transports: WIFI Capabilities: NOT_METERED INTERNET NOT_RESTRICTED TRUSTED NOT_VPN VALIDATED NOT_ROAMING FOREGROUND NOT_CONGESTED NOT_SUSPENDED LinkUpBandwidth>=1048576Kbps LinkDnBandwidth>=1048576Kbps SignalStrength: -69]
    
       - DNS: 192.168.2.1
    
    Data saver: disabled
    
    
    CONFIGURATION
    
    App standby bucket: 5
    
    Power saving disabled: yes
    
    System-wide synchronization: automatically
    
    Notifications:
    
     - sync isBlocked=false
    
      * syncProblems: importance=3
    
      * syncIoErrors: importance=1
    
      * syncWarnings: importance=2
    
     - cert4android: importance=3
    
     - status: importance=2
    
     - general: importance=3
    
     - debug: importance=2
    
     - syncStatus: importance=2
    
    Permissions:
    
     - ACCESS_NETWORK_STATE: granted
    
     - ACCESS_WIFI_STATE: granted
    
     - FOREGROUND_SERVICE: granted
    
     - INTERNET: granted
    
     - READ_SYNC_SETTINGS: granted
    
     - READ_SYNC_STATS: granted
    
     - WRITE_SYNC_SETTINGS: granted
    
     - RECEIVE_BOOT_COMPLETED: granted
    
     - REQUEST_IGNORE_BATTERY_OPTIMIZATIONS: granted
    
     - READ_CONTACTS: granted
    
     - WRITE_CONTACTS: granted
    
     - READ_CALENDAR: granted
    
     - WRITE_CALENDAR: granted
    
     - ACCESS_COARSE_LOCATION: denied
    
     - ACCESS_FINE_LOCATION: denied
    
     - ACCESS_BACKGROUND_LOCATION: denied
    
     - org.dmfs.permission.READ_TASKS: granted
    
     - org.dmfs.permission.WRITE_TASKS: granted
    
     - org.tasks.permission.READ_TASKS: denied
    
     - org.tasks.permission.WRITE_TASKS: denied
    
    
    ACCOUNTS
    
     - Account: gianluca.*********@****.it
    
    ┌──────────────────────────────────┬──────────┬───────────┬──────────┬───────────────────────────────────┐
    
    │ Authority                        │ Syncable │ Auto-sync │ Interval │ Entries                           │
    
    ├──────────────────────────────────┼──────────┼───────────┼──────────┼───────────────────────────────────┤
    
    │ at.bitfire.davdroid.addressbooks │ 1        │ true      │ 240 min  │ —                                 │
    
    │ com.android.calendar             │ 1        │ true      │ 60 min   │ 110 event(s)                      │
    
    │ org.dmfs.tasks                   │ 1        │ true      │ 240 min  │ 869 OpenTasks task(s)             │
    
    │ org.tasks.opentasks              │ 0        │ false     │ 1440 min │ —                                 │
    
    │ com.android.contacts             │ 0        │ false     │ —        │ 0 wrongly assigned raw contact(s) │
    
    └──────────────────────────────────┴──────────┴───────────┴──────────┴───────────────────────────────────┘
    
      WiFi only: false
    
      Contact group method: GROUP_VCARDS
    
      Time range (past days): 90
    
      Default alarm (min before): null
    
      Manage calendar colors: true
    
      Use event colors: false
    
      * Address book: Contacts (gianluca.*********@****.it nA)
    
        
    
        ┌──────────────────────┬──────────┬───────────┬──────────┬────────────────────┐
    
        │ Authority            │ Syncable │ Auto-sync │ Interval │ Entries            │
    
        ├──────────────────────┼──────────┼───────────┼──────────┼────────────────────┤
    
        │ com.android.contacts │ 1        │ true      │ 1440 min │ 653 raw contact(s) │
    
        └──────────────────────┴──────────┴───────────┴──────────┴────────────────────┘
    
        
    
        URL: https://*********.net/remote.php/dav/addressbooks/users/gian/contacts/
    
        Read-only: 0
    
    
    DATABASE DUMP
    
    android_metadata
    
    ┌────────┐
    
    │ locale │
    
    ├────────┤
    
    │ it_IT  │
    
    └────────┘
    
    sqlite_sequence
    
    ┌────────────┬─────┐
    
    │ name       │ seq │
    
    ├────────────┼─────┤
    
    │ service    │ 7   │
    
    │ homeset    │ 8   │
    
    │ collection │ 38  │
    
    │ syncstats  │ 484 │
    
    └────────────┴─────┘
    
    service
    
    ┌────┬────────────────────────┬─────────┬─────────────────────────────────────────────────────────────┐
    
    │ id │ accountName            │ type    │ principal                                                   │
    
    ├────┼────────────────────────┼─────────┼─────────────────────────────────────────────────────────────┤
    
    │ 6  │ gianluca.*********@****.it │ carddav │ https://*********.net/remote.php/dav/principals/users/gian/ │
    
    │ 7  │ gianluca.*********@****.it │ caldav  │ https://*********.net/remote.php/dav/principals/users/gian/ │
    
    └────┴────────────────────────┴─────────┴─────────────────────────────────────────────────────────────┘
    
    homeset
    
    ┌────┬───────────┬───────────────────────────────────────────────────────────────┬──────────┬─────────────┬──────────┐
    
    │ id │ serviceId │ url                                                           │ privBind │ displayName │ personal │
    
    ├────┼───────────┼───────────────────────────────────────────────────────────────┼──────────┼─────────────┼──────────┤
    
    │ 7  │ 7         │ https://*********.net/remote.php/dav/calendars/gian/          │ 1        │ —           │ 1        │
    
    │ 8  │ 6         │ https://*********.net/remote.php/dav/addressbooks/users/gian/ │ 1        │ —           │ 1        │
    
    └────┴───────────┴───────────────────────────────────────────────────────────────┴──────────┴─────────────┴──────────┘
    
    collection
    
    ┌────┬───────────┬──────────────┬────────────────────────────────────────────────────────────────────────────────────────────────────────────┬──────────────────┬────────────┬───────────────┬────────────────────┬─────────────┬───────────┬──────────┬────────────────┬───────────────┬──────────────────┬────────┬──────┬───────────┬───────┐
    
    │ id │ serviceId │ type         │ url                                                                                                        │ privWriteContent │ privUnbind │ forceReadOnly │ displayName        │ description │ color     │ timezone │ supportsVEVENT │ supportsVTODO │ supportsVJOURNAL │ source │ sync │ homeSetId │ owner │
    
    ├────┼───────────┼──────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────┼──────────────────┼────────────┼───────────────┼────────────────────┼─────────────┼───────────┼──────────┼────────────────┼───────────────┼──────────────────┼────────┼──────┼───────────┼───────┤
    
    │ 27 │ 7         │ CALENDAR     │ https://*********.net/remote.php/dav/calendars/gian/personal/                                              │ 1                │ 1          │ 0             │ Personal           │ —           │ -8824149  │ —        │ 1              │ 0             │ 0                │ —      │ 0    │ —         │ —     │
    
    │ 28 │ 7         │ CALENDAR     │ https://*********.net/remote.php/dav/calendars/gian/imported-glsics/                                       │ 1                │ 1          │ 0             │ GLS                │ —           │ -14867988 │ —        │ 1              │ 1             │ 0                │ —      │ 1    │ —         │ —     │
    
    │ 29 │ 7         │ CALENDAR     │ https://*********.net/remote.php/dav/calendars/gian/imported-intragnolaics/                                │ 1                │ 1          │ 0             │ Intragnola         │ —           │ -2541936  │ —        │ 1              │ 1             │ 0                │ —      │ 1    │ —         │ —     │
    
    │ 30 │ 7         │ CALENDAR     │ https://*********.net/remote.php/dav/calendars/gian/imported-polidoraics/                                  │ 1                │ 1          │ 0             │ Polidora           │ —           │ -14324190 │ —        │ 1              │ 1             │ 0                │ —      │ 1    │ —         │ —     │
    
    │ 31 │ 7         │ CALENDAR     │ https://*********.net/remote.php/dav/calendars/gian/imported-****ics/                                      │ 1                │ 1          │ 0             │ ****               │ —           │ -15623045 │ —        │ 1              │ 1             │ 0                │ —      │ 1    │ —         │ —     │
    
    │ 32 │ 7         │ CALENDAR     │ https://*********.net/remote.php/dav/calendars/gian/contact_birthdays/                                     │ 0                │ 0          │ 0             │ Contact birthdays  │ —           │ -54       │ —        │ 1              │ 0             │ 0                │ —      │ 0    │ —         │ —     │
    
    │ 33 │ 7         │ CALENDAR     │ https://*********.net/remote.php/dav/calendars/gian/app-generated--deck--board-3/                          │ 0                │ 0          │ 0             │ Deck: Personal     │ —           │ -16742459 │ —        │ 0              │ 1             │ 0                │ —      │ 0    │ —         │ —     │
    
    │ 34 │ 7         │ CALENDAR     │ https://*********.net/remote.php/dav/calendars/gian/app-generated--deck--board-8/                          │ 0                │ 0          │ 0             │ Deck: Prenotazioni │ —           │ -11050862 │ —        │ 0              │ 1             │ 0                │ —      │ 0    │ —         │ —     │
    
    │ 35 │ 7         │ CALENDAR     │ https://*********.net/remote.php/dav/calendars/gian/app-generated--deck--board-7/                          │ 0                │ 0          │ 0             │ Deck: Polidora new │ —           │ -4831587  │ —        │ 0              │ 1             │ 0                │ —      │ 0    │ —         │ —     │
    
    │ 36 │ 7         │ CALENDAR     │ https://*********.net/remote.php/dav/calendars/gian/app-generated--deck--board-5/                          │ 0                │ 0          │ 0             │ Deck: Sito ****    │ —           │ -16777216 │ —        │ 0              │ 1             │ 0                │ —      │ 0    │ —         │ —     │
    
    │ 37 │ 6         │ ADDRESS_BOOK │ https://*********.net/remote.php/dav/addressbooks/users/gian/contacts/                                     │ 1                │ 1          │ 0             │ Contacts           │ —           │ —         │ —        │ —              │ —             │ —                │ —      │ 1    │ —         │ —     │
    
    │ 38 │ 6         │ ADDRESS_BOOK │ https://*********.net/remote.php/dav/addressbooks/users/gian/z-app-generated--contactsinteraction--recent/ │ 0                │ 0          │ 0             │ Recently contacted │ —           │ —         │ —        │ —              │ —             │ —                │ —      │ 0    │ —         │ —     │
    
    └────┴───────────┴──────────────┴────────────────────────────────────────────────────────────────────────────────────────────────────────────┴──────────────────┴────────────┴───────────────┴────────────────────┴─────────────┴───────────┴──────────┴────────────────┴───────────────┴──────────────────┴────────┴──────┴───────────┴───────┘
    
    room_master_table
    
    ┌────┬──────────────────────────────────┐
    
    │ id │ identity_hash                    │
    
    ├────┼──────────────────────────────────┤
    
    │ 42 │ 7e4bfdf7f9fa3529c333cf9485f8cf50 │
    
    └────┴──────────────────────────────────┘
    
    syncstats
    
    ┌─────┬──────────────┬──────────────────────┬───────────────┐
    
    │ id  │ collectionId │ authority            │ lastSync      │
    
    ├─────┼──────────────┼──────────────────────┼───────────────┤
    
    │ 471 │ 31           │ org.dmfs.tasks       │ 1633195475631 │
    
    │ 476 │ 28           │ org.dmfs.tasks       │ 1633195480420 │
    
    │ 477 │ 29           │ org.dmfs.tasks       │ 1633195484874 │
    
    │ 478 │ 30           │ org.dmfs.tasks       │ 1633195498843 │
    
    │ 479 │ 31           │ com.android.calendar │ 1633195581792 │
    
    │ 480 │ 28           │ com.android.calendar │ 1633195584984 │
    
    │ 481 │ 29           │ com.android.calendar │ 1633195587022 │
    
    │ 482 │ 30           │ com.android.calendar │ 1633195590517 │
    
    │ 484 │ 37           │ com.android.contacts │ 1633199565811 │
    
    └─────┴──────────────┴──────────────────────┴───────────────┘
    
    
    APP SETTINGS
    
    1. SharedPreferencesProvider canWrite=true
    
    ┌───────────────────────────┬───────────┐
    
    │ Setting                   │ Value     │
    
    ├───────────────────────────┼───────────┤
    
    │ distrust_system_certs     │ false     │
    
    │ foreground_service        │ false     │
    
    │ hint_AutostartPermissions │ false     │
    
    │ log_to_file               │ false     │
    
    │ override_proxy            │ false     │
    
    │ override_proxy_host       │ localhost │
    
    │ override_proxy_port       │ 8118      │
    
    └───────────────────────────┴───────────┘
    
    2. DefaultsProvider canWrite=false
    
    ┌───────────────────────┬───────────┐
    
    │ Setting               │ Value     │
    
    ├───────────────────────┼───────────┤
    
    │ default_sync_interval │ 14400     │
    
    │ distrust_system_certs │ false     │
    
    │ override_proxy        │ false     │
    
    │ override_proxy_host   │ localhost │
    
    │ override_proxy_port   │ 8118      │
    
    └───────────────────────┴───────────┘
    
    --- END DEBUG INFO ---
    

    Any ideas?

    Thanks for your comments,
    -GianLuca

  • admin

    @gian said in Sync doesn't work on wifi but else is ok:

    ECONNABORTED
    seems that your wifi is somehow not accepting requests by DAVx5. Maybe a firewall/router configuration or something like that…?


  • @devvv4ever thanks for your kind reply.

    I don’t think so.
    The data is hosted on the LAN, and the host is port forwarded to the public ip.
    I can access both sides.

  • admin

    @gian did you restart the device once? maybe the internal network stack of Android is in an unknown state - it would be build up again after a reboot. DAVx5 depends on the system network connections.

    what happens if you enter the address that DAVx5 wants to connect to in a web browser on the same mobile?


  • @devvv4ever , it’s weird because if I enter on the mobile the domain, it will go without problem, showing a closed lock, while if I enter the IP address:443 I get:
    Bad request
    Connection is not safe

  • admin

    @gian maybe a certificate problem then. maybe your router/wifi has no ciphers to ensure creating a secure connection?

    edit: this is a good website for testing security related stuff https://www.ssllabs.com/ssltest/


  • @devvv4ever
    SSLLabs gives A+…

  • admin

    @gian then you know that it is nothing with the certificates at least!

    which server do you use?

Similar topics