Could not create the Java virtual machine for ANIServer on LMS 3.1

Unanswered Question
Jul 28th, 2009

I have just started getting this message "Error occurred during initialization of VM Could not reserve enough space for object heap Could not create the Java virtual machine" in ANIserver.log. Anybody any idea what might trigger this on a machine (with 8GB RAM and 12 GB Swap) that had previously been happily running LMS 3.1 (CM 5.1.1)?

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (4 ratings)
Joe Clarke Tue, 07/28/2009 - 08:49

Either your server is starved of memory, or the maximum heap size for ANIServer has been changed. Post the output of pdreg -l ANIServer. What platform is LMS running on?

dave.bird Wed, 07/29/2009 - 01:48

The registry has -Xmx1280m and the pdreg output suggests this is unchanged (see attachment). Platform is Windows 2003 Ent SP2. Most recent MS update is 16 July. I tried temporarily halving the parameter to 640m but to no avail. No other applications are running (OpenView NNM is installed but I shut it down while trying to diagnose this problem).

dave.bird Wed, 07/29/2009 - 05:51

Even though the server has 8 GB RAM and a huge page file (as reported in Windows About), the CiscoWorks server info says:

"Percent of memory in use: 30

Physical RAM: 2147483647 (2047M)

Free physical RAM: 2147483647 (2047M)

Paging file: 4294967295 (4095M)

Free Paging file: 4294967295 (4095M)

User bytes of address space: 2147352576 (2047M)

Free User Bytes: 2140999680 (2041M)"

Should CiscoWorks see all 8 GB?

dave.bird Wed, 07/29/2009 - 06:55

I have done some tinkering. I changed the windows registry Args entry to use 1200m and restarted crmdmgtd. ANIServer stays up and now I seem to have my Campus Manager functions back.

Joe Clarke Fri, 08/14/2009 - 08:42

I have since identified the most likely cause of this problem. A recent update to the Sophos anti-virus suite breaks LMS (as well as many other Java-based applications). The problem is a DLL they preload in all executables to protect against buffer overflows. Unfortunately, the only solution at this time is to uninstall Sophos. It is my understanding Sophos is aware of the issue, but I do not know if they have a better solution yet.

I removed the data string in the Appinit_DLLs key in the hkey_local_machine\software\microsoft\windowsnt\currentversion\windows path and rebooted the server and problem was resolved.

One thing I did notice that after I rebooted the server topology services didn't work - I checked the ANIServer process and it was shown as started but was busy.

I tried 5 mins later and it worked.

Sophos informed me that 7.6.11 will be released in 2 weeks which will resovle the problem.

Thanks Jon


Thanks for your help

Joe Clarke Mon, 08/17/2009 - 01:47

Excellent! I've been waiting for someone to confirm when a fix would be available. As for ANI, it can take a while fir it to initialize since it has to read the topology from the database into memory.

Martin Ermel Thu, 09/03/2009 - 03:21

a customer who was seeing this behaviour with ANIUServer just confirmed that Sophos published the latest version (7.6.11) last night. All the servers configured for auto-updating Sophos Antivirus software did get this release automatically. After stopping and starting LMS the problem with ANIServer not starting has gone.


This Discussion