Bug 830896 - candlepin prints a non-helpful message to catalina.out when manifest is corrupt
candlepin prints a non-helpful message to catalina.out when manifest is corrupt
Product: Candlepin
Classification: Community
Component: candlepin (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: William Poteat
Katello QA List
Depends On:
  Show dependency treegraph
Reported: 2012-06-11 11:20 EDT by Chris Duryee
Modified: 2015-05-14 11:18 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2014-11-07 10:57:16 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Chris Duryee 2012-06-11 11:20:01 EDT
Description of problem:

If you attempt to upload something that's not a zip file to candlepin, you'll get this error:

Jun 11 10:18:32 [http-8443-2] INFO  org.candlepin.sync.Importer - Extracting archive to: /var/cache/candlepin/sync/import5147580043996834060237220625044442
Jun 11 10:18:32 [http-8443-2] ERROR org.candlepin.sync.Importer - Exception caught importing archive
java.io.FileNotFoundException: /var/cache/candlepin/sync/import5147580043996834060237220625044442/consumer_export.zip (No such file or directory)
        at java.io.FileInputStream.open(Native Method)
        at java.io.FileInputStream.<init>(FileInputStream.java:137)
        at org.candlepin.sync.Importer.loadExport(Importer.java:181)
        at org.candlepin.resource.OwnerResource.importData(OwnerResource.java:888)

It would be better if candlepin verified that the uploaded file was in fact a zip file, and then printed an error if the file was not parsable for whatever reason. Throwing a FileNotFoundException can lead a sysadmin down the wrong path, checking file permissions and such.
Comment 2 William Poteat 2012-11-29 11:38:07 EST
commit 4cd379f15d3fc3421583f228e5d39250a07fd953
Comment 3 Bryan Kearney 2014-11-07 10:57:16 EST
This is available in release 0.7.21 and later. If you are still having issues, pelase feel free to reopen this bug.

Note You need to log in before you can comment on or make changes to this bug.