Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Oomph » EGit update site broken?
EGit update site broken? [message #1780777] Fri, 26 January 2018 23:40 Go to next message
Ernesto Posse is currently offline Ernesto PosseFriend
Messages: 351
Registered: March 2011
Senior Member
Hi. Sorry for cross-forum posting, but I'm not sure if this is an Oomph problem, or an EGit problem, but at least there is an Oomph angle to it.

I'm developing a simple setup model which includes several standard features such as the eclipse platform, emf, uml2, mwe2, papyrus, papyrus sysml and a few others, all on an Oxygen stream and with standard p2 URLs. However I get the error below complaining that the EGit update site p2 repo ( http://download.eclipse.org/egit/updates) cannot be read.

Note that my setup model *does not* explicitly list the EGit repo, so it looks like it is added by Oomph automatically. Is this so?

However that repo seems to be correct. You can check it in Oomph's Repository Explorer and everything seems to be in place.

Nevertheless, I tried to add this EGit repo to a plain, minimal Eclipse platform installation (without anything, i.e. http://download.eclipse.org/eclipse/downloads/drops4/R-4.7.2-201711300510/download.php?dropFile=eclipse-platform-4.7.2-macosx-cocoa-x86_64.dmg) manually rather than with Oomph and found out that the following:

1. doing this in my user account (where I normally use Oomph and Eclipse) and it works fine (no p2 provision errors)
2. but doing this in a new fresh user that has no traces of Eclipse I get a very similar error (at the bottom).

This suggests that maybe there is some implicit dependency from EGit, is this so?

Thanks


ERROR: org.eclipse.equinox.p2.metadata.repository code=1002 Unable to read repository at http://download.eclipse.org/egit/updates.
org.tukaani.xz.XZFormatException: Input is not in the XZ format
  at org.tukaani.xz.common.DecoderUtil.decodeStreamHeader(Unknown Source)
  at org.tukaani.xz.SingleXZInputStream.initialize(Unknown Source)
  at org.tukaani.xz.SingleXZInputStream.initialize(Unknown Source)
  at org.tukaani.xz.SingleXZInputStream.<init>(Unknown Source)
  at org.tukaani.xz.XZInputStream.<init>(Unknown Source)
  at org.tukaani.xz.XZInputStream.<init>(Unknown Source)
  at org.eclipse.equinox.internal.p2.metadata.repository.XZedSimpleMetadataRepositoryFactory.load(XZedSimpleMetadataRepositoryFactory.java:80)
  at org.eclipse.equinox.internal.p2.metadata.repository.MetadataRepositoryManager.factoryLoad(MetadataRepositoryManager.java:57)
  at org.eclipse.equinox.internal.p2.repository.helpers.AbstractRepositoryManager.loadRepository(AbstractRepositoryManager.java:768)
  at sun.reflect.GeneratedMethodAccessor25.invoke(Unknown Source)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:498)
  at org.eclipse.oomph.util.ReflectUtil.invokeMethod(ReflectUtil.java:117)
  at org.eclipse.oomph.p2.internal.core.CachingRepositoryManager.loadRepository(CachingRepositoryManager.java:409)
  at org.eclipse.oomph.p2.internal.core.CachingRepositoryManager.loadRepository(CachingRepositoryManager.java:201)
  at org.eclipse.oomph.p2.internal.core.CachingRepositoryManager$Metadata.loadRepository(CachingRepositoryManager.java:476)
  at org.eclipse.equinox.internal.p2.metadata.repository.MetadataRepositoryManager.loadRepository(MetadataRepositoryManager.java:96)
  at org.eclipse.equinox.internal.p2.metadata.repository.MetadataRepositoryManager.loadRepository(MetadataRepositoryManager.java:92)
  at org.eclipse.oomph.p2.internal.core.ProfileTransactionImpl$RepositoryLoader$Worker.perform(ProfileTransactionImpl.java:1613)
  at org.eclipse.oomph.util.WorkerPool$Worker.run(WorkerPool.java:428)
  at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)



Unable to read repository at http://download.eclipse.org/egit/updates.
Unable to read repository at http://download.eclipse.org/egit/updates.
Input is not in the XZ format

[Updated on: Fri, 26 January 2018 23:42]

Report message to a moderator

Re: EGit update site broken? [message #1780781 is a reply to message #1780777] Sat, 27 January 2018 04:19 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 29549
Registered: July 2009
Senior Member
I also answered this on the EGit forum. What does "2. but doing this in a new fresh user that has no traces of Eclipse I get a very similar error (at the bottom)." mean? How do you test that? Is there perhaps a network proxy involved?
Re: EGit update site broken? [message #1780911 is a reply to message #1780781] Mon, 29 January 2018 21:57 Go to previous messageGo to next message
Ernesto Posse is currently offline Ernesto PosseFriend
Messages: 351
Registered: March 2011
Senior Member
Hi. It means that I performed the following steps:

(This is on macOS Sierra, if it matters)

1. log in as a new fresh (non admin) user (no ~/.eclipse, or ~/.p2 or any trace of Eclipse on it)
2. downloaded the basic Eclipse platform package (http://download.eclipse.org/eclipse/downloads/drops4/R-4.7.2-201711300510/download.php?dropFile=eclipse-platform-4.7.2-macosx-cocoa-x86_64.dmg); (Also tried with the Eclipse SDK and got the same results)
3. started it; fresh new workspace
4. went to Install New Software
5. clicked on [Add...] and added the p2 info for EGit, with url http://download.eclipse.org/egit/updates
6. clicked [OK].
7. from the drop-down list of repos I selected the new EGit repo

Then I got a dialog with the error message:

Unable to read repository at http://download.eclipse.org/egit/updates.
Unable to read repository at http://download.eclipse.org/egit/updates.
Input is not in the XZ format


I may be behind a company proxy, but this does not occur in my normal user. The only difference that I see is that my normal user has admin rights and have previously installed (several versions of) Eclipse.

After searching a bit more the forums and bugzilla, I see that others have run into similar issues (e.g. Bug 516602, Bug 515359, Msg 1763841, Msg 1764934), and suggestions that there might be a network issue on my end, others on the Eclipse servers, and other suggest it might have something to do with the local p2 cache, but there doesn't seem to be a satisfactory answer.

Since this is for a new fresh user, which doesn't have a ~/.eclipse folder, it cannot be the cache issue.

It doesn't seem to be an Eclipse server issue since it seems to work for you.

So maybe it's a network issue on my end, but how, if it works on one user but not the other? And if it was a network issue, why do other update sites seem to work fine even for the fresh new user?

Could it be an issue with p2 itself?

Thanks

Re: EGit update site broken? [message #1780924 is a reply to message #1780911] Tue, 30 January 2018 06:13 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 29549
Registered: July 2009
Senior Member
Do other update sites such egit/updates-nightly, egit/updates-stable-nightly, and egit/updates-4.10 suffer the same problem? Does the Error log view perhaps show a more complete stack trace with more clues? It's of course less than idea, but you could download http://download.eclipse/egit/updates-4.10/org.eclipse.egit.repository-4.10.0.201712302008-r.zip and install from that or whatever is listed on this page: https://www.eclipse.org/egit/download/

From some of the problems you've listed, it's clear that these things happen for inexplicable reasons just with p2. I know from looking at the details that p2 doesn't do a good job trying the *.xml/*.jar representation if the *.xml.xz fails. I think once it tries the the form listed in the p2.inf and that file actually exists, it won't try other forms. Perhaps different JDKs are involved and that somehow has some influence?
Re: EGit update site broken? [message #1780929 is a reply to message #1780924] Tue, 30 January 2018 06:44 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 29549
Registered: July 2009
Senior Member
I noticed that there are three versions of org.tukaani.xz floating around. The Photon stream has 1.6 but the Oxygen stream has 1.5 and Neon and older have 1.3. Perhaps you might try downloading Photon and Neon to see if they fail the same way. There is a source bundle for it, but given the stack trace in the reports you linked have no lines, perhaps it's not compiled with debug information. Looking at the source I see:
    public static StreamFlags decodeStreamHeader(byte[] buf)
            throws IOException {
        for (int i = 0; i < XZ.HEADER_MAGIC.length; ++i)
            if (buf[i] != XZ.HEADER_MAGIC[i])
                throw new XZFormatException();
where the HEADER_MAGIC is defined as
    /**
     * XZ Header Magic Bytes begin a XZ file.
     * This can be useful to detect XZ compressed data.
     */
    public static final byte[] HEADER_MAGIC = {
            (byte)0xFD, '7', 'z', 'X', 'Z', '\0' };
So you could have a look at ~/.eclipse/org.eclipse.oomph.p2/cache/http___download.eclipse.org_egit_updates_content.xml.xz to see if the file really has been downloaded with the incorrect initial bytes. And you might try downloading that file with the browser to see if the comes through the network correctly that way.
Re: EGit update site broken? [SOLVED] [message #1780975 is a reply to message #1780929] Tue, 30 January 2018 18:00 Go to previous message
Ernesto Posse is currently offline Ernesto PosseFriend
Messages: 351
Registered: March 2011
Senior Member
Hi Ed.

I know now what is causing the problem.

First, I noticed that it was not just the EGit repo, but also, rather worryingly with http://download.eclipse.org/eclipse/updates/4.7. For reference I'm attaching the full error log (running with -console -consoleLog -debug).

I ruled out a network issue because I tried on two different networks and got the same result.

The issue seems to be with user privileges. On macOS, aside from "standard" and "admin" users, there is a third kind: "managed". The error occurs on "managed" user accounts. As to why exactly that causes the error, what kind of restrictions does this "managed" account imposes on p2, I don't know. So I think one has to assume that Eclipse cannot be updated on "managed" accounts.

Thanks for your help.



Previous Topic:p2 bundle pools and caching
Next Topic:Problem building oomph
Goto Forum:
  


Current Time: Mon Sep 24 15:02:35 GMT 2018

Powered by FUDForum. Page generated in 0.01957 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top