Reading a file using Apache Camel route from samba location

92 Views Asked by At

I'm trying to use org.apache.camel route ver: 2.18.0 from the spring boot 1.5.10.RELEASE to copy the file from the samba location.

I have the below samba location on my application.yml file.

smb://USER;username@sambahost/folder1/folder2/folder3?password=123456&initialDelay=30000&delay=300000&delete=true&readLock=changed

This used to work normally and our infra team recently migrated the sambahost from NetApp Storage device to Windows File shares and it stopped working.

I could see it is not an access issue as I was able to connect manually and it works.

naveenp@LTIN123456:~$ smbclient //sambahost/folder1/ -D folder2/folder3 -U username@sambahost -m SMB2
Password for [username@sambahost]:
Try "help" to get a list of possible commands.
smb: \folder2\folder3\> ls
  .                                   D        0  Wed Sep 27 17:29:23 2023
  ..                                  D        0  Wed Sep 27 17:29:23 2023
  File09-27-2023_03-09-04.csv      A   479638  Wed Sep 27 12:30:22 2023

                129184287 blocks of size 65536. 23724791 blocks available
smb: \folder2\folder3\>

here is the error i get while try to get the file from samba location.

Consumer Consumer[smb://USER;username@sambahost/folder1/folder2/folder3?delay=300000&delete=true&initialDelay=30000&password=xxxxxx&readLock=changed] failed polling endpoint: smb://USER;username@sambahost/folder1/folder2/folder3?delay=300000&delete=true&initialDelay=30000&password=xxxxxx&readLock=changed. 
Will try again at next poll. Caused by: [org.apache.camel.component.file.GenericFileOperationFailedException - Could not get files Failed to connect: sambahost/10.100.100.123]
org.apacheextras.camel.component.jcifs.SmbConsumer","thread_name":"Camel (com.example.app.consumerApp) thread #0 - smb://USER;username@sambahost/folder1/folder2/folder3
org.apache.camel.component.file.GenericFileOperationFailedException: Could not get files Failed to connect: sambahost/10.100.100.123
 org.apacheextras.camel.component.jcifs.SmbOperations.listFiles(SmbOperations.java:350)
 org.apacheextras.camel.component.jcifs.SmbConsumer.pollDirectory(SmbConsumer.java:59)
 org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:132)
 org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:175)
 org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:102)
 java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
 java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
 java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
 java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
 java.lang.Thread.run(Thread.java:748)\r\n
Caused by: jcifs.smb.SmbException: Failed to connect: sambahost/10.100.100.123
 jcifs.smb.SmbTransport.connect(SmbTransport.java:309)
 jcifs.smb.SmbTree.treeConnect(SmbTree.java:156)
 jcifs.smb.SmbFile.doConnect(SmbFile.java:911)
 jcifs.smb.SmbFile.connect(SmbFile.java:954)
 jcifs.smb.SmbFile.connect0(SmbFile.java:880)
 jcifs.smb.SmbFile.resolveDfs(SmbFile.java:669)
 jcifs.smb.SmbFile.send(SmbFile.java:773)
 jcifs.smb.SmbFile.doFindFirstNext(SmbFile.java:1986)
 jcifs.smb.SmbFile.doEnum(SmbFile.java:1738)
 jcifs.smb.SmbFile.listFiles(SmbFile.java:1715)
 jcifs.smb.SmbFile.listFiles(SmbFile.java:1648)
 org.apacheextras.camel.component.jcifs.DefaultSmbClient.listFiles(DefaultSmbClient.java:161)
 org.apacheextras.camel.component.jcifs.SmbOperations.listFiles(SmbOperations.java:346)

Thanks very much in-advance for your help on this.

0

There are 0 best solutions below