Tomcat 5.5.23 not opening 8005 shutdown port

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 5.5.23 not opening 8005 shutdown port

Post 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?
tfull
Posts: 15
Joined: Mon Oct 10, 2005 4:27 pm

Post 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.
tfull
Posts: 15
Joined: Mon Oct 10, 2005 4:27 pm

Post 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.
Post Reply