IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
Expand all | Collapse all

Service "pub.file:getFile" throw this error "IOException: An unexpected network error occurred"

  • 1.  Service "pub.file:getFile" throw this error "IOException: An unexpected network error occurred"

    Posted Wed April 19, 2017 07:51 AM

    Hi,

    On our Production environnement we have 2 IS (these are not real clusters but they are identical and deployed as a group to be available switched by a load balancer).

    We have a service flow which is used to read some files (these files are avaiblable from a shared file system).

    The problem we met is sometimes the “pub.file:getFile” fails with the error below because the file can not be read :

    java.io.IOException: An unexpected network error occurred

    Strangely, the file can be read from the IS2 but not from the IS1… and few days after the resource is released as if the files has been locked.

    Do you know why we meet this behaviour please ?

    The services called are :
    pub.file:getFile
    pub.soap.utils:createXOPObject

    Maybe a “close” action must be done somewhere after the call of createXOPObject ?

    Regards


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 2.  RE: Service "pub.file:getFile" throw this error "IOException: An unexpected network error occurred"

    Posted Fri April 21, 2017 11:19 AM

    Over the web, i didn’t see any advice or instruction saying this was required :
    pub.io:close

    Any idea ?

    Regards


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services


  • 3.  RE: Service "pub.file:getFile" throw this error "IOException: An unexpected network error occurred"

    Posted Mon April 24, 2017 06:12 AM

    Hi Cedric,

    in general it is good practice to close things which have been opened when they are no longer needed.

    In this case this means, after the result of getFiles is converted and/or mapped to another variable (not stream type), the file (handler) should be closed via pub.flie:close to free the resources on the file system.

    Regards,
    Holger


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services


  • 4.  RE: Service "pub.file:getFile" throw this error "IOException: An unexpected network error occurred"

    Posted Mon April 24, 2017 07:43 AM

    Hi Holger,
    Thanks for your reply.

    Yes it is a good idea to close the resource, but in my case the getFile uses “bytes”. May I be certain that the resource will be accessible and available from the consumer ?

    pub.file:getFile → bytes
    pub.soap.utils:createXOPObject
    pub.io:close


    #Flow-and-Java-services
    #Integration-Server-and-ESB
    #webMethods


  • 5.  RE: Service "pub.file:getFile" throw this error "IOException: An unexpected network error occurred"

    Posted Mon April 24, 2017 07:52 AM

    Hi Cedric,

    you should use pub.file:closeFile instead of pub.io.close.

    Regards,
    Holger


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 6.  RE: Service "pub.file:getFile" throw this error "IOException: An unexpected network error occurred"

    Posted Mon April 24, 2017 08:00 AM

    But where can I find it ?

    In my webMethods 9.8, it is neither in the directory pub.file, neither pub.io.

    Regards


    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB


  • 7.  RE: Service "pub.file:getFile" throw this error "IOException: An unexpected network error occurred"

    Posted Mon April 24, 2017 02:11 PM

    Hi Cedric,

    the Built-In Services Guide refers to pub.io:close, but this will only work for streams and eventually readers, not for bytes.

    This might be either an synchronization issue between the two IS instances or a networking issue between the two IS instances and the shared filesystem.

    Regards,
    Holger


    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods