Bug 891334 - No such file or directory at java.io.UnixFileSystem.createFileExclusively:-2
Summary: No such file or directory at java.io.UnixFileSystem.createFileExclusively:-2
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Candlepin
Classification: Community
Component: candlepin
Version: 0.9
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: candlepin-bugs
QA Contact: Katello QA List
URL:
Whiteboard:
Depends On:
Blocks: rhsm-rhel70
TreeView+ depends on / blocked
 
Reported: 2013-01-02 16:10 UTC by John Sefler
Modified: 2015-05-14 14:52 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-09-29 19:05:07 UTC
Embargoed:


Attachments (Terms of Use)
/tmp/export.zip (19.78 KB, application/zip)
2013-01-02 16:10 UTC, John Sefler
no flags Details

Description John Sefler 2013-01-02 16:10:13 UTC
Created attachment 671538 [details]
/tmp/export.zip

Description of problem:
Commented below is a traceback in catalina.out that occurs during an automation test that has exported the attached export.zip and is attempting to import it.  The export file should contain an exported consumer and an entitlement.  The attempt to import is trying to import the consumer to a new owner.


Version-Release number of selected component (if applicable):
[root@jsefler-f14-candlepin candlepin]# git show-ref | head -1
71e3e2ec8e775b85ee527f2fd8ed9f40064bb965 refs/heads/master

Comment 1 John Sefler 2013-01-02 16:19:43 UTC
Test activity...

SSH alternative to HTTP request: curl --stderr /dev/null --insecure --user admin:admin -F export=@/tmp/export.zip --request POST https://jsefler-f14-6candlepin.usersys.redhat.com:8443/candlepin/owners/newOwner1356829349733/imports


From catalina.out....

Dec 29 21:57:13 [http-8443-3] INFO  org.candlepin.model.RulesCurator - Loading default rules.
Dec 29 21:57:13 [http-8443-3] INFO  org.candlepin.sync.Exporter - Creating archive of /var/cache/candlepin/sync/export13036863618843190025553742068456427/export in: export.zip
Dec 29 21:57:17 [http-8443-3] ERROR org.candlepin.exceptions.mappers.CandlepinExceptionMapper - Runtime Error java.io.IOException: No such file or directory at java.io.UnixFileSystem.createFileExclusively:-2
org.jboss.resteasy.spi.ReaderException: java.io.IOException: No such file or directory
        at org.jboss.resteasy.core.MessageBodyParameterInjector.inject(MessageBodyParameterInjector.java:202)
        at org.jboss.resteasy.core.MethodInjectorImpl.injectArguments(MethodInjectorImpl.java:124)
        at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:147)
        at org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:257)
        at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:222)
        at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:211)
        at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:525)
        at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:502)
        at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:119)
        at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208)
        at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55)
        at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:263)
        at com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:178)
        at com.google.inject.servlet.ManagedServletPipeline.service(ManagedServletPipeline.java:91)
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:62)
        at org.candlepin.servlet.filter.ContentTypeHackFilter.doFilter(ContentTypeHackFilter.java:61)
        at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163)
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)
        at org.candlepin.servlet.filter.logging.LoggingFilter.doFilter(LoggingFilter.java:60)
        at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163)
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)
        at org.candlepin.servlet.filter.CandlepinPersistFilter.doFilter(CandlepinPersistFilter.java:48)
        at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163)
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)
        at org.candlepin.servlet.filter.CandlepinScopeFilter.doFilter(CandlepinScopeFilter.java:57)
        at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163)
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)
        at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:118)
        at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:113)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
        at java.lang.Thread.run(Thread.java:636)
Caused by: java.io.IOException: No such file or directory
        at java.io.UnixFileSystem.createFileExclusively(Native Method)
        at java.io.File.checkAndCreate(File.java:1716)
        at java.io.File.createTempFile(File.java:1804)
        at org.apache.james.mime4j.storage.TempFileStorageProvider.createStorageOutputStream(TempFileStorageProvider.java:104)
        at org.apache.james.mime4j.storage.ThresholdStorageProvider$ThresholdStorageOutputStream.write0(ThresholdStorageProvider.java:113)
        at org.apache.james.mime4j.storage.StorageOutputStream.write(StorageOutputStream.java:119)
        at org.apache.james.mime4j.codec.CodecUtil.copy(CodecUtil.java:43)
        at org.apache.james.mime4j.storage.AbstractStorageProvider.store(AbstractStorageProvider.java:57)
        at org.apache.james.mime4j.message.BodyFactory.binaryBody(BodyFactory.java:92)
        at org.apache.james.mime4j.message.MessageBuilder.body(MessageBuilder.java:150)
        at org.apache.james.mime4j.parser.MimeStreamParser.parse(MimeStreamParser.java:101)
        at org.apache.james.mime4j.message.Message.<init>(Message.java:141)
        at org.apache.james.mime4j.message.Message.<init>(Message.java:100)
        at org.jboss.resteasy.plugins.providers.multipart.MultipartInputImpl.parse(MultipartInputImpl.java:76)
        at org.jboss.resteasy.plugins.providers.multipart.MultipartReader.readFrom(MultipartReader.java:50)
        at org.jboss.resteasy.plugins.providers.multipart.MultipartReader.readFrom(MultipartReader.java:20)
        at org.jboss.resteasy.core.interception.MessageBodyReaderContextImpl.proceed(MessageBodyReaderContextImpl.java:105)
        at org.jboss.resteasy.plugins.interceptors.encoding.GZIPDecodingInterceptor.read(GZIPDecodingInterceptor.java:61)
        at org.jboss.resteasy.core.interception.MessageBodyReaderContextImpl.proceed(MessageBodyReaderContextImpl.java:108)
        at org.jboss.resteasy.core.MessageBodyParameterInjector.inject(MessageBodyParameterInjector.java:169)
        ... 42 more
Dec 29 21:57:18 [http-8443-6] INFO  org.candlepin.resource.OwnerResource - Cleaning up owner: Owner [name = newOwner1356829349733, key = newOwner1356829349733, id = 8a90f82e3be957b2013be9bd511f52da]
Dec 29 21:57:18 [http-8443-6] INFO  org.candlepin.resource.OwnerResource - Deleting owner: Owner [name = newOwner1356829349733, key = newOwner1356829349733, id = 8a90f82e3be957b2013be9bd511f52da]
Dec 29 21:57:21 [http-8443-8] WARN  org.candlepin.jackson.JsonBeanPropertyFilter - Unable to serialize property 'canActivate without getter: getCanActivate
Dec 29 21:57:21 [http-8443-8] WARN  org.candlepin.jackson.JsonBeanPropertyFilter - Unable to serialize property 'autoheal without getter: getAutoheal
Dec 29 21:57:21 [http-8443-8] WARN  org.candlepin.policy.js.entitlement.ManifestEntitlementRules - No default rule found: post_global
Dec 29 21:57:21 [http-8443-8] WARN  org.candlepin.policy.js.JsRules - No rule found: post_global in namespace: unbind_name_space

Comment 2 John Sefler 2013-01-02 16:22:26 UTC
Note: The attached export.zip is not from the exact same run that produced the traceback in comment 1, but the content of the export .zip was effectively the same.

Comment 4 William Poteat 2013-08-23 19:05:28 UTC
Please retest.

Comment 5 John Sefler 2014-01-27 19:37:02 UTC
The original failure is no longer occuring against version...
[root@jsefler-7 ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 0.9.2-1     <========================
subscription-manager: 1.10.11-1.git.11.509d491.el7
python-rhsm: 1.10.11-1.git.0.17362f9.el7

[root@jsefler-f14-candlepin candlepin]# git show-ref | head -1
a4c8e23f003ae863449fb0a2f6a7830e44655e3f refs/heads/master   <=======


curl --stderr /dev/null --insecure --user admin:admin -F export=@/tmp/export.zip --request POST https://jsefler-f14-candlepin.usersys.redhat.com:8443/candlepin/owners/newOwner1390850633367/imports


# tail -f /var/log/candlepin/candlepin.log 
2014-01-27 14:27:07,445 [req=04b73cfb-fadc-403c-8ac3-1b87333af14b, org=] INFO  org.candlepin.servlet.filter.logging.LoggingFilter - Request: verb=POST, uri=/candlepin/owners/newOwner1390850633367/imports
2014-01-27 14:27:08,980 [req=04b73cfb-fadc-403c-8ac3-1b87333af14b, org=newOwner1390850633367] INFO  org.candlepin.resource.OwnerResource - Importing archive /var/cache/tomcat6/temp/pfx8735313541171688732sfx for owner newOwner1390850633367
2014-01-27 14:27:09,007 [req=04b73cfb-fadc-403c-8ac3-1b87333af14b, org=newOwner1390850633367] INFO  org.candlepin.sync.RulesImporter - Importing new rules from manifest, current version: 5.5 new version: 5.5
2014-01-27 14:27:09,470 [req=04b73cfb-fadc-403c-8ac3-1b87333af14b, org=newOwner1390850633367] INFO  org.candlepin.sync.EntitlementImporter - Creating new subscription for incoming entitlement with id [8a90874043d4d2df0143d52b00392793]
2014-01-27 14:27:09,474 [req=04b73cfb-fadc-403c-8ac3-1b87333af14b, org=newOwner1390850633367] INFO  org.candlepin.controller.CandlepinPoolManager - Refreshing pools for owner: newOwner1390850633367
2014-01-27 14:27:09,506 [req=04b73cfb-fadc-403c-8ac3-1b87333af14b, org=newOwner1390850633367] INFO  org.candlepin.policy.js.pool.PoolRules - Creating pools for new subscription: Subscription [id = 8a90874043d4d2df0143d52b6c8927af, product = awesomeos-workstation-basic, quantity = 1, expires = Mon Jan 26 19:00:00 EST 2015]
2014-01-27 14:27:09,547 [req=04b73cfb-fadc-403c-8ac3-1b87333af14b, org=newOwner1390850633367] INFO  org.candlepin.resource.OwnerResource - Import attempt completed for owner newOwner1390850633367
2014-01-27 14:27:09,549 [req=04b73cfb-fadc-403c-8ac3-1b87333af14b, org=newOwner1390850633367] INFO  org.candlepin.servlet.filter.logging.LoggingFilter - Response: status=204, content-type="null", time=2171ms


Moving to VERIFIED

Comment 6 Bryan Kearney 2014-09-29 19:05:07 UTC
These bugs were fixed during 7.0 but not moved to CLOSED. They have been delivered


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