I’ve just encountered a problem starting Glassfish V2 on an MS Windows PC, and it seems to be due to Glassfish’s JMX port being blocked by Kaspersky 7 Anti-Virus for some reason. Glassfish gives the appearance of starting successfully, but then after a while it terminates with exceptions due to a time-out whilst trying to connect to port 8686 for JMX/RMI.
There’s nothing in the Kaspersky logs to indicate that anything has been detected/blocked, but the problem goes away if Kaspersky isn’t running during the start-up. It’s also ok if Kaspersky is started after Glassfish is fully up and running – it only fails if Kaspersky is running during the start-up.
This might be something peculiar to my own set-up on this particular PC, but it sounds awfully similar to what’s being discussed in “Does Eclipse Europa support GlassFish v2 UR2” on java.net.
So in case this helps anyone else, here’s what I’ve found, and how I’ve got around it.
The problem seems to be due to Kaspersky “traffic monitoring” of port 8686, and can be fixed by setting Kaspersky to not monitor that particular port. Unfortunately, there doesn’t seem to be any way to make Kaspersky monitor all ports except specific ones. The only way I’ve found so far to keep the monitoring in general but exclude port 8686 is to turn off “monitor all ports” and make sure that 8686 isn’t in the list of monitored ports. You’re then monitoring only those ports that are explicitly specified. This weakens the protection, but is probably acceptable if you’re behind a suitable firewall or otherwise have a known, limited set of ports that are potentially accessible.
I’ve tried playing around with other parts of the Kaspersky “web anti-virus” settings (e.g. weaken/disable “heuristic” scan, exclude localhost URLs), but I haven’t yet found anything else that fixes the problem. There might be things you can configure on Glassfish that would avoid the problem, but without any indication from Kaspersky of what it thinks it’s blocking (and why) there isn’t much to go on.
For info, this is with Glassfish V2 U1 or U2 running on Java SE 6 update 6, and Kaspersky 22.214.171.1245. I didn’t previously have any problems with Glassfish V2 U1 whilst using Kaspersky 6, so I suspect this is specific to Kaspersky 7. Unless anyone knows better…