Discussion:
Java +TCP/IPproblem on OSS
(too old to reply)
Andrew Mould
2008-10-21 23:35:55 UTC
Permalink
We're having a weird TCP/IP / Java / environmental problem on a system, I'd
appreciate some feedback on. The problem is in a third-party library that
when it tries to create a socket ends up reporting an exception:

[Dynamic-linking native method java.net.PlainSocketImpl.socketCreate ...
JNI]
Exception getting web server portjava.io.IOException: No such file or
directory (errno:4002) .

It looks like the low-level OSS-specific layers under Java are reporting
this. We have no idea what "file or directory" doesn't exist. We see errors
4001, 4003 & 4004 documented in the manuals, but not this one!

Our theories are that it could be a bad TCP/IP config or something to do
with a DEFINE name. Javachk doesn't show any problems though. But if we
purposefully create a bad DEFINE name for TCPIP^PROCESS^NAME on another
system, then that system does create that exception, but then fails in a
different way. Our theory here being that the low-level implementation
translates a Java socket call into something more traditional (from an NSK
point of view) that requires a named process which is somehow derived
wrongly from the define name. However the define name for TCPIP^PROCESS^NAME
on the failing system is good, as far as we can tell!

I was surprised that the Java app is sensitve to the TCPIP^PROCESS^NAME
define names, as I'd have thought that should be entirely "under the hood".
But even if under the hood I guess the implementation may still have to
decide which TCPIP process to use, and I have no idea how it automatically
resolves that, unless it does some enquiry on SCF. Anyone know how that all
works? Or are multi-homed Java apps not possible on OSS without having to
write 'extensions'.

Finally trying this on another system where it does work, we don't see any
ports in use by the Java app in SCF. Is there some other method to finding
the ports being used by Java?!

Thanks for any and all feedback

- Andrew
Joachim Schmitz
2008-10-22 06:10:55 UTC
Permalink
Post by Andrew Mould
We're having a weird TCP/IP / Java / environmental problem on a
system, I'd appreciate some feedback on. The problem is in a
third-party library that when it tries to create a socket ends up
[Dynamic-linking native method java.net.PlainSocketImpl.socketCreate
... JNI]
Exception getting web server portjava.io.IOException: No such file or
directory (errno:4002) .
It looks like the low-level OSS-specific layers under Java are
reporting this. We have no idea what "file or directory" doesn't
exist. We see errors 4001, 4003 & 4004 documented in the manuals, but
not this one!
Our theories are that it could be a bad TCP/IP config or something to
do with a DEFINE name. Javachk doesn't show any problems though. But
if we purposefully create a bad DEFINE name for TCPIP^PROCESS^NAME on
another system, then that system does create that exception, but then
fails in a different way. Our theory here being that the low-level
implementation translates a Java socket call into something more
traditional (from an NSK point of view) that requires a named process
which is somehow derived wrongly from the define name. However the
define name for TCPIP^PROCESS^NAME on the failing system is good, as
far as we can tell!
I was surprised that the Java app is sensitve to the
TCPIP^PROCESS^NAME define names, as I'd have thought that should be
entirely "under the hood". But even if under the hood I guess the
implementation may still have to decide which TCPIP process to use,
and I have no idea how it automatically resolves that, unless it does
some enquiry on SCF. Anyone know how that all works? Or are
multi-homed Java apps not possible on OSS without having to write
'extensions'.
Finally trying this on another system where it does work, we don't
see any ports in use by the Java app in SCF. Is there some other
method to finding the ports being used by Java?!
Thanks for any and all feedback
To verify proper TCP/IP setup try javachk (to be found in
/usr/tandem/nssjava/jdk*/install/)
If that doesn't give you the hints you need, open a case with GMCSC.

Bye, Jojo
Andrew Mould
2008-10-22 20:39:29 UTC
Permalink
Post by Joachim Schmitz
Post by Andrew Mould
Thanks for any and all feedback
To verify proper TCP/IP setup try javachk (to be found in
/usr/tandem/nssjava/jdk*/install/)
If that doesn't give you the hints you need, open a case with GMCSC.
Bye, Jojo
As I put in my way-too-long writeup(!), we'd already tried Javachk which
didn't show anything. We are starting to think in terms of GMCSC.

Wrt the issue of finding open ports, we found the right manual section for
that.
JShepherd
2008-10-22 21:10:48 UTC
Permalink
Post by Andrew Mould
Post by Joachim Schmitz
Post by Andrew Mould
Thanks for any and all feedback
To verify proper TCP/IP setup try javachk (to be found in
/usr/tandem/nssjava/jdk*/install/)
If that doesn't give you the hints you need, open a case with GMCSC.
Bye, Jojo
As I put in my way-too-long writeup(!), we'd already tried Javachk which
didn't show anything. We are starting to think in terms of GMCSC.
Wrt the issue of finding open ports, we found the right manual section for
that.
It appears that if =TCPIP^PROCESS^NAME is present, OSS sockets
strips off the node portion and tries to use just the process portion.

Using a really old Tandem sockets test prog compiled for OSS sockets
I set =TCPIP^PROCESS^NAME to \REMOTE.$ztc0
and the local $ZTC0 gets opened.

When I set =TCPIP^PROCESS^NAME to \REMOTE.$ztc99 which does not exist
I get error 4002


SOCKET ROUTINES SUPPORT ROUTINES
--------------- ----------------
1 - accept 17 - gethostbyaddr
2 - bind 18 - gethostbyname
3 - connect 19 - gethostid
4 - listen 20 - gethostname
5 - getpeername 21 - getnetbyaddr
6 - getsockname 22 - getnetbyname
7 - getsockopt 23 - getprotobyname
8 - recv 24 - getprotobynumber
9 - recvfrom 25 - getservbyname
10 - send 26 - getservbyport
11 - sendto 27 - inet_addr
12 - setsockopt 28 - inet_lnaof
13 - shutdown 29 - inet_makeaddr
14 - socket 30 - inet_netof
15 - ioctl 31 - inet_network
16 - socket_set_inet_name 32 - inet_ntoa

H - HELP Q - QUIT

OP ->14
Possible domain values are :
1 = AF_UNIX (UNIX internal protocols)
2 = AF_INET (ARPA Internet protocols)
6 = AF_NS (Xerox Network Systems protocols)
3 = AF_IMPLINK (IMP [host at IMP] link layer)
Domain ->[AF_INET]
Possible type values are:
1 = SOCK_STREAM (TCP socket)
2 = SOCK_DGRAM (UDP socket)
3 = SOCK_RAW (raw socket)
5 = SOCK_SEQPACKET
4 = SOCK_RDM
Type ->[SOCK_STREAM]
socket starting ... failed
socket error 4002: No such file or directory
r***@gmail.com
2008-10-23 11:32:16 UTC
Permalink
Post by JShepherd
Using a really old Tandem sockets test prog compiled for OSS sockets
I set  =TCPIP^PROCESS^NAME to \REMOTE.$ztc0
and the local $ZTC0 gets opened.
When I set  =TCPIP^PROCESS^NAME to \REMOTE.$ztc99 which does not exist
I get error 4002
SOCKET ROUTINES            SUPPORT ROUTINES
---------------            ----------------
 1 - accept                17 - gethostbyaddr
 2 - bind                  18 - gethostbyname
 3 - connect               19 - gethostid
 4 - listen                20 - gethostname
 5 - getpeername           21 - getnetbyaddr
 6 - getsockname           22 - getnetbyname
 7 - getsockopt            23 - getprotobyname
 8 - recv                  24 - getprotobynumber
 9 - recvfrom              25 - getservbyname
10 - send                  26 - getservbyport
11 - sendto                27 - inet_addr
12 - setsockopt            28 - inet_lnaof
13 - shutdown              29 - inet_makeaddr
14 - socket                30 - inet_netof
15 - ioctl                 31 - inet_network
16 - socket_set_inet_name  32 - inet_ntoa
H - HELP                   Q  - QUIT
OP ->14
Is this program available for download somewhere?

Rich
JShepherd
2008-10-23 15:07:17 UTC
Permalink
Post by r***@gmail.com
Post by JShepherd
Using a really old Tandem sockets test prog compiled for OSS sockets
I set =A0=3DTCPIP^PROCESS^NAME to \REMOTE.$ztc0
and the local $ZTC0 gets opened.
When I set =A0=3DTCPIP^PROCESS^NAME to \REMOTE.$ztc99 which does not exis=
t
Post by JShepherd
I get error 4002
SOCKET ROUTINES =A0 =A0 =A0 =A0 =A0 =A0SUPPORT ROUTINES
--------------- =A0 =A0 =A0 =A0 =A0 =A0----------------
=A01 - accept =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A017 - gethostbyaddr
=A02 - bind =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A018 - gethostbyname
=A03 - connect =A0 =A0 =A0 =A0 =A0 =A0 =A0 19 - gethostid
=A04 - listen =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A020 - gethostname
=A05 - getpeername =A0 =A0 =A0 =A0 =A0 21 - getnetbyaddr
=A06 - getsockname =A0 =A0 =A0 =A0 =A0 22 - getnetbyname
=A07 - getsockopt =A0 =A0 =A0 =A0 =A0 =A023 - getprotobyname
=A08 - recv =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A024 - getprotobynumber
=A09 - recvfrom =A0 =A0 =A0 =A0 =A0 =A0 =A025 - getservbyname
10 - send =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A026 - getservbyport
11 - sendto =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A027 - inet_addr
12 - setsockopt =A0 =A0 =A0 =A0 =A0 =A028 - inet_lnaof
13 - shutdown =A0 =A0 =A0 =A0 =A0 =A0 =A029 - inet_makeaddr
14 - socket =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A030 - inet_netof
15 - ioctl =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 31 - inet_network
16 - socket_set_inet_name =A032 - inet_ntoa
H - HELP =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 Q =A0- QUIT
OP ->14
Is this program available for download somewhere?
Rich
You would have to ask HP.

If it helps someone at HP track it down, the comments from the source are ...

/*-----------------------------------------------------------------
* This program has been written to enable the interactive testing
* of Berkeley sockets operations. The program was originally
* written to run on Tandem Guardian 90, SUN/OS and DOS (with
* a Ungerman-Bass Ethernet Card and Microsoft C 5.1).
*
* Author : George Bateman
* Date : Sep 1989
Andrew Mould
2008-10-25 05:31:51 UTC
Permalink
Post by JShepherd
Post by Andrew Mould
Thanks for any and all feedback
It appears that if =TCPIP^PROCESS^NAME is present, OSS sockets
strips off the node portion and tries to use just the process portion.
Using a really old Tandem sockets test prog compiled for OSS sockets
I set =TCPIP^PROCESS^NAME to \REMOTE.$ztc0
and the local $ZTC0 gets opened.
When I set =TCPIP^PROCESS^NAME to \REMOTE.$ztc99 which does not exist
I get error 4002
.
.
Post by JShepherd
socket error 4002: No such file or directory
Yes, that mirrors what we found, though we hadn't appreciated that the node
name is ignored. Trouble is our TCP^IP^PROCESSNAME process does exist, as
does $ZTC0 (the default)!

We've now found the program works on this one troublesome system when
started direct from the shell, but not when started via its normal shell
script launcher; other systems have no problem. So we're currently
investigating the shell environment for clues.
Joachim Schmitz
2008-10-25 11:08:26 UTC
Permalink
Post by Andrew Mould
Post by Joachim Schmitz
Post by Andrew Mould
Thanks for any and all feedback
To verify proper TCP/IP setup try javachk (to be found in
/usr/tandem/nssjava/jdk*/install/)
If that doesn't give you the hints you need, open a case with GMCSC.
Bye, Jojo
As I put in my way-too-long writeup(!), we'd already tried Javachk
which didn't show anything. We are starting to think in terms of
GMCSC.
Oops, missed that, sorry
Post by Andrew Mould
Wrt the issue of finding open ports, we found the right manual
section for that.
Bye, Jojo
Randall
2020-06-22 18:50:49 UTC
Permalink
Post by Joachim Schmitz
Post by Andrew Mould
Post by Joachim Schmitz
Post by Andrew Mould
Thanks for any and all feedback
To verify proper TCP/IP setup try javachk (to be found in
/usr/tandem/nssjava/jdk*/install/)
If that doesn't give you the hints you need, open a case with GMCSC.
Bye, Jojo
As I put in my way-too-long writeup(!), we'd already tried Javachk
which didn't show anything. We are starting to think in terms of
GMCSC.
Oops, missed that, sorry
Post by Andrew Mould
Wrt the issue of finding open ports, we found the right manual
section for that.
Bye, Jojo
In our config, we have =TCPIP^PROCESS^NAME=$ZTCP1 but $ZTC0 also exists. $ZTC0 is being used and the define is being ignored. I used javachk and it reported $ZTCP1, but the java server program is still using the default $ZTC0.
Loading...