Page 1 of 1

Tomcat 5.5.23 not opening 8005 shutdown port

Posted: Wed Apr 25, 2007 1:53 pm
by tfull
Does anyone know why Java V5 on z/OS 1.8 won't allow me to bind a port to the loopback?. The original problem appeared to be that I couldn't get the shutdown port working, but upon further experimentation, it appears that I can't bind any port to the loopback address when in a java.

Initially, I used the standard server.xml. I could see port 8080 bound to 0.0.0.0 on a netstat display, but no 8005 or 8009.

I then added the address parm in the server.xml for the http connector to use a vipa address, and the netstat showed the listener bound to the vipa address.

I then changed the address parm to point to 127.0.0.1, and I no longer could see the port.

I have an assembler program that I configured to bind a tcp port to the loopback and that seemed to work ok. Therefore, I suspect this is related to Java binding to the loopback. The same config seems to work fine on other platforms.

I have not been able to find any messages indicating a error, or even that the bind failed. The server seems to be running just fine, even though there's no listener.

Any one have an idea what might be blocking the bind?

Posted: Wed Apr 25, 2007 2:20 pm
by tfull
I found the answer. I have 2 stacks running in the z/OS image. Both stacks have a 127.0.0.1 address defined. According to APAR OA19599, the first match found in the host table is used. On my system, that happened to be my secondary stack. Uuugggg. Now for a work around. Maybe I'll see if delaying the second stack startup will help control who's first in the host table.

Posted: Wed Apr 25, 2007 3:28 pm
by tfull
I found a good solution. Use

export _BPXK_SETIBMOPT_TRANSPORT=TCPIP

to set the affinity to a single stack. This should be done in both the startup and shutdown scripts.