Uploaded image for project: 'Archiva'
  1. Archiva
  2. MRM-1197

Random 400 Error when uploading maven-metadata.xml to Archiva 1.2/1.2.1

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.2, 1.2.1
    • Fix Version/s: 1.2.2
    • Component/s: None
    • Labels:
      None
    • Environment:
      RHEL5.2, tomcat6-6.0.18-6.jpp5, Sun Java 1.5.0_16, Maven 2.0.9, Archiva 1.2.1, Apache httpd-2.2.3-11.el5_2.4

      Description

      When maven tries to deploy a new/updated maven-metadata.xml or its md5/sha, occasionally a HTTP 400 - Bad Request is returned from Archiva. The following message is returned from Archiva: Content Header length was 32 but was 0

      Detailed HTTP Request/Response:

      PUT /archiva/repository/releases/components/gui-project/maven-metadata.xml.md5 HTTP/1.1
      User-Agent: Java/1.5.0_16
      Host: maven.local
      Accept: text/html, image/gif, image/jpeg, ; q=.2, */; q=.2
      Connection: keep-alive
      Authorization: Basic YmFtYm9vOmJAbWIwbw==
      Content-Length: 32

      24877de78f50a1cdb8bd71e2dfa933cfHTTP/1.1 400 Bad Request
      Date: Tue, 02 Jun 2009 20:20:36 GMT
      Set-Cookie: JSESSIONID=77ECDD66382B0B02356E1027D344D5FF; Path=/archiva
      last-modified: Tue, 02 Jun 2009 15:04:37 GMT
      Content-Type: text/html;charset=utf-8
      Content-Length: 1085
      Connection: close

      <html><head><title>Apache Tomcat/6.0.18 - Error report</title><style><!--H1

      {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;}

      H2

      {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;}

      H3

      {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;}

      BODY

      {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;}

      B

      {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;}

      P

      {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}

      A

      {color : black;}

      A.name

      {color : black;}

      HR

      {color : #525D76;}

      --></style> </head><body><h1>HTTP Status 400 - Content Header length was 32 but was 0</h1><HR size="1" noshade="noshade"><p><b>type</b> Status report</p><p><b>message</b> <u>Content Header length was 32 but was 0</u></p><p><b>description</b> <u>The request sent by the client was syntactically incorrect (Content Header length was 32 but was 0).</u></p><HR size="1" noshade="noshade"><h3>Apache Tomcat/6.0.18</h3></body></html>

      When the actual packets are examined they look like this:

      1 0.000000 192.168.102.68 -> 192.168.102.68 TCP 42242 > http [SYN] Seq=0 Win=32792 Len=0 MSS=16396 TSV=21157988 TSER=0 WS=7
      2 0.000024 192.168.102.68 -> 192.168.102.68 TCP http > 42242 [SYN, ACK] Seq=0 Ack=1 Win=32768 Len=0 MSS=16396 TSV=21157988 TSER=21157988 WS=7
      3 0.000040 192.168.102.68 -> 192.168.102.68 TCP 42242 > http [ACK] Seq=1 Ack=1 Win=32896 Len=0 TSV=21157988 TSER=21157988
      4 0.000539 192.168.102.68 -> 192.168.102.68 HTTP PUT /archiva/repository/releases/components/gui-project/maven-metadata.xml.md5 HTTP/1.1 (packet with headers)
      5 0.000561 192.168.102.68 -> 192.168.102.68 TCP http > 42242 [ACK] Seq=1 Ack=315 Win=33920 Len=0 TSV=21157988 TSER=21157988
      6 0.000591 192.168.102.68 -> 192.168.102.68 HTTP Continuation or non-HTTP traffic (packet with the 32 bytes of content)
      7 0.000603 192.168.102.68 -> 192.168.102.68 TCP http > 42242 [ACK] Seq=1 Ack=347 Win=33920 Len=0 TSV=21157988 TSER=21157988
      8 0.055038 192.168.102.68 -> 192.168.102.68 HTTP HTTP/1.1 400 Bad Request (text/html) (packet with 400 error)
      9 0.055066 192.168.102.68 -> 192.168.102.68 TCP 42242 > http [ACK] Seq=347 Ack=1349 Win=35584 Len=0 TSV=21158002 TSER=21158002
      10 0.055083 192.168.102.68 -> 192.168.102.68 TCP http > 42242 [FIN, ACK] Seq=1349 Ack=347 Win=33920 Len=0 TSV=21158002 TSER=21158002
      11 0.055892 192.168.102.68 -> 192.168.102.68 TCP 42242 > http [FIN, ACK] Seq=347 Ack=1350 Win=35584 Len=0 TSV=21158002 TSER=21158002
      12 0.055910 192.168.102.68 -> 192.168.102.68 TCP http > 42242 [ACK] Seq=1350 Ack=348 Win=33920 Len=0 TSV=21158002 TSER=21158002

        Attachments

        1. archivia-400-error.pcap
          3 kB
          Chris Van Vlack
        2. archivia-put-success.pcap
          2 kB
          Chris Van Vlack

          Issue Links

            Activity

              People

              • Assignee:
                oching Maria Odea B. Ching
                Reporter:
                vanvlack Chris Van Vlack
              • Votes:
                6 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: