[jcifs] jCifs unusable if Win2K laptop is unplugged

Kammerloher Josef Josef.Kammerloher at softlab.de
Tue Nov 13 23:24:09 EST 2001


Hello Mike !

I threw a little bit more light on the problem and detected a big problem.

As long as the network is plugged to a Win2000 laptop, everything is okay
('netstat -a' shows netbios services on ports 137-139, 
'route print' shows the routing table).
When I unplug the network, after some seconds the netbios services are gone
and the routing table is empty !
When plugging again to the network, the netbios services are started again
the the routing
table is filled correctly.
In other words: netbios services are stopped/started automatically.

As long as the laptop is unplugged, jCifs does not work !

I found similar problems in the net:
http://www.smotricz.com/kabutz/Issue028.html   (search for 'unplug')

I searched the Win2000 service who is responsable for this behaviour, but
failed
(DO not switch off the plug-and-play service !)

Do you have any idea how to surround this problem ?
Thanks,
Josef

> -----Original Message-----
> From:	Michael B. Allen [SMTP:mballen at erols.com]
> Sent:	Friday, November 09, 2001 11:39 PM
> To:	Kammerloher Josef
> Cc:	jcifs at samba.org
> Subject:	Re: problem if Win2K laptop is not connected to the network
> 
> I don't know Josef. Didn't we go over this before? It doesn't look like 
> this is jcifs more than just underlying networking issues. You're 
> getting NoRouteToHostException, NodeStatusRequests going unanswered, and 
> Connection refused all in one trace. It seems like some network services 
> are just off maybe? I think you can get netmon working if you specify 
> the loopback device. You might also mess with the laddr, baddr, hostname 
> properties etc. Try using an IP. These are all things that would 
> eliminate intermediate steps that might be failing in a loopback env.
> 
> Mike
> 
> Kammerloher Josef wrote:
> 
> >Hi Mike !
> >
> >I have a big problem with one laptop win Win2K installed and not plugged
> >into the network.
> >I call the following lines:
> >
> >          jcifs.util.Log.setMask( jcifs.util.Log.ALL );
> >          String smbFileName =
> >                    "smb://" + domain + ";" + user + ":" + password
> >                    + "@" + server + "/enabler/omsbroker";
> >          SmbFile smbFile       = new SmbFile( smbFileName );
> >          SmbFileInputStream is = new SmbFileInputStream( smbFile );
> >
> >
> >The smbFileName is okay (it works, if connected to the network).
> > 
> >Everything runs fine, if the laptop is connected to the network.
> >
> >The problem does not occur, when a PC (not a laptop) with the same Win2K
> is 
> >not plugged to the network.
> >
> >I used the newest   jcifs-0.5.1.jar
> >
> >I tried to get a trace via the MS-network monitor, but local things are
> not
> >traced.
> >
> >Here is the complete output.
> >
> >Any ideas ?
> >Thanks a lot,
> >Josef
> >
> <snip>
> 
> >
> >
> >Nov 9 11:34:47.129 - name service address cache
> > JCIFS0_1_E1<00> JCIFS0_1_E1<00>/127.0.0.1
> >
> >Nov 9 11:34:47.169 - nbt name service send:
> >java.net.NoRouteToHostException: Host unreachable: Datagram send failed
> >	at java.net.PlainDatagramSocketImpl.send(Native Method)
> >	at java.net.DatagramSocket.send(DatagramSocket.java:321)
> >	at jcifs.netbios.NameServiceClient.send(NameServiceClient.java:244)
> >	at
> >jcifs.netbios.NameServiceClient.getByName(NameServiceClient.java:288)
> >	at jcifs.netbios.NbtAddress.doNameQuery(NbtAddress.java:479)
> >	at jcifs.netbios.NbtAddress.getByName(NbtAddress.java:530)
> >	at jcifs.smb.SmbFile.<init>(SmbFile.java:361)
> >	at jcifs.smb.SmbFile.<init>(SmbFile.java:304)
> >	at enabler.jcifsTest.test(jcifsTest.java:40)
> >	at enabler.jcifsTest.main(jcifsTest.java:58)
> >Nov 9 11:34:47.529 - name service address cache
> > 0.0.0.0<00> 0.0.0.0<00>/0.0.0.0
> > JCIFS0_1_E1<00> JCIFS0_1_E1<00>/127.0.0.1
> > TMATTY2<20> *
> >Nov 9 11:34:47.589 - nbt name service packet sent
> >NodeStatusRequest[nameTrnId=2,isResponse=false,opCode=QUERY,isAuthAnswer=
> fal
> >se,isTruncated=false,isRecurAvailable=false,isRecurDesired=true,isBroadca
> st=
> >true,resultCode=0,questionCount=1,answerCount=0,authorityCount=0,addition
> alC
> >ount=0,questionName=*021,questionClass=IN,recordName=null,recordType=0x00
> 00,
> >recordClass=0x0000,ttl=0,rDataLength=0] Nov 9 11:34:50.794 - datagram
> packet
> >sent to: TMATTY2/127.0.0.1 00000: 00 03 01 10 00 01 00 00 00 00 00 00 20
> 43
> >4B 41  |............ CKA| 00010: 41 41 41 41 41 41 41 41 41 41 41 41 41
> 41
> >41 41  |AAAAAAAAAAAAAAAA| 00020: 41 41 41 41 41 41 41 41 41 41 41 41 41
> 00
> >00 21  |AAAAAAAAAAAAA..!| 00030: 00 01
> >|..              |  Nov 9 11:34:54.079 - smb open warning
> name=\omsbroker
> >Nov 9 11:34:54.079 - smb negotiation warning  requesting negotiation with
> *
> >Authorization failed: java.net.ConnectException: Connection refused:
> >connect:::Connection refused: connect 
> >
> 
> 




More information about the jcifs mailing list