Tuesday 6 December 2016

FTP Adapter control directory permission issue

Finally I am going to start writing my first blog. I have been thinking about this for a quite a long time, but as you know all developers are very lazy about documentation, I am not an exception!

Our company have recently upgraded to SOA 11g and as any normal infrstructure setup, multiple SOA installations and domains are running on the same UNIX box with different UNIX users.

Issue:

We have a FTP Adapter which polls for FTP directory every 10 minutes. On the new SOA env. the FTP Adapter composite was not working. The error in the SOA out log as below:

<Dec 27, 2012 12:05:55 PM CST> <Error> <oracle.soa.adapter> <BEA-000000> <JCABinding=>  [FileTransfer_BPEL.FTP_Read/1.0] :update Unable to notify adapter of property changes>
<Dec 27, 2012 12:06:13 PM CST> <Warning> <oracle.soa.adapter> <BEA-000000> <FTP Adapter FileTransfer_BPEL PollWork::run exiting, Worker thread will die>


Trial and errors:

Found out the metalink note
FTP Adapter Unable To Notify Adapter Of Property Changes [ID 1361488.1]

But no use as for all the env. that we setup, we have copied the same FTPAdapterPlan.xml. Also verified that we have correct WIN setup for windows FTP server.

Tried redeploying the composite, redeploying the FTP Adapter rar and bouncing server but no use. Did not see the actual error, just the same error. The file was not getting picket up.


Resolution:

Finally the actual error after enabling the TRACE:32 level for "oracle.soa.adapter" logger configuration.

Ref: How to enable TRACE / DEBUG logging in Oracle SOA Suite 11g (inc. VIDEO) [ID 1325672.1]

The actual error was

[2012-12-27T19:26:59.937-06:00] [WLS_SOA1] [TRACE] [] [oracle.soa.adapter] [tid: Workmanager: , Version: 0, Scheduled=false, Started=false, Wait time: 0 ms\n] [userId: weblogic] [ecid: 2d000586bc52cf4f:-5c6890da:13bb56447d7:-8000-0000000000103750,1:32504] [SRC_CLASS: oracle.integration.platform.blocks.adapter.fw.log.LogManagerImpl] [APP: soa-infra] [SRC_METHOD: log] FTP Adapter FileTransfer_BPEL Calling getContentsAsStream() on FTPAgent:     10.***.**.**: type = FTP, host = 10.***.**.**:**[[
        directory = null, mode = STREAM, fileType = ASCII, maxRetries = 0 Localfile: test abc.csv Path: /tmp/controlDir/fileftp/temp_ftp/FileTransfer_BPEL/vdwPC9gmvckcGo5UIOLFSE9TNYQiGy5pzrkKskohmLY=/inbound/dO0jjx_Ncm5QvT8gY7cgq2YVG1a2LtJ312mrtFI_BkE= Remote Dir: FTP_DIR
]]
2012-12-27T19:26:59.937-06:00] [WLS_SOA1] [TRACE] [] [oracle.soa.adapter] [tid: Workmanager: , Version: 0, Scheduled=false, Started=false, Wait time: 0 ms\n] [userId: weblogic] [ecid: 2d000586bc52cf4f:-5c6890da:13bb56447d7:-8000-0000000000103750,1:32504] [SRC_CLASS: oracle.integration.platform.blocks.adapter.fw.log.LogManagerImpl] [APP: soa-infra] [SRC_METHOD: log] FTP Adapter FileTransfer_BPEL [[
BINDING.JCA-11440
Error in writing temp file after getting content.
Error in writing temp file after getting content.
Error in writing temp file after getting content for file: test abc.csv
Please ensure 1. the local filesystem has write permission 2. local file system is not full.

        at oracle.tip.adapter.ftp.inbound.FTPSource.getContents(FTPSource.java:991)
        at oracle.tip.adapter.ftp.inbound.FTPSource.getFileFromSource(FTPSource.java:912)
        at oracle.tip.adapter.file.inbound.ProcessorDelegate.getContentAsFile(ProcessorDelegate.java:439)
        at oracle.tip.adapter.file.inbound.ProcessorDelegate.process(ProcessorDelegate.java:137)
        at oracle.tip.adapter.file.inbound.ProcessWork.run(ProcessWork.java:349)
        at oracle.integration.platform.blocks.executor.WorkManagerExecutor$1.run(WorkManagerExecutor.java:120)
        at weblogic.work.j2ee.J2EEWorkManager$WorkWithListener.run(J2EEWorkManager.java:184)
        at weblogic.work.DaemonWorkThread.run(DaemonWorkThread.java:30)
]]

Since we have multiple SOA env running on the same UNIX box with different UNIX users, below directory did NOT have write permission at group level. 
/tmp/controlDir/fileftp/temp_ftp/FileTransfer_BPEL


Once the write permission is given for group level, the FTP Adapter started working.

Next steps:

To find out whether we can control the temp directory location.

Hope this helps!

No comments:

Post a Comment