Dev - Nexus
  1. Dev - Nexus
  2. NEXUS-2646

IOException during merge of Maven2 metadata

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 1.3.4
    • Fix Version/s: 1.4 Iteration 9/14, 1.4.0
    • Component/s: None
    • Labels:
      None
    • Environment:
      Linux openSUSE 10.2 (X86-64), Java 1.6.0_13
    • Global Rank:
      6787

      Description

      We have a proxy with the "Remote Storage Location": http://www.fornax-platform.org/m2/repository. Currently the server is down and returns only a "<!-- b2 -->".

      Every time nexus is asked for a artifact, the error org.sonatype.nexus.proxy.StorageException: Got IOException during merge of Maven2 metadata, UID='fornax-platform-releases:/suite4p/mda/suite4p.mda.metamodel/maven-metadata.xml' occurs. And maven got a Error transferring file and breaks the build. Also the local storage of this proxy is corrupt, my own groupids and artifacts are listed in the tree (browse tab) of this proxy.

      The only solution is to "block the proxy".

      1. nexus.log
        13 kB
        Rich Seddon
      2. nexus-error.txt
        7 kB
        kleinmantara

        Activity

        Deleted User created issue -
        Hide
        Brian Demers added a comment -

        What status code is your server returning?

        Show
        Brian Demers added a comment - What status code is your server returning?
        Hide
        kleinmantara added a comment -
        Show
        kleinmantara added a comment - For more information, please see the discussion at: http://www.nabble.com/Redirect-from-fornax-platform.org-is-broken-td25431781s17564.html
        Hide
        kleinmantara added a comment - - edited

        Hi Brain,

        for http://www.fornax-platform.org/m2/repository i got a 200 status code:

        GET /m2/repository HTTP/1.1
        Host: www.fornax-platform.org
        User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de-DE; rv:1.9.1) Gecko/20090624 Firefox/3.5
        Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
        Accept-Language: de-DE,de;q=0.7,chrome://global/locale/intl.properties;q=0.3
        Accept-Encoding: gzip,deflate
        Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
        Keep-Alive: 300
        Connection: keep-alive
        
        HTTP/1.x 200 OK
        Date: Mon, 14 Sep 2009 14:27:36 GMT
        Server: Apache/2.2.9 (Debian)
        X-UD-Host: webspace.udag.de
        X-UD-Method: sedourlhiding
        X-Handling: relax
        X-UD-Loopcounter: 3
        X-UD-REMOTE_ADDR: 212.117.90.70
        X-Powered-By: PHP/5.2.0-8+etch15
        Expires: Mon, 26 Jul 1997 05:00:00 GMT
        Last-Modified: Mon, 14 Sep 2009 14:27:37 GMT
        Cache-Control: post-check=0, pre-check=0
        Pragma: no-cache
        Vary: User-Agent,Accept-Encoding
        Content-Encoding: gzip
        Content-Length: 31
        Content-Type: text/html
        Connection: keep-alive
        
        Show
        kleinmantara added a comment - - edited Hi Brain, for http://www.fornax-platform.org/m2/repository i got a 200 status code: GET /m2/repository HTTP/1.1 Host: www.fornax-platform.org User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de-DE; rv:1.9.1) Gecko/20090624 Firefox/3.5 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: de-DE,de;q=0.7,chrome://global/locale/intl.properties;q=0.3 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive HTTP/1.x 200 OK Date: Mon, 14 Sep 2009 14:27:36 GMT Server: Apache/2.2.9 (Debian) X-UD-Host: webspace.udag.de X-UD-Method: sedourlhiding X-Handling: relax X-UD-Loopcounter: 3 X-UD-REMOTE_ADDR: 212.117.90.70 X-Powered-By: PHP/5.2.0-8+etch15 Expires: Mon, 26 Jul 1997 05:00:00 GMT Last-Modified: Mon, 14 Sep 2009 14:27:37 GMT Cache-Control: post-check=0, pre-check=0 Pragma: no-cache Vary: User-Agent,Accept-Encoding Content-Encoding: gzip Content-Length: 31 Content-Type: text/html Connection: keep-alive
        Hide
        Tamás Cservenák added a comment -

        Following the link it brings me to some "domain people" (domain resellers?). Looks like the site is simply gone, even the domain is returned or is on sell, since the site is not at all same with the one cached by google:

        http://209.85.129.132/search?q=cache:04RkAT4NSnUJ:www.fornax-platform.org/+fornax+platform&cd=1&hl=en&ct=clnk&client=safari

        Nexus can't help in these situations, since there is no way it can deduce is the repo returning 200 HTTP Status code down or gone....

        Show
        Tamás Cservenák added a comment - Following the link it brings me to some "domain people" (domain resellers?). Looks like the site is simply gone, even the domain is returned or is on sell , since the site is not at all same with the one cached by google: http://209.85.129.132/search?q=cache:04RkAT4NSnUJ:www.fornax-platform.org/+fornax+platform&cd=1&hl=en&ct=clnk&client=safari Nexus can't help in these situations, since there is no way it can deduce is the repo returning 200 HTTP Status code down or gone....
        Hide
        Tamás Cservenák added a comment -

        The remote repository referenced by this issue is simply gone, the domain is on the sale as it seems. There is nothing Nexus can do, since all the domain (all URLs directed to that domain) returns the ad page with HTTP 200 response.

        Show
        Tamás Cservenák added a comment - The remote repository referenced by this issue is simply gone, the domain is on the sale as it seems. There is nothing Nexus can do, since all the domain (all URLs directed to that domain) returns the ad page with HTTP 200 response.
        Tamás Cservenák made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Out of scope [ 6 ]
        Hide
        kleinmantara added a comment -

        Nexus has a error in handling to metadata, look at the stacktrace attachment (java.io.EOFException: no more data available START_DOCUMENT seen <!-- b2 -->... @1:11). Every time maven asks nexus for an artifact, this "defect" proxy got this error and this breaks the maven build.

        I think, nexus handle the "<!-- b2 -->" content wrong.

        Show
        kleinmantara added a comment - Nexus has a error in handling to metadata, look at the stacktrace attachment ( java.io.EOFException: no more data available START_DOCUMENT seen <!-- b2 -->... @1:11 ). Every time maven asks nexus for an artifact, this "defect" proxy got this error and this breaks the maven build. I think, nexus handle the " <!-- b2 --> " content wrong.
        Hide
        Tamás Cservenák added a comment -

        You mean, that Nexus is breaking the build, by choking on this garbage metadata? Nexus uses the same Modello powered classes to load up XML into model classes that is used by Maven 2.x itself.

        Show
        Tamás Cservenák added a comment - You mean, that Nexus is breaking the build, by choking on this garbage metadata? Nexus uses the same Modello powered classes to load up XML into model classes that is used by Maven 2.x itself.
        Hide
        Tamás Cservenák added a comment -

        The wrong (unparseable) metadata should not cause merge cycle break and HTTP 500 response.

        A warning should be emitted, the source repository should be blocked (should it), but the client should not be affected.

        Show
        Tamás Cservenák added a comment - The wrong (unparseable) metadata should not cause merge cycle break and HTTP 500 response. A warning should be emitted, the source repository should be blocked (should it), but the client should not be affected.
        Tamás Cservenák made changes -
        Resolution Out of scope [ 6 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Assignee Tamás Cservenák [ cstamas ]
        Hide
        Tamás Cservenák added a comment -

        Fixed title

        Show
        Tamás Cservenák added a comment - Fixed title
        Tamás Cservenák made changes -
        Summary OException during merge of Maven2 metadata IOException during merge of Maven2 metadata
        Hide
        kleinmantara added a comment -

        Yes, i think nexus trys to "merge" the local metadata with the <!-- b2 --> content from the proxy. At this point the IOException is thrown.

        If i look at the nexus "browse" tab for this proxy, all artifacts that maven asks for are in the local proxy cache. Although my own artifacts that are not public available.

        Show
        kleinmantara added a comment - Yes, i think nexus trys to "merge" the local metadata with the <!-- b2 --> content from the proxy. At this point the IOException is thrown. If i look at the nexus "browse" tab for this proxy, all artifacts that maven asks for are in the local proxy cache. Although my own artifacts that are not public available.
        Tamás Cservenák made changes -
        Fix Version/s 1.3.7 [ 10366 ]
        Fix Version/s 1.4 Iteration 9/14 [ 10469 ]
        Fix Version/s 1.4 [ 10171 ]
        Tamás Cservenák made changes -
        Original Estimate 1h [ 3600 ]
        Remaining Estimate 1h [ 3600 ]
        Hide
        Tamás Cservenák added a comment -

        Fixed in 1.4. Nexus will simply "skip" (step over) the broken maven metadata files, will throw a warning in a log and create a RSS entry (Broken artifacts) about this.

        Show
        Tamás Cservenák added a comment - Fixed in 1.4. Nexus will simply "skip" (step over) the broken maven metadata files, will throw a warning in a log and create a RSS entry (Broken artifacts) about this.
        Tamás Cservenák logged work - 09/15/09 09:00 AM
        • Time Spent:
          1h
           
          <No comment>
        Hide
        Tamás Cservenák added a comment -

        Ported to 1.3.7. Nexus will simply "skip" (step over) the broken maven metadata files, will throw a warning in a log.

        Show
        Tamás Cservenák added a comment - Ported to 1.3.7. Nexus will simply "skip" (step over) the broken maven metadata files, will throw a warning in a log.
        Tamás Cservenák made changes -
        Remaining Estimate 1h [ 3600 ] 0h [ 0 ]
        Time Spent 1h [ 3600 ]
        Tamás Cservenák made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Rich Seddon logged work - 09/16/09 01:07 PM
        • Time Spent:
          1h 25m
           
          <No comment>
        Hide
        Rich Seddon added a comment -

        Tried this with Nexus 1.4 svn revision 5012, and also with nexus-webapp-1.3.7-20090915.140237-51-bundle.zip

        Test setup was two nexus's one of which had a hosted snapshot repo, the other proxied the snapshot repo and had it in it's public group.

        I set up command line maven to use public repo from the 2nd nexus.

        As expected, everything worked fine, build succeeded.

        Then I changed the proxy repo to point at a servlet which returned "hello world" for every request, with return code 200.

        In this case, maven client gets error 500, and the server has an exception in the log

        Show
        Rich Seddon added a comment - Tried this with Nexus 1.4 svn revision 5012, and also with nexus-webapp-1.3.7-20090915.140237-51-bundle.zip Test setup was two nexus's one of which had a hosted snapshot repo, the other proxied the snapshot repo and had it in it's public group. I set up command line maven to use public repo from the 2nd nexus. As expected, everything worked fine, build succeeded. Then I changed the proxy repo to point at a servlet which returned "hello world" for every request, with return code 200. In this case, maven client gets error 500, and the server has an exception in the log
        Rich Seddon made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Hide
        Rich Seddon added a comment -

        Attaching nexus log.

        Show
        Rich Seddon added a comment - Attaching nexus log.
        Rich Seddon made changes -
        Attachment nexus.log [ 13659 ]
        Rich Seddon made changes -
        Time Spent 1h [ 3600 ] 2h 25m [ 8700 ]
        Hide
        Tamás Cservenák added a comment -

        I think the verification happened with wrong build, The attached stack trace does not align with the source commited for this issue (M2GroupRepository@5001).

        The diff of changes in rev5001:
        http://scm.sonatype.org/diffprev.svn?path=/branches/nexus-1.3.X/nexus-proxy/src/main/java/org/sonatype/nexus/proxy/maven/maven2/M2GroupRepository.java&revision=5001&name=Nexus

        Show
        Tamás Cservenák added a comment - I think the verification happened with wrong build, The attached stack trace does not align with the source commited for this issue (M2GroupRepository@5001). The diff of changes in rev5001: http://scm.sonatype.org/diffprev.svn?path=/branches/nexus-1.3.X/nexus-proxy/src/main/java/org/sonatype/nexus/proxy/maven/maven2/M2GroupRepository.java&revision=5001&name=Nexus
        Tamás Cservenák made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Rich Seddon logged work - 09/16/09 02:53 PM
        • Time Spent:
          0.5h
           
          re-verify in 1.4 and 1.3.7
        Hide
        Rich Seddon added a comment -

        previous stack trace happened because I had an earlier version of 1.3.7.

        Verified in Nexus 1.4 OSS svn #5014 & nexus-webapp-1.3.7-20090915.140237-51-bundle.zip

        Show
        Rich Seddon added a comment - previous stack trace happened because I had an earlier version of 1.3.7. Verified in Nexus 1.4 OSS svn #5014 & nexus-webapp-1.3.7-20090915.140237-51-bundle.zip
        Rich Seddon made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Rich Seddon made changes -
        Time Spent 2h 25m [ 8700 ] 2h 55m [ 10500 ]
        Hide
        Rich Seddon added a comment -

        Reopening to do some more testing, need to make sure system recovers gracefully when remote repo comes back online.

        Show
        Rich Seddon added a comment - Reopening to do some more testing, need to make sure system recovers gracefully when remote repo comes back online.
        Rich Seddon made changes -
        Resolution Fixed [ 1 ]
        Status Closed [ 6 ] Reopened [ 4 ]
        Assignee Tamás Cservenák [ cstamas ] Rich Seddon [ rseddon ]
        Rich Seddon made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Rich Seddon made changes -
        Status Resolved [ 5 ] Testing In Progress [ 10001 ]
        Rich Seddon logged work - 09/17/09 12:25 PM
        • Time Spent:
          50m
           
          reproduce issue described by intuit, in 1.3.6 "expire cache" and "rebuild metadata" do not fix problem when remote repo comes back on one.
          confirm this is no longer a problem in 1.3.7
        Rich Seddon made changes -
        Time Spent 2h 55m [ 10500 ] 3.75h [ 13500 ]
        Hide
        Rich Seddon added a comment -

        Confirmed that when remote repository comes back to normal operation Nexus resumes normal operation in 1.3.7

        Show
        Rich Seddon added a comment - Confirmed that when remote repository comes back to normal operation Nexus resumes normal operation in 1.3.7
        Rich Seddon made changes -
        Status Testing In Progress [ 10001 ] Closed [ 6 ]
        Brian Demers made changes -
        Fix Version/s 1.4.0 [ 10503 ]
        Fix Version/s 1.4 [ 10171 ]
        Brian Fox made changes -
        Workflow jira - allow edit after close [ 42080 ] Agile2 [ 393806 ]
        Brian Demers made changes -
        Fix Version/s 1.3.7 [ 10366 ]
        Rich Seddon made changes -
        Workflow Agile2 [ 393806 ] Agile3 [ 440167 ]
        Rich Seddon made changes -
        Workflow Agile3 [ 440167 ] Customer Facing Agile [ 467050 ]
        Rich Seddon made changes -
        Workflow Customer Facing Agile [ 467050 ] Customer Facing Agile 2 [ 471275 ]

          People

          • Assignee:
            Rich Seddon
            Reporter:
            Deleted User
            Last Updated By:
            Rich Seddon
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Date of First Response:

              Time Tracking

              Estimated:
              Original Estimate - 1h Original Estimate - 1h
              1h
              Remaining:
              Remaining Estimate - 0h
              0h
              Logged:
              Time Spent - 3.75h
              3.75h