Navigation

    Kopano
    • Register
    • Login
    • Search
    • Categories
    • Get Official Kopano Support
    • Recent
    Statement regarding the closure of the Kopano community forum and the end of the community edition

    kdav does not sync correctly - 500 internal Server Error

    Other Clients
    6
    14
    1707
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • boospy
      boospy last edited by

      Hello all,

      we installed kdav on us kopano Server on UCS. It works with accounts with a few contacts, but with the central address book with over 400 contacts, we get an error. But don’t know what is to do, or where is the issue. Here is the end of the Log:

      25.07.2019 21:47:15 [16920] [TRACE]  dav KopanoDavBackend->GetMapiMessageForId(): Try PR_SOURCE_KEY a9a78371807b4
      25.07.2019 21:47:15 [16920] [TRACE]  dav KopanoDavBackend->GetStore(): storename gemeinsam-firma
      25.07.2019 21:47:15 [16920] [TRACE]  dav KopanoDavBackend->GetStore(): storename gemeinsam-firma
      25.07.2019 21:47:15 [16920] [TRACE]  dav KopanoDavBackend->GetIdOfMapiMessage(): Finding ID of Resource id #523
      25.07.2019 21:47:15 [16920] [DEBUG]  dav KopanoDavBackend->GetIdOfMapiMessage(): Found PR_SOURCE_KEY: a9a78371807
      25.07.2019 21:47:15 [16920] [TRACE] card KopanoCardDavBackend->getCard(): returned data id: a9a78371807b4a5db7856
      25.07.2019 21:47:15 [16920] [DEBUG] main KLogger->LogOutgoing(): OUTPUT:
      HTTP/1.1 500 Internal Server Error
      X-KDAV-Version: GIT
      X-Sabre-Version: 3.2.2
      Content-Type: application/xml; charset=utf-8
      
      <?xml version="1.0" encoding="utf-8"?>
      <d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
        <s:sabredav-version>3.2.2</s:sabredav-version>
        <s:exception>InvalidArgumentException</s:exception>
        <s:message>This parser can only read from strings or streams.</s:message>
      </d:error>
      
      25.07.2019 21:47:15 [16920] [DEBUG] main httpcode='500' memory='8.68 MiB/10.00 MiB' time='4.33s'
      25.07.2019 21:47:15 [16920] [DEBUG] main ------------------ End
      
      

      Git Version from 22.7.2019

      1 Reply Last reply Reply Quote 0
      • Manfred
        Manfred Kopano last edited by

        Hi boospy,

        could you post the complete log? What client is accessing kdav?

        Manfred

        1 Reply Last reply Reply Quote 0
        • boospy
          boospy last edited by

          Log Attached.
          https://darkdevil.osit.cc/index.php/s/zc2YJFyEiXaAxTr

          If i open some path directly

          https://kopano.iteas.at/kdav/addressbooks/gemeinsam-firma/Kontakte/a9a78371807b4a5db78563eea6543cb6dc1202000000.vcf
          

          I get this messagebox in the webbrowser:

          <d:error><s:sabredav-version>3.2.2</s:sabredav-version><s:exception>Sabre\VObject\ParseException</s:exception><s:message>Invalid Mimedir file. Line starting at 10 did not follow iCalendar/vCard conventions</s:message></d:error>
          

          This is the last one in the list. So i think there is the error. But how i can identify what contact this is?
          All other are ok.

          https://kopano.iteas.at/kdav/addressbooks/gemeinsam-firma/Kontakte/a9a78371807b4a5db78563eea6543cb6761302000000.vcf```
          The Brower ask me for Download.
          1 Reply Last reply Reply Quote 0
          • Manfred
            Manfred Kopano last edited by

            Hi boospy,

            so, only the last contact from the list doesn’t work, is that right?

            Which Kopano version are you using?

            Are there any errors in apache logs?

            Manfred

            1 Reply Last reply Reply Quote 0
            • JungleMarc
              JungleMarc last edited by

              How much max ram are you allowing to php?

              1 Reply Last reply Reply Quote 0
              • A Former User
                A Former User last edited by

                Hello,

                i have the same problem. All configured like the default. -> PHP Ram 256M.
                I have 300 contacts, some with photo. It this error a ram problem? or invalid vcards?

                I’ve deleted some of the contacts that are experiencing the problem, but this is an infinite story.

                1 Reply Last reply Reply Quote 0
                • Manfred
                  Manfred Kopano last edited by

                  Hi proficleaner,

                  “same problem” is a very vague description.

                  Which versions of kdav, Kopano, OS are you using?

                  Are you able to open some contacts in the browser and some not? Or are you using some other client?

                  Are there any errors in kdav and apache logs?

                  Manfred

                  1 Reply Last reply Reply Quote 0
                  • boospy
                    boospy last edited by boospy

                    Sorry for the late reply. I didn’t get any notification.

                    No Apache Errors. There are definitely bad contacts, i have delete all contacts an imported 5 for test. It is working fine. But as error i see only that xml, not the id of the bad vcards. Memory Limit is @128MB should i increase that?

                    1 Reply Last reply Reply Quote 0
                    • boospy
                      boospy last edited by

                      So, i’ve setuped here a brand new kopanoserver with subscription, so with actual packages. I’ve install kdav. What have i tested:

                      • Sync with KDE’s Kontact
                      • Sync with Android’s davX5

                      On Kontact i never seen any addressbookentry. On Android some files are synced, about 15 of 40. After changing a few contacts, 3 or 6 more were synced. Really strange, whats going wrong here? Have anyone the plugin successfully running? It would help a lot. Because the contactpicture issue. Zpush damage all pictures, so nice big pictures, are reduced in unusable quality. The kopano support talked to the zpush dev’s, they known about the issue, but they can’t find the reason.

                      All logs from the sync are here, maybe someone can help me to configure the plugin right.
                      https://darkdevil.osit.cc/index.php/s/eEcJASaynDLrmyG?path=%2Fshares for forums%2FKdav-Logs

                      Very thanks

                      1 Reply Last reply Reply Quote 0
                      • Manfred
                        Manfred Kopano last edited by

                        Hi @boospy,

                        please update KDAV to the latest master branch version. I’ve added more logging in order to figure out why sabre is complaining about line 12 in the generated vcard data.

                        Manfred

                        1 Reply Last reply Reply Quote 0
                        • boospy
                          boospy last edited by

                          Thanks for the information. I give this to us dev.

                          1 Reply Last reply Reply Quote 0
                          • clews
                            clews last edited by

                            I encountered the same problem. I don’t know if it’s for the same reason. We finally found out that the user had an Adresslist entry in his Kopano-Contacts and this caused the error. Once removed it worked.

                            After a little debugging, i saw that an Addresslist item returns an empty VCF (strlen 0) and SabreDAV does not handle it. So i simple added those three lines

                            if ($r['size']==0) {
                                        return false;
                            }
                            

                            just before the return of the public function getCard($addressBookId, $cardUri, $mapifolder = null) (around line 199 in the actual code) of lib/KopanoCardDavBackend.php.

                            Perhaps this helps someone out…

                            Clemens.

                            1 Reply Last reply Reply Quote 0
                            • boospy
                              boospy last edited by

                              Sorry, but we give up with this. To much time, did not work.

                              1 Reply Last reply Reply Quote 0
                              • creigelde
                                creigelde last edited by

                                The 500 Internal Server Error is the general catch all error when the server throws an exception. The first thing you need to know about an “Internal Server Error” is that the error can only be resolved by fixes to the Web server software. It is not a client-side problem meaning that the problem is not with your browser, your computer, or your internet connection. There are a number of causes for a 500 Internal Server Error to display in a web browser. Consider some debugging tips to help diagnose and fix common causes of this problem.

                                • Refresh the URL that you have requested. The error may be for the short term.
                                • Clear all the website cache from your web browser
                                • Delete website cookies because error 500 can be obstructed by clearing the website cookies. Restart your web browser after clearing cookies.
                                • Create a new .htaccess file. Sometimes the incorrect code and command in .htaccess file cause error 500 on the website. Rename the file with another name; it will automatically become invalid. Then create a new .htaccess file and upload it to the server.
                                • Finally, Ask your Hosting Provider
                                1 Reply Last reply Reply Quote 0
                                • First post
                                  Last post