[jcifs] Timeout connecting to AS400 using jcifs.

David Tooke dtooke at interproconsulting.com
Wed Apr 9 01:57:32 EST 2003


Mike,

I appreciate your position and the time you've taken to investigate this.

I do, however, believe there's more to this than might be apparent.
NetServer has, otherwise, proven to be a reliable server for us (and
apparently the whole AS400 community in general as this is part of the OS400
operating system) when connected to all versions of Windows; and some Unix
boxes (although I'm not sure what SMB client we are using).  And, frankly,
the only indication that there is a problem has been via JCIFS.

I will try to investigate more as time permits and let you know what I come
across.

Thanks again,
David

----- Original Message -----
From: "Allen, Michael B (RSCH)" <Michael_B_Allen at ml.com>
To: <DTooke at interproconsulting.com>
Cc: <jcifs at samba.org>
Sent: Monday, April 07, 2003 6:49 PM
Subject: RE: [jcifs] Timeout connecting to AS400 using jcifs.


> Well from looking at the dump the OemDomainName field in
> the SMB_COM_NEGOTIATE response is 'IPC' in ASCII even though the
> Capabilites and flags2 fields indicates Unicode is supported and
> other strings appear to be Unicode. The result is the OemDomainName of
> '?C'. In the SMB_COM_TREE_CONNECT_ANDX there are mixtures of 8bit and
> Unicode strings. Again flags2 indicates these strings are Unicode. I'm
> surprised this 'AS/400 Support for Windows Network Neighborhood' works
> with Windows let alone jCIFS. Sorry, but there's little chance I would
> add the necessary kludges to support such a poor implementation. It would
> not be too difficult to add such hacks provided the result were only used
> on OS400. First, try setting useUnicode=false. Then identfy every place
> where strings are encoded and decoded and change the 'getBytes()' to
> 'getBytes( encoding )' and 'new String( bytes )' to 'new String( bytes,
> encoding )' like jcifs-0.7.x does so you can add a jcifs.encoding=EBCDIC
> property. Unfortunately I don't have the time or patience to provide
> platform specific patches. Perhaps you should speak to the vendor that
> supplied this "server". Of course it's always possible that my diagnosis
is
> wrong. If you can get a packet capture of NT 4.0 <--> OS400 and jCIFS
> <--> OS400 by all means send it to me and I'll confirm that jCIFS isn't
> doing something that is casing the server to behave so strangely.
>
> Mike
>
> > -----Original Message-----
> > From: DTooke at interproconsulting.com [SMTP:DTooke at interproconsulting.com]
> > Sent: Monday, April 07, 2003 11:59 AM
> > To: Allen, Michael B (RSCH)
> > Subject: RE: [jcifs] Timeout connecting to AS400 using jcifs.
> >
> > Mike,
> >
> > I have attached another dump.  Although, as I said last time I was
getting a response from ListFiles something wierd is happening.
> >
> > The directory being listed only contains 11 items, but the response is
saying there are 71.  As you can see from the dump the AS400 is giving the
right files.
> >
> > Yes, I am running on jcifs-0.6.8,  the version of OS400 I have only
supports Java 1.2 currently.  I know the folks at JTOPEN, the open-source
AS400 Java toolkit are very interested in SMB access to
> > NetServer/400 (although I guess your licensing isn't necessarily
compatible with theirs).  But anyway, if this worked, there could be a
potential for other /400 shops to be interested.
> >
> > I am not whether I am able to run a packet capture on our network, I
will have to consult with our IT druids.
> >
> > As for the encoding...It looks like the AS400 is only responding in
ASCII.  That looks like the default, I can't find any encoding attribute on
the NetServer configuration.  (In experimenting, I had
> > changed the encoding property to EBCDIC on the jcifs side before I
realised that it seemed to be a 7.0 feature.)
> >
> >
> > Thanks
> >
> > David Tooke
> > dtooke at interproconsulting.com <mailto:dtooke at interproconsulting.com>
> >
> >
> >
> > -----"Allen, Michael B (RSCH)" <Michael_B_Allen at ml.com> wrote: -----
> >
> > To: "'DTooke at interproconsulting.com'" <DTooke at interproconsulting.com>
> > From: "Allen, Michael B (RSCH)" <Michael_B_Allen at ml.com>
> > Date: 04/04/2003 05:42PM
> > cc: jcifs at lists.samba.org
> > Subject: RE: [jcifs] Timeout connecting to AS400 using jcifs.
> >
> >
> >
> > > -----Original Message-----
> > > From: DTooke at interproconsulting.com
[SMTP:DTooke at interproconsulting.com]
> > > Sent: Friday, April 04, 2003 2:42 PM
> > > To: Allen, Michael B (RSCH)
> > > Cc: 'DTooke at interproconsulting.com'; jcifs at lists.samba.org
> > > Subject: RE: [jcifs] Timeout connecting to AS400 using jcifs.
> > >
> > > Mike,
> > >
> > > I think I found the problem. At least, I found the solution...I'm
still not sure what the problem was.
> > >
> > > On the NETSERVER configuration, the domain name was set to an old
domain. All our PC's were set to another domain. When I changed the
NETSERVER configuration to the new domain. I was able to run
> > > ListFiles on both my pc and the AS400.
> > >
> > > I don't quite understand why it didn't work when I ran ListFiles
directly on the AS400 previously, but it does work now. I would have thought
the domain would have, in effect been irrelevant when
> > > you are on a machine and talking to that same machine.
> > >
> > > But, anyway, what do I know? it works now.
> > >
> > It shouldn't make any difference. From the -Dlog=ALL trace you sent me
it looks like the server
> > is responding to the SMB_COM_NEGOTIATE reqest but jCIFS didn't read the
complete
> > response. It's expecting something more. We would need a packet capture
to see what this
> > server is really doing. Someone has a bug I think.
> >
> > Also is OS400 EBCDIC encoding? I don't think we fully abstracted the
host encoding until 0.7. I
> > see you're using IBM's 1.2 and jcifs-0.6.8.
> >
> > Mike
> >
> >  << File: dump >>
>



More information about the jcifs mailing list