jCifs stops working.

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

jCifs stops working.

Marko.Krejic
Hi!

I have problems with that jCifs stops responding sometimes. I have not
really been able to connect to a specific case, just that it has been a peek
of users.

I am using jCIFS 1.2.7 and here is a part of the log:

java.io.InterruptedIOException: Read timed out
        at java.net.SocketInputStream.socketRead(Native Method)
        at java.net.SocketInputStream.read(SocketInputStream.java:85)
        at jcifs.util.transport.Transport.readn(Transport.java:29)
        at jcifs.smb.SmbTransport.peekKey(SmbTransport.java:351)
        at jcifs.util.transport.Transport.loop(Transport.java:98)
        at jcifs.util.transport.Transport.run(Transport.java:242)
        at java.lang.Thread.run(Thread.java:479)
SmbComTreeDisconnect[command=SMB_COM_TREE_DISCONNECT,received=false,errorCod
e=0,flags=0x0018,flags2=0xC003,signSeq=0,tid=616
2,pid=50548,uid=34819,mid=0,wordCount=0,byteCount=0]
00000: FF 53 4D 42 71 00 00 00 00 18 03 C0 00 00 00 00  |?SMBq......?....|
00010: 00 00 00 00 00 00 00 00 12 18 74 C5 03 88 00 00  |..........t?....|
00020: 00 00 00                                         |...             |

SmbComLogoffAndX[command=SMB_COM_LOGOFF_ANDX,received=false,errorCode=0,flag
s=0x0018,flags2=0xC003,signSeq=0,tid=0,pid=50548
,uid=34819,mid=0,wordCount=2,byteCount=0,andxCommand=0xFF,andxOffset=0]
00000: FF 53 4D 42 74 00 00 00 00 18 03 C0 00 00 00 00  |?SMBt......?....|
00010: 00 00 00 00 00 00 00 00 00 00 74 C5 03 88 00 00  |..........t?....|
00020: 02 FF 00 00 00 00 00                             |.?.....         |

SmbComTreeDisconnect[command=SMB_COM_TREE_DISCONNECT,received=false,errorCod
e=0,flags=0x0018,flags2=0xC003,signSeq=0,tid=266
25,pid=50548,uid=34818,mid=0,wordCount=0,byteCount=0]
00000: FF 53 4D 42 71 00 00 00 00 18 03 C0 00 00 00 00  |?SMBq......?....|
00010: 00 00 00 00 00 00 00 00 01 68 74 C5 02 88 00 00  |.........ht?....|
00020: 00 00 00                                         |...             |

SmbComLogoffAndX[command=SMB_COM_LOGOFF_ANDX,received=false,errorCode=0,flag
s=0x0018,flags2=0xC003,signSeq=0,tid=0,pid=50548
,uid=34818,mid=0,wordCount=2,byteCount=0,andxCommand=0xFF,andxOffset=0]
00000: FF 53 4D 42 74 00 00 00 00 18 03 C0 00 00 00 00  |?SMBt......?....|
00010: 00 00 00 00 00 00 00 00 00 00 74 C5 02 88 00 00  |..........t?....|
00020: 02 FF 00 00 00 00 00                             |.?.....         |

SmbComTreeDisconnect[command=SMB_COM_TREE_DISCONNECT,received=false,errorCod
e=0,flags=0x0018,flags2=0xC003,signSeq=0,tid=412
4,pid=50548,uid=14348,mid=0,wordCount=0,byteCount=0]
00000: FF 53 4D 42 71 00 00 00 00 18 03 C0 00 00 00 00  |?SMBq......?....|
00010: 00 00 00 00 00 00 00 00 1C 10 74 C5 0C 38 00 00  |..........t?.8..|
00020: 00 00 00                                         |...             |


And then this comes:

SmbComNegotiate[command=SMB_COM_NEGOTIATE,received=false,errorCode=0,flags=0
x0018,flags2=0xC003,signSeq=0,tid=0,pid=50548,ui
d=0,mid=167,wordCount=0,byteCount=12,wordCount=0,dialects=NT LM 0.12]
00000: FF 53 4D 42 72 00 00 00 00 18 03 C0 00 00 00 00  |?SMBr......?....|
00010: 00 00 00 00 00 00 00 00 00 00 74 C5 00 00 A7 00  |..........t?..?.|
00020: 00 0C 00 02 4E 54 20 4C 4D 20 30 2E 31 32 00     |....NT LM 0.12. |

New data read: Transport2[VANGELIS<00>/172.16.20.160:0]
00000: FF 53 4D 42 72 00 00 00 00 98 03 C0 00 00 00 00  |?SMBr......?....|
00010: 00 00 00 00 00 00 00 00 00 00 74 C5 00 00 A7 00  |..........t?..?.|

byteCount=50 but readBytesWireFormat returned 30
SmbComNegotiateResponse[command=SMB_COM_NEGOTIATE,received=false,errorCode=0
,flags=0x0098,flags2=0xC003,signSeq=0,tid=0,pid=
50548,uid=0,mid=167,wordCount=17,byteCount=50,wordCount=17,dialectIndex=0,se
curityMode=0x3,security=user,encryptedPasswords=
true,maxMpxCount=50,maxNumberVcs=1,maxBufferSize=16644,maxRawSize=65536,sess
ionKey=0x00000000,capabilities=0x0000F3FD,server
Time=Tue Jan 24 16:32:07 CET
2006,serverTimeZone=65476,encryptionKeyLength=8,byteCount=50,encryptionKey=0
xA9735E28B7DB6BBB,o
emDomainName=EUROPOLITAN]
00000: FF 53 4D 42 72 00 00 00 00 98 03 C0 00 00 00 00  |?SMBr......?....|
00010: 00 00 00 00 00 00 00 00 00 00 74 C5 00 00 A7 00  |..........t?..?.|
00020: 11 00 00 03 32 00 01 00 04 41 00 00 00 00 01     |....2....A..... |





After this it doesn't work anymore.

Can anybody help me?

Thanks in advance!
Marko

______________________________________
This message and any files or documents attached are confidential and may
also be legally privileged or protected by other legal rules. It is intended
only for the individual or entity named. If you are not the named addressee
or you have received this email in error, please inform the sender
immediately, delete it from your system and do not copy or disclose it or
its contents or use it for any purpose.
 Thank you.

Please also note that transmission cannot be guaranteed to be secure or
error-free.


Reply | Threaded
Open this post in threaded view
|

Re: jCifs stops working.

Michael B Allen-4
On Thu, 26 Jan 2006 07:21:40 +0100
[hidden email] wrote:

> Hi!
>
> I have problems with that jCifs stops responding sometimes. I have not
> really been able to connect to a specific case, just that it has been a peek
> of users.
>
> I am using jCIFS 1.2.7 and here is a part of the log:
>
> java.io.InterruptedIOException: Read timed out
>         at java.net.SocketInputStream.socketRead(Native Method)
> SmbComLogoffAndX[command=SMB_COM_LOGOFF_ANDX,received=false,errorCode=0,flag
> SmbComTreeDisconnect[command=SMB_COM_TREE_DISCONNECT,received=false,errorCod
> SmbComNegotiate[command=SMB_COM_NEGOTIATE,received=false,errorCode=0,flags=0
> SmbComNegotiateResponse[command=SMB_COM_NEGOTIATE,received=false,errorCode=0
>
> After this it doesn't work anymore.
>
> Can anybody help me?

Mmm, I don't know. This looks like a relatively harmless read timeout,
disconnect, and renegotiation. I suppose it could be that the resource
open is in a bad state after the reconnect. But I can't tell what it is
from this. What type of resource is being used? Are you just reading a
file or are you using the NTLM HTTP filter or what?

Mike
Reply | Threaded
Open this post in threaded view
|

RE: jCifs stops working.

Marko.Krejic
In reply to this post by Marko.Krejic
I am using NTLM filter and using the following config:

<filter>
        <filter-name>NtlmHttpFilter</filter-name>
        <filter-class>jcifs.http.NtlmHttpFilter</filter-class>

        <init-param>
                    <param-name>jcifs.smb.client.domain</param-name>
                    <param-value>europolitan</param-value>
                </init-param>
                <init-param>
                    <param-name>jcifs.http.domainController</param-name>
                    <param-value>172.16.20.160</param-value>
                </init-param>
                <init-param>
                    <param-name>jcifs.netbios.wins</param-name>
                    <param-value>172.16.21.160,172.16.21.82</param-value>
                </init-param>
                <init-param>
                    <param-name>jcifs.util.loglevel</param-name>
                    <param-value>10</param-value>
                </init-param>
    </filter>


Thanks
Marko

-----Original Message-----
From: Michael B Allen [mailto:[hidden email]]
Sent: den 26 januari 2006 07:48
To: [hidden email]
Cc: [hidden email]
Subject: Re: [jcifs] jCifs stops working.


On Thu, 26 Jan 2006 07:21:40 +0100 [hidden email] wrote:

> Hi!
>
> I have problems with that jCifs stops responding sometimes. I have not
> really been able to connect to a specific case, just that it has been
> a peek of users.
>
> I am using jCIFS 1.2.7 and here is a part of the log:
>
> java.io.InterruptedIOException: Read timed out
>         at java.net.SocketInputStream.socketRead(Native Method)
> SmbComLogoffAndX[command=SMB_COM_LOGOFF_ANDX,received=false,errorCode=
> 0,flag
>
SmbComTreeDisconnect[command=SMB_COM_TREE_DISCONNECT,received=false,errorCod
>
SmbComNegotiate[command=SMB_COM_NEGOTIATE,received=false,errorCode=0,flags=0
>
SmbComNegotiateResponse[command=SMB_COM_NEGOTIATE,received=false,errorCode=0
>
> After this it doesn't work anymore.
>
> Can anybody help me?

Mmm, I don't know. This looks like a relatively harmless read timeout,
disconnect, and renegotiation. I suppose it could be that the resource open
is in a bad state after the reconnect. But I can't tell what it is from
this. What type of resource is being used? Are you just reading a file or
are you using the NTLM HTTP filter or what?

Mike

______________________________________
This message and any files or documents attached are confidential and may
also be legally privileged or protected by other legal rules. It is intended
only for the individual or entity named. If you are not the named addressee
or you have received this email in error, please inform the sender
immediately, delete it from your system and do not copy or disclose it or
its contents or use it for any purpose.
 Thank you.

Please also note that transmission cannot be guaranteed to be secure or
error-free.


Reply | Threaded
Open this post in threaded view
|

Re: jCifs stops working.

Michael B Allen-4
On Thu, 26 Jan 2006 07:57:57 +0100
[hidden email] wrote:

Unless there's a compelling reason for doing otherwise the standard
config would be something like the following:

> <filter>
>         <filter-name>NtlmHttpFilter</filter-name>
>         <filter-class>jcifs.http.NtlmHttpFilter</filter-class>
>
>         <init-param>
>                     <param-name>jcifs.smb.client.domain</param-name>
>                     <param-value>europolitan</param-value>
>                 </init-param>
>                 <init-param>
>                     <param-name>jcifs.smb.client.username</param-name>
>                     <param-value>preauthuser</param-value>
>                 </init-param>
>                 <init-param>
>                     <param-name>jcifs.smb.client.password</param-name>
>                     <param-value>preauthpass</param-value>
>                 </init-param>
>                 <init-param>
>                     <param-name>jcifs.netbios.wins</param-name>
>                     <param-value>172.16.21.160,172.16.21.82</param-value>
>                 </init-param>
>                 <init-param>
>                     <param-name>jcifs.util.loglevel</param-name>
>                     <param-value>2</param-value>
>                 </init-param>
>     </filter>

You specified both domain and domainController which are somewhat mutually
exclusive. Also, with a loglevel of 10 the filter might be slow. You
should not use a loglevel of more than 2 in a production environment
for extended periods.

The config you're using should work but I don't know what the problem is
and I can't tell from the information provided. Try the standard config
above. The username and password are optional if your domain controllers
do not require SMB signing (and it appears yours do not).

Mike