Re: custom jcifs properties

2019-02-25 Thread Cihad Guzel
Hi Karl,

In some cases, "jcifs" is running slowly. In order to solve this problem,
we need to set custom some properties.

For example; my problem was in my test environment: I have a windows server
and an ubuntu server in same network in AWS EC2 Service. The windows server
has Active Directory service, DNS Server and shared folder while the ubuntu
server has some instance such as manifoldcf, an db instance and solr.

If the DNS settings are not defined on the ubuntu server, jcifs runs
slowly. Because the default resolver order is set as 'LMHOSTS,DNS,WINS'. It
means[1]; firstly "jcifs" checks '/etc/hosts' files for linux/unix
server'', then it checks the DNS server. In my opinion, the linux server
doesn't recognize the DNS server and threads are waiting for every file for
access to read.

I suppose, WINS is used when accessing hosts on different subnets. So, I
have set "jcifs.resolveOrder = WINS" and my problem has been FIXED.

I suppose, WINS is used when accessing hosts on different subnets.

Another suggestion for similar problem from another example[2]:
"-Djcifs.resolveOrder = DNS"

Finally; I suggest these changes:

Remove the line
(System.setProperty("jcifs.resolveOrder","LMHOSTS,DNS,WINS"); )  from
SharedDriveConnector.java

Add "-Djcifs.resolveOrder = LMHOSTS,DNS,WINS" to "start-options.env" file.

If you have been convinced about this, I can create a PR.

[1] https://www.jcifs.org/src/docs/resolver.html
[2] https://stackoverflow.com/a/18837754

Regards,
Cihad Guzel

Karl Wright , 24 Şub 2019 Paz, 19:20 tarihinde şunu
yazdı:

> These settings were provided by the developer of jcifs, Michael Allen.
> You have to really understand the protocol well before you should consider
> changing them in any way.
>
> Thanks,
> Karl
>
>
> On Sun, Feb 24, 2019 at 9:53 AM Cihad Guzel  wrote:
>
>> Hi,
>>
>> SharedDriveConnector have some hardcoded system properties as follow:
>>
>> static
>> {
>>   System.setProperty("jcifs.smb.client.soTimeout","15");
>>   System.setProperty("jcifs.smb.client.responseTimeout","12");
>>   System.setProperty("jcifs.resolveOrder","LMHOSTS,DNS,WINS");
>>   System.setProperty("jcifs.smb.client.listCount","20");
>>   System.setProperty("jcifs.smb.client.dfs.strictView","true");
>> }
>>
>> How can I override them when to start manifoldcf?
>>
>> It may be better to define these settings in the start-options.env file.
>>
>> Regards,
>> Cihad Guzel
>>
>


Re: custom jcifs properties

2019-02-24 Thread Karl Wright
These settings were provided by the developer of jcifs, Michael Allen.  You
have to really understand the protocol well before you should consider
changing them in any way.

Thanks,
Karl


On Sun, Feb 24, 2019 at 9:53 AM Cihad Guzel  wrote:

> Hi,
>
> SharedDriveConnector have some hardcoded system properties as follow:
>
> static
> {
>   System.setProperty("jcifs.smb.client.soTimeout","15");
>   System.setProperty("jcifs.smb.client.responseTimeout","12");
>   System.setProperty("jcifs.resolveOrder","LMHOSTS,DNS,WINS");
>   System.setProperty("jcifs.smb.client.listCount","20");
>   System.setProperty("jcifs.smb.client.dfs.strictView","true");
> }
>
> How can I override them when to start manifoldcf?
>
> It may be better to define these settings in the start-options.env file.
>
> Regards,
> Cihad Guzel
>