NetException when sending http post to Java 14

Hi,

I am trying to do a http post to a Java 1.4 server. Whenever I start the service I get the following error:

com.wm.net.NetException: [B2BCORE.0064.9322] expecting: (58) got (-1)
context:

The strange thing is, that the server receives all the data without problems. The http connection is closed (according to the Java 1.4 server) and everything looks all right, but only on the Java 1.4 side.
The Developer seems to think something different…

Any ideas?

Holger.

Hi,

What OS are you using on the client side? For instance, the Linux 1.3 jvm does not close sockets “properly”.

Also, you mention the Developer. Is it because you trace/run the flow in the Developer? Have you looked at the server and audit logs to see if you could get more details?

bruno

> What OS are you using on the client side?
> For instance, the Linux 1.3 jvm does not close sockets “properly”.

Bruno: Wow! Could you elaborate on this? Do you know which Linux JVM (IBM, Sun, or Blackdown) shows this problem?

Holger: maybe you could use tcpdump on the client and server to debug how the OS is handling the TCP/IP socket. You could also try running ‘netstat -vn’ at the command line for this, say with the following Unix bash script line:
while [ 1 ] ; do netstat -vn | grep <ip_address>; done;

This (should) show the TCP connection being setup and torn down second-by-second. In Unix, you can check the netstat Send-Queue and Receive-Queue outputs to see whether webMethods or the JVM is actually processing the packets received by the OS. In Windows, ‘netstat -vnaes’ (possibly?) gives similar functionality.

Hi,

To get details on the socket issue with the Linux JVM please go to the java bug parade at
[url=“http://developer.java.sun.com/developer/bugParade/bugs/4344135.html”]http://developer.java.sun.com/developer/bugParade/bugs/4344135.html[/url]
You must be a registered member to access it (free)

In short, this issue affects Linux 1.3.1 and earlier and Solaris 5.6 and earlier: close() on a socket is not preemptive and the associated thread will not be killed.

One impact on our Wm 4.6 server was that when trying to stop a listener, everything looked OK but when you tried to restart the listener, an error was thrown telling you the port was already busy, which you could be confirmed with a netstat.
The suggested workaround worked for us with a SUN 1.3.1_04-b02 jvm on a 2.4.19 kernel i.e. specify
J2SE_PREEMPTCLOSE=1
export J2SE_PREEMPTCLOSE
in the server.sh script.

cheers

bruno

Thanks Bruno - I’ve seen the “port busy” problem you mentioned, but also came across what may be two other infrequent forms of this issue:

  • a socket that was meant to be closed lingers about
    (netstat shows it in CLOSE_WAIT)
  • trading partner cannot connect to the SSL port
    (netstat shows bytes in receive queue, but IS does not process them)
    There are rare enough to not to be a major pain, but are irritants.

A couple more clarifications: The bug seems to be with the Linux kernel, but you mentioned "Linux 1.3.1 " – by mistake I assume; you probably meant the JDK, right? Can you tell us which kernel you saw this problem on? We’ve seen the problems above running the 2.2.1x Linux kernels. (Redhat 6.x)

Also, we’ve run the IBM JVMs, not the Sun ones - have you heard of workarounds for the IBM JVM?

Sonam,

>A couple more clarifications: The bug seems to be with the Linux >kernel, but you mentioned "Linux 1.3.1 " – by mistake I assume; you >probably meant the JDK, right?

Sorry - not enough coffee :wink: The sentence should have read: "this issue affects Sun JDK 1.3.1 and earlier on Linux and Solaris 5.6 and earlier.

>Can you tell us which kernel you saw this problem on? We’ve seen the >problems above running the 2.2.1x Linux kernels. (Redhat 6.x)

We are running a 2.4.19 kernel from a Mandrake and had the issue on that particular kernel. I cannot remember an install with a 2.2 kernel ut I think to remember that the workaround works for kernels 2.4.x only. Also, when browsing thru the “bug parade” on the the Sun site, I saw someone reporting an issue with a Red Hat 7.3.

>Also, we’ve run the IBM JVMs, not the Sun ones - have you heard of >workarounds for the IBM JVM?
We have tried to run the IBM 1.3 JVMs but we gave up because of various issues. I do not know whether this issue is happening on the IBM JVMs (I would be surprised it is not) and do not know of any workaround.

Hope this helps

bruno

Thanks Bruno! I’m curious to know the problems you encountered with the IBM JVMs on Linux/other platforms (we evaluated Sun and IBM here as well). In case you’d like to email me, my email is attached to this comment.

Holger: I hope your problem got resolved.