Home » Eclipse Projects » Plugin Development Environment (PDE) » Get error in "CheckTrust" phase will installing from local update site
Get error in "CheckTrust" phase will installing from local update site [message #1723022] |
Thu, 11 February 2016 02:26 |
David M. Karr Messages: 813 Registered: July 2009 |
Senior Member |
|
|
I've inherited an Eclipse plugin codebase. I'm able to test it by running a test instance and specifying the plugins to load. I'm also able to build the entire update site from Maven. I'm now trying to install the plugin from the update site in a separate Eclipse instance.
Eclipse is able to see the plugin, and I can specify to install it, but when it proceeds to do this, it fails with the following:
An error occurred during the org.eclipse.equinox.internal.p2.engine.phases.CheckTrust phase.
session context was:(profile=_home_opnfv_eclipse_java-neon_eclipse, phase=org.eclipse.equinox.internal.p2.engine.phases.CheckTrust, operand=, action=).
Error reading signed content.
error in opening zip file
So I'm missing something either in the build step, or the configuration of the Eclipse instance I'm trying to install this into. It obviously has something to do with signatures, but I don't know what's wrong, or the process for fixing it.
|
|
| | | | | | |
Re: Get error in "CheckTrust" phase will installing from local update site [message #1723620 is a reply to message #1723615] |
Tue, 16 February 2016 20:00 |
David M. Karr Messages: 813 Registered: July 2009 |
Senior Member |
|
|
Thanks in advance.
Brian de Alwis wrote on Tue, 16 February 2016 10:58Debugging via forum is pretty hard.
You're telling me?
Brian de Alwis wrote on Tue, 16 February 2016 10:58
Have you tried checking all the jar and zip files in the generated archive? Running the unzip tool on all the items is pretty easy.
I had previously checked the contents lazily by piping "find" into "xargs jar tvf", but just now I explicitly did "tar tvf" on every jar file in the tree. No obvious issues anywhere.
Brian de Alwis wrote on Tue, 16 February 2016 10:58
Have you checked your build log to make sure there wasn't some warning or error message thrown during the build?
Just checked again. The entire build completes successfully, or I wouldn't be talking about this issue, but I just rebuilt it again and looked for anything suspicious in the entire log, and I didn't see anything.
Brian de Alwis wrote on Tue, 16 February 2016 10:58
Or you could attach a remote debugger and put a breakpoint on java.util.zip.ZipException and examine the stack in situ.
Brian.
I've been doing this previously in a test instance launched from this target instance, but I guess I can add those params to a normal instance and point my usual remote debugger instance to that.
On my first attempt, I must be doing something wrong. I formed a command line to execute eclipse with the added parameters as directed. I used "ps" to verify those args were on the command line. I then connected from the debugger instance. It refused the connection. I then ran "netstat -a | grep 5005" on the target box, and it doesn't show the port.
I know the connection from my debugger instance to the box with the instance works, because I normally launch a test instance from that target instance and connect remotely from my debugger instance. That's still working fine.
Just so it's clear, my "debugger" instance is on my host, and my current desired target instance is on a VM running on the host. I've been previously launching a test instance from that target instance and connecting my remote debugger (on the host) to that test instance, and that works fine. I even just tried changing the port number (in both target and debugger) to match the port number I've been using to connect to the test instance, but it still says "Connection Refused" (I verified that "ps" shows the new port number in the command line).
|
|
|
Re: Get error in "CheckTrust" phase will installing from local update site [message #1723762 is a reply to message #1723620] |
Wed, 17 February 2016 17:26 |
David M. Karr Messages: 813 Registered: July 2009 |
Senior Member |
|
|
Ok, attaching the debugger made a big difference. I think I now have enough information to "fix" my particular problem, although I'll need to know the details of exactly what I need to remove (you'll see what I mean). However, I want to go a little further than this and submit an enhancement request to add more info to the exception. No regular Eclipse user should have had to do what I did just to figure out what zip file was corrupted. Someone on my SO posting mentioned some properties that might provide more debugging output, which I'll also look at.
When it hit the breakpoint, it referred to "<myhome>/.p2/pool/plugins/org.eclipse.emf.mapping_2.9.0.v20160201-0859.jar". I looked at this file, and it wasn't zero length, but when I ran "jar tvf" on it, it said this:
java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:219)
at java.util.zip.ZipFile.<init>(ZipFile.java:149)
at java.util.zip.ZipFile.<init>(ZipFile.java:120)
at sun.tools.jar.Main.list(Main.java:1115)
at sun.tools.jar.Main.run(Main.java:293)
at sun.tools.jar.Main.main(Main.java:1288)
I then also ran "unzip -tq" on the file, which seemed to provide more information, whether I could use it or not:
[<myhome>/.p2/pool/plugins/org.eclipse.emf.mapping_2.9.0.v20160201-0859.jar]
End-of-central-directory signature not found. Either this file is not
a zipfile, or it constitutes one disk of a multi-part archive. In the
latter case the central directory and zipfile comment will be found on
the last disk(s) of this archive.
unzip: cannot find zipfile directory in one of <myhome>/.p2/pool/plugins/org.eclipse.emf.mapping_2.9.0.v20160201-0859.jar or
<myhome>/.p2/pool/plugins/org.eclipse.emf.mapping_2.9.0.v20160201-0859.jar.zip, and cannot find <myhome>/.p2/pool/plugins/org.eclipse.emf.mapping_2.9.0.v20160201-0859.jar.ZIP, period.
I then piped every jar in $HOME/.p2 into "unzip -tq", and it found 5 jars, all in the "org.eclipse.emf" package, reporting this same error.
At this point, I tried looking further up the callstack, to "org.eclipse.osgi.internal.signedcontent.SignedBundleHook". I searched the zip files for this class, and found that the block in question looks like this:
} else {
// make sure we have a ZipFile first, this will throw an IOException if not valid
ZipFile temp = new ZipFile(content);
temp.close();
contentBundleFile = new ZipBundleFile(content,null,null,container.getConfiguration().getDebug());
}
The comment here is ironic. Would it be reasonable for this code to properly catch the exception so that the full path to the zip file in question is reported? Is there some particular information I should add in an enhancement request for this?
Once I've gotten all the diagnostics I want in order to report this properly, what exactly do I have to do to fix this for my distro? Is it enough to just delete the corrupted jars? Will Eclipse redownload those? Do I have to shut down Eclipse before I do that?
|
|
|
Re: Get error in "CheckTrust" phase will installing from local update site [message #1723768 is a reply to message #1723762] |
Wed, 17 February 2016 18:38 |
Eclipse User |
|
|
|
Typically invalid zip/jar files are signs of running out of disk space. FWIW, all of my ~/.p2/.pool/plugins/org.eclipse.emf* bundles are fine.
I can only suggest moving the offending jars aside (so you can 'recover' them, even if they're broken) and see what happens.
You can try fixing the code, which I'm guessing is in p2. If you have EGit installed, you should be able to use the Plug-ins view and select File Import > Plug-ins and Fragments and import them as 'projects from a repository'.
Brian.
|
|
| | | |
Goto Forum:
Current Time: Sun Sep 22 06:26:57 GMT 2024
Powered by FUDForum. Page generated in 0.04451 seconds
|