Tomcat 6.0 with NIO and IBM Java V5 or V6 in USS

Issues and Questions related to running Apache Tomcat on z/OS
Post Reply
tfull
Posts: 15
Joined: Mon Oct 10, 2005 4:27 pm

Tomcat 6.0 with NIO and IBM Java V5 or V6 in USS

Post by tfull » Tue Dec 22, 2009 12:15 pm

I am trying to use Comet in Tomcat 6.0 with the non-blocking IO protocol for the connector. I have it coded as follows:

<Connector port="8080" protocol="org.apache.coyote.http11.Http11NioProtocol"
connectionTimeout="20000"
address="www.myserver.com"
redirectPort="8443" />


I'm using the IBM JDK V6.0

java version "1.6.0"
Java(TM) SE Runtime Environment (build pmz3160sr3-20081108_01(SR3))
IBM J9 VM (build 2.4, J2RE 1.6.0 IBM J9 2.4 z/OS s390-31 jvmmz3160-20081107_25433 (JIT enabled, AOT enabled)
J9VM - 20081105_025433_bHdSMr
JIT - r9_20081031_1330
GC - 20081027_AB)
JCL - 20081106_01

When trying to connect a browser to port 8080 I get:

ec 22, 2009 10:48:53 AM org.apache.tomcat.util.net.NioEndpoint setSocketOptions
SEVERE:
Throwable occurred: java.net.SocketException: EDC8109I Protocol not available.
at sun.nio.ch.Net.setIntOption0(Native Method)
at sun.nio.ch.Net.setIntOption(Net.java:186)
at sun.nio.ch.SocketChannelImpl$1.setInt(SocketChannelImpl.java:406)
at sun.nio.ch.SocketOptsImpl.setInt(SocketOptsImpl.java:58)
at sun.nio.ch.SocketOptsImpl$IP.typeOfService(SocketOptsImpl.java:261)
at sun.nio.ch.SocketOptsImpl$IP$TCP.typeOfService(SocketOptsImpl.java:280)
at sun.nio.ch.OptionAdaptor.setTrafficClass(OptionAdaptor.java:170)
at sun.nio.ch.SocketAdaptor.setTrafficClass(SocketAdaptor.java:342)
at org.apache.tomcat.util.net.SocketProperties.setProperties(SocketProperties.java:179)
at org.apache.tomcat.util.net.NioEndpoint.setSocketOptions(NioEndpoint.java:1045)
at org.apache.tomcat.util.net.NioEndpoint$Acceptor.run(NioEndpoint.java:1272)
at java.lang.Thread.run(Thread.java:735)


The Apache site indicates the some JDK's have a problem with setting the TrafficClass and it can be bypassed by using the following:

-Djava.net.preferIPv4Stack=true

We've tried this, but have not had any luck. I've verified the -D parm was present in the JVM initiation using MXI in ISPF to look at the process and I can see the parm listed.

Any ideas?

Post Reply