Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 324065

Summary: wrong paths with mirrors
Product: [Eclipse Project] Equinox Reporter: Nicolas Bros <nicolas.bros>
Component: p2Assignee: P2 Inbox <equinox.p2-inbox>
Status: CLOSED WORKSFORME QA Contact:
Severity: normal    
Priority: P3 CC: henrik.lindberg, pascal
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Nicolas Bros CLA 2010-08-31 05:02:58 EDT
I get HTTP errors for connections to mirrors in my build on build.eclipse.org:

Connection to http://mirror.cc.vt.edu/pub/eclipse/modeling/emf/emf/updates/2.6/plugins/org.eclipse.emf.common_2.6.0.v20100614-1136.jar.pack.gz failed on Connection refused. 

Connection to http://eclipse.ialto.org/modeling/emf/emf/updates/2.6/plugins/org.eclipse.emf.ecore.change_2.5.0.v20100521-1846.jar.pack.gz failed on Unable to parse header: </a></div>.

These are just 2 examples. I get a bunch of other errors on these 2 mirrors.
Maybe they are not synchronizing properly?
Comment 1 Denis Roy CLA 2010-08-31 09:19:47 EDT
I'm not sure where/how you got those links, but neither of those files exist on download.eclipse.org.

http://download.eclipse.org/modeling/emf/emf/updates/2.6/plugins/org.eclipse.emf.common_2.6.0.v20100614-1136.jar.pack.gz


http://download.eclipse.org/modeling/emf/emf/updates/2.6/plugins/org.eclipse.emf.ecore.change_2.5.0.v20100521-1846.jar.pack.gz

FWIW, I can connect to both of those mirrors just fine.  I do get a 404 for those files, but that is expected.
Comment 2 Nicolas Bros CLA 2010-08-31 10:24:08 EDT
You are right, it looks like p2 is looking for files that don't even exist.
I am moving this bug to P2.
Comment 3 Henrik Lindberg CLA 2010-09-02 19:05:23 EDT
(In reply to comment #0)
http://eclipse.ialto.org/modeling/emf/emf/updates/2.6/plugins/org.eclipse.emf.ecore.change_2.5.0.v20100521-1846.jar.pack.gz
> failed on Unable to parse header: </a></div>.
> 

This looks like you are hitting a bad site/mirror - it seems to be feeding html on a request to get a .jar.pack.gz.

Doubt this is a p2 issue. What do you get if you use the URL above in your browser?
Comment 4 Nicolas Bros CLA 2010-09-03 03:56:49 EDT
> What do you get if you use the URL above in your browser?
I get an HTML page with "404 - Not Found". I guess p2 gets the same thing, and that's why it fails.

But I think the question is why is p2 trying to retrieve files that don't even exist on download.eclipse.org?

And why is it contacting far away mirrors even though the build is happening on Eclipse servers, with download.eclipse.org being the nearest and fastest?
Comment 5 Henrik Lindberg CLA 2010-09-03 09:59:35 EDT
(In reply to comment #4)
> > What do you get if you use the URL above in your browser?
> I get an HTML page with "404 - Not Found". I guess p2 gets the same thing, and
> that's why it fails.
> 
> But I think the question is why is p2 trying to retrieve files that don't even
> exist on download.eclipse.org?
> 
> And why is it contacting far away mirrors even though the build is happening on
> Eclipse servers, with download.eclipse.org being the nearest and fastest?

p2 is not adding anything to what it finds in the repositories. Meta data is used to resolve to a set of IUs, and these have associated artifacts, the artifact meta data contains the URL to the artifact, which is then requested. Mirror selection can take place by specifying mirrors (picked up by p2), or be done at request time - i.e. artifact link points to one location that forwards to some other location.

To understand where the faulty reference comes from one has to investigate the chain top-down. 

Some questions:
- which version of Eclipse is being used
- what is the list of repositories known to the p2 instance giving the error.
- which repository has the IU that specifies the artifact that is not found
- does the artifact exist in the original artifact repository
- is there an issue on all/one mirror
... etc.
Comment 6 Nicolas Bros CLA 2010-09-03 11:13:08 EDT
The artifact is defined in downloads/modeling/emf/emf/updates/2.6/R201006141136/artifacts.jar :
<artifact classifier='osgi.bundle' id='org.eclipse.emf.common' version='2.6.0.v20100614-1136'>

downloads/modeling/emf/emf/updates is a composite repository
and downloads/modeling/emf/emf/updates/2.6 is a composite repository too: it contains compositeArtifacts.xml  compositeContent.xml, that point to R201006141136.

p2 is missing the "R201006141136" in the path apparently.

Do you have an idea why? Is the metadata for the EMF update site ill-formed?