discovery network.xml import fails / memory

2008-12-04
2013-05-30
  • Florian Konnertz

    hello

    I scanned all those network devices in my company, it took some hours and the network.xml file is complete. It is 6,5M in size.
    Now i get the following error on import:

    Nmap run completed -- 65024 IP addresses (919 hosts up) scanned in 58168 seconds
    Transform discover network to CI.....
    java.lang.reflect.InvocationTargetException
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
            at java.lang.reflect.Method.invoke(Unknown Source)
            at org.onecmdb.utils.classloader.RemoteClassLoader.main(Unknown Source)
    Caused by: java.lang.OutOfMemoryError: Java heap space
    Import discover network to CI.....
    2008-12-04 07:49:28,995 INFO [org.onecmdb.core.utils.xml.XmlParser] - <Load provider url 'file:/usr/local/bin/onecmdb/discovery/onecmdb-network-instances.xml'>
    java.io.FileNotFoundException: /usr/local/bin/onecmdb/discovery/onecmdb-network-instances.xml (No such file or directory)
            at java.io.FileInputStream.open(Native Method)
            at java.io.FileInputStream.<init>(Unknown Source)
            at java.io.FileInputStream.<init>(Unknown Source)
            at sun.net.www.protocol.file.FileURLConnection.connect(Unknown Source)
            at sun.net.www.protocol.file.FileURLConnection.getInputStream(Unknown Source)
            at java.net.URL.openStream(Unknown Source)
            at org.onecmdb.core.utils.xml.XmlParser.loadBeans(Unknown Source)
            at org.onecmdb.core.utils.xml.XmlParser.getBeans(Unknown Source)
            at org.onecmdb.utils.wsdl.OneCMDBImport.getBeans(Unknown Source)
            at org.onecmdb.utils.wsdl.OneCMDBImport.main(Unknown Source)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
            at java.lang.reflect.Method.invoke(Unknown Source)
            at org.onecmdb.utils.classloader.RemoteClassLoader.main(Unknown Source)
    2008-12-04 07:49:28,997 ERROR [org.onecmdb.core.utils.xml.XmlParser] - <Can't open url 'file:/usr/local/bin/onecmdb/discovery/onecmdb-network-instances.xml'>
    ERROR:java.lang.IllegalArgumentException: Can't open inputStream for url file:/usr/local/bin/onecmdb/discovery/onecmdb-network-instances.xml :java.io.FileNotFoundException: /usr/local/bin/onecmdb/discovery/onecmdb-network-instances.xml (No such file or directory)
    java.lang.IllegalArgumentException: Can't open inputStream for url file:/usr/local/bin/onecmdb/discovery/onecmdb-network-instances.xml :java.io.FileNotFoundException: /usr/local/bin/onecmdb/discovery/onecmdb-network-instances.xml (No such file or directory)
            at org.onecmdb.core.utils.xml.XmlParser.loadBeans(Unknown Source)
            at org.onecmdb.core.utils.xml.XmlParser.getBeans(Unknown Source)
            at org.onecmdb.utils.wsdl.OneCMDBImport.getBeans(Unknown Source)
            at org.onecmdb.utils.wsdl.OneCMDBImport.main(Unknown Source)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
            at java.lang.reflect.Method.invoke(Unknown Source)
            at org.onecmdb.utils.classloader.RemoteClassLoader.main(Unknown Source)
    Caused by: java.io.FileNotFoundException: /usr/local/bin/onecmdb/discovery/onecmdb-network-instances.xml (No such file or directory)
            at java.io.FileInputStream.open(Native Method)
            at java.io.FileInputStream.<init>(Unknown Source)
            at java.io.FileInputStream.<init>(Unknown Source)
            at sun.net.www.protocol.file.FileURLConnection.connect(Unknown Source)
            at sun.net.www.protocol.file.FileURLConnection.getInputStream(Unknown Source)
            at java.net.URL.openStream(Unknown Source)
            ... 9 more

    any idea what i could try to troubleshoort this?

    I am looking forward to manage our network with oneCMDB!! Looks quite nice!

    florian

     
    • Niklas Granryd

      Niklas Granryd - 2008-12-04

      Hi,

      Yes, you run into out of memory.
      To fix this issue do the following:
      In the bin directory of the OneCMDB installation you need to edit 
      *.bat or *.sh depending on the system you are using.

      For instance in the bin/transform.bat add the following java option -Xmx1024M, at the bottom of th file.
      Like this:
      "%JAVA_HOME%\bin\java" -Xmx1024M -cp "%ONECMDB_HOME...

      Then it should work.

      If you don't want to discover your entire network again, then comment out the nmap
      in the discovery.bat/.sh script, then only the transform and import will be used.

      Regards,
      /Niklas.

       

Log in to post a comment.