Glassfish v2 and Kaspersky 7

12 06 2008

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

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 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…



2 responses

9 09 2008

Thank you for this article, I was having problem starting glassfish 2 ur2 from netbeans 6.1 and the problem was indeed Kasperksy 7. After turning Kaspersky off, Glassfish was able to start normally.

11 09 2008

LCW, you’re most welcome – glad to be of help.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: