The readiness probe script will fail if /proc/net/tcp6 exists but has no entries whilst /proc/net/tcp does have entries, since IOError exception will not be thrown in this case. Since the exception is not thrown any extant entries in /proc/net/tcp are not considered.