camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pontus Ullgren <ullg...@gmail.com>
Subject Re: smb cannot connect to server
Date Fri, 28 Oct 2016 20:17:05 GMT
Hi,

Looking into the source of the jcifs library (where the exception
originates) it seems that the root cause of the exception is
a UnknownHostException.

See the FAQ for the jcifs library (https://jcifs.samba.org/FAQ.html#ukhost).
Is the server address resolvable over DNS you can try changing the
resolveOrder property to first use DNS resolution (see the documentation
https://jcifs.samba.org/src/docs/resolver.html).

Best regards
Pontus Ullgren

On Fri, 28 Oct 2016 at 20:05 Peter J Nelson <pete.nelson@ci.stpaul.mn.us>
wrote:

> Camel: 2.16.3, camel-jcifs: 2.15.0 (latest)
>
> I am using jCIFS and attempting to connect to a remote share in a different
> domain.  I can connect to this share without issue using Windows Explorer
> (Win 7) and the UNC path.  I can also connect through Linux using smbclient
> (SuSE 11, samba-client-3.6.3-0.56.1) and mount it as -t cifs
> (cifs-utils-5.1-0.11.1).
>
> However, connecting to the share through camel's jcifs/smb component does
> not work on shares outside of the default domain.  I was initially using
> the
> smb://domain;username:password@fullyqualifiedhost/share/path .  This
> format
> worked fine for Windows shares within my default domain, but failed when
> trying to connect to a remote domain.
>
> I turned up logging to debug for "org.apacheextras.camel.component.jcifs",
> and found this when I'd try connecting:
>
> 10/28/2016 12:58:49 DEBUG [Camel (tritechProcessorContext) thread #0 -
> smb://rce_cad_rms_es.rc-ecc.org/StPaul/Out]
> org.apacheextras.camel.component.jcifs.DefaultSmbClient login()
> domain[null]
> username[null] password[***]
>
> From that, it appears as if the username & domain were not being sent.  I
> added these as query strings, and that seemed to fix THAT issue:
>
> 10/28/2016 13:03:12 DEBUG [Camel (tritechProcessorContext) thread #0 -
> smb://rce_cad_rms_es.rc-ecc.org/StPaul/Out]
> org.apacheextras.camel.component.jcifs.DefaultSmbClient login()
> domain[rc-ecc] username[testuser] password[***]
>
> However, it still cannot connect to that server:
>
> org.apache.camel.component.file.GenericFileOperationFailedException: Could
> not get files Failed to connect to server
>         at
>
> org.apacheextras.camel.component.jcifs.SmbOperations.listFiles(SmbOperations.java:345)
> ~[camel-jcifs-2.15.0.jar:2.15.0]
>         at
>
> org.apacheextras.camel.component.jcifs.SmbConsumer.pollDirectory(SmbConsumer.java:58)
> ~[camel-jcifs-2.15.0.jar:2.15.0]
>         at
>
> org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:119)
> ~[camel-core-2.16.3.jar:2.16.3]
>         at
>
> org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:174)
> [camel-core-2.16.3.jar:2.16.3]
>         at
>
> org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:101)
> [camel-core-2.16.3.jar:2.16.3]
>         at
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
> [na:1.8.0_102]
>         at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
> [na:1.8.0_102]
>         at
>
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
> [na:1.8.0_102]
>         at
>
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
> [na:1.8.0_102]
>         at
>
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> [na:1.8.0_102]
>         at
>
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> [na:1.8.0_102]
>         at java.lang.Thread.run(Thread.java:745) [na:1.8.0_102]
> Caused by: jcifs.smb.SmbException: Failed to connect to server
>         at jcifs.smb.SmbFile.connect0(SmbFile.java:882)
> ~[jcifs-1.3.17.jar:na]
>         at jcifs.smb.SmbFile.resolveDfs(SmbFile.java:669)
> ~[jcifs-1.3.17.jar:na]
>         at jcifs.smb.SmbFile.send(SmbFile.java:773) ~[jcifs-1.3.17.jar:na]
>         at jcifs.smb.SmbFile.doFindFirstNext(SmbFile.java:1986)
> ~[jcifs-1.3.17.jar:na]
>         at jcifs.smb.SmbFile.doEnum(SmbFile.java:1738)
> ~[jcifs-1.3.17.jar:na]
>         at jcifs.smb.SmbFile.listFiles(SmbFile.java:1715)
> ~[jcifs-1.3.17.jar:na]
>         at jcifs.smb.SmbFile.listFiles(SmbFile.java:1648)
> ~[jcifs-1.3.17.jar:na]
>         at
>
> org.apacheextras.camel.component.jcifs.DefaultSmbClient.listFiles(DefaultSmbClient.java:161)
> ~[camel-jcifs-2.15.0.jar:2.15.0]
>         at
>
> org.apacheextras.camel.component.jcifs.SmbOperations.listFiles(SmbOperations.java:341)
> ~[camel-jcifs-2.15.0.jar:2.15.0]
>         ... 11 common frames omitted
>
> What am I missing?  Does camel not fully support smb?
>
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/smb-cannot-connect-to-server-tp5789414.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message