Server Management - Systems Insight Manager
cancel
Showing results for 
Search instead for 
Did you mean: 

mxexport.bat : export doesn't work, CLI error

SOLVED
Go to solution
OlivierV
Trusted Contributor

mxexport.bat : export doesn't work, CLI error

Hello.

I've installed the migration.exe tool and now
I'm using the Mxexport.bat file for exporting the configuration of a Sim 5.3.1 CMS.
I run "mxexport.bat -f e:\export.zip", enter the password when asked to, the script runs and after about one hour displays the following messages :
- HpSim Completed successfully
- Error invoking the CLI.
None zip file is created at the root of E: or in the configdata-export folder.

Hp Sim service is stopped during the export, SQL is version 2005 with SP3. Any idea of what causes this problem ?

Thank you.
15 REPLIES
OlivierV
Trusted Contributor

Re: mxexport.bat : export doesn't work, CLI error

Hello.

I've noticed some points :
- the line 'SET SIMLIB=%SIMPATH%\lib' has 5 trailing spaces. Is it normal ?
- Using procmon, I found that the export tool creates many CSV files in the folder [hpsim]\data\configdata-export\migrationtemp\HPSIM\Tables\HPSIM. Can they be used for importing the datas in the targert CMS ?
- During the export, a zip file is created in [hpsim]\config\migration, named tmpzip.... . It's 28 Mb big at the moment. Can it be used (if not cleared at the end of the export process) for importing the data to the target CSM ?

Thank you.
Change_happens
Honored Contributor

Re: mxexport.bat : export doesn't work, CLI error

i ran it this way:
run command without giving zip file name, like: mxexport -p

this will create zip file under: [hpsim]\data\configdata-export\Products.zip

This products.zip is exported zip file.

remove those spaces from end of SIM-LIB variable that's issue.

+++++++++++++
-HpSim Completed successfully
-Error invoking the CLI.
these both above looks contradictory. you have only hpsim installed or some other HPSIM plugin also?
OlivierV
Trusted Contributor

Re: mxexport.bat : export doesn't work, CLI error

PMP and VMM were installed but I uninstalled them before exporting the datas because the new CMD doesn't use them.
I'm running the export with your suggestion, wait and see ..
pirate_2
Occasional Advisor

Re: mxexport.bat : export doesn't work, CLI error

hi,
you will not be able to use the csv files directly for import. Also the temp zip will not be useful.

Just check if enough free space was available at the sim installed dir.
also try using mxexport without specifying the default file name.

Thanks


Change_happens
Honored Contributor

Re: mxexport.bat : export doesn't work, CLI error

hey Olivier, just remove any xml file related to PMP, VMM which is present in [hpsim]\config\migration
OlivierV
Trusted Contributor

Re: mxexport.bat : export doesn't work, CLI error

Than kyou for your replies.

I removed the XML files for the products that are not installed. This solved the message displayed at the beginning of the export process telling that VMM data won't be exported.

I also ran the mxexport.bat file without the file name, only -p switch.

There is also 33 Gb of free space on the drive where I export the configuration.

But unfortunately, I'm still getting the message "Error while invoking the CLI" after "HPSIM completed successfully". For information, the error message appears about 10 minutes after "HPSIM completed successfully".

There is several .jar files in [hpsim]/config/migration/lib where there is only simmigrate.jar on the new SIM6 server. So I removed the other ones and re-launched the migration batch. Result in one hour.
Change_happens
Honored Contributor

Re: mxexport.bat : export doesn't work, CLI error

we are one step further now. good you deleted those jars.
now best will be enable logs described here below:
http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1425183

upload or check log file that will tell you all.
OlivierV
Trusted Contributor

Re: mxexport.bat : export doesn't work, CLI error

Usefull information, thank you.

I enabled the logging and used "%java%" in mxexport.bat. But the problem is still present, the last entries of the logs are :

03 Jun 2010 14:19:41,192 INFO [HPSIM_DEBUG] LEAVING: exportMigrFiles
03 Jun 2010 14:19:41,192 INFO [HPSIM_DEBUG] Exporting files that have environment variables
03 Jun 2010 14:19:41,192 INFO [HPSIM_DEBUG] LEAVING: exportMigrFiles
03 Jun 2010 14:19:41,192 INFO [HPSIM_DEBUG] Exporting files that have absolute paths
03 Jun 2010 14:19:41,192 INFO [HPSIM_DEBUG] LEAVING: exportMigrFiles
03 Jun 2010 14:19:41,192 INFO [HPSIM_DEBUG] LEAVING: exportFiles
03 Jun 2010 14:19:41,192 INFO [HPSIM_DEBUG] Export of files to recover is successful.
03 Jun 2010 14:19:41,192 INFO [HPSIM_DEBUG] Create Manifest...
03 Jun 2010 14:19:41,192 INFO [HPSIM_DEBUG] ENTERING: writeManifest
03 Jun 2010 14:19:41,223 INFO [HPSIM_DEBUG] LEAVING: writeManifest
03 Jun 2010 14:19:41,223 INFO [HPSIM_DEBUG] Manifest created...
03 Jun 2010 14:19:41,223 INFO [HPSIM_DEBUG] THREAD STATUS of : hpsim_migrate modified to COMPLETED
03 Jun 2010 14:19:41,223 INFO [HPSIM_DEBUG] Counter: true
03 Jun 2010 14:19:41,223 INFO [HPSIM_DEBUG] hpsim completed successfully.
HPSIM completed successfully.
03 Jun 2010 14:19:41,223 INFO [HPSIM_DEBUG] Threads complete execution
03 Jun 2010 14:19:41,223 INFO [HPSIM_DEBUG] Compressing hpsim data from E:\Program Files\HP\Systems
Insight Manager\data\configdata-export\migrationtemp\hpsim to E:\Program Files\HP\Systems Insight M
anager\data\configdata-export\migrationtemp\hpsim1.zip
Error while invoking the CLI

So the error occurs immediately after the process started compressing the file. I don't know if it has succeeded.
I'm going to check the rights on these folders
Change_happens
Honored Contributor

Re: mxexport.bat : export doesn't work, CLI error

one more good catch about java variable. how can they create such a batch file. :)

are u able to see "hpsim1.zip" at that point of time @ specified place?
they have -Xmx512m inside batch. try increasing this value if its memory issue. just a guess.
OlivierV
Trusted Contributor

Re: mxexport.bat : export doesn't work, CLI error

Yes, I saw the zip file. I have copied it to an other place before the end of the script because at the end it deletes all the content of the folder configdata-export.
I tried to import it but the process failed.

I'm going to increase the memory in the command line. I did it a few days ago but it has generated some errors tha tdisappeared when I removed the option. I will try 512, it was 1024.

Thank you.
Change_happens
Honored Contributor
Solution

Re: mxexport.bat : export doesn't work, CLI error

curious to know what happened? i will see tomorrow. good night
OlivierV
Trusted Contributor

Re: mxexport.bat : export doesn't work, CLI error

You're the winner.

Using -Xmx512m solved the problem. I can now understand what hapenned.

In the HP document about migrating the CMS, the command line (page 11) uses â Xmx1024. The above line uses Xmx512m. I stupidly copied and pasted the line in mxexport.bat but without the trailing 'm' (I admit that my knowledge of Java is near null), I think java understood to use 1024 bytes of memory instead of 1024 Mb, and crashed. I decided not to use this switch then.

For information, during the export, Java.exe used a maximum of 130 Mb of ram and it took about 3 hours for exporting the base with 800+ devices. The result file size makes 75 Mb.

Thank you very, very much for your time and replies.

Best regards.
pirate_2
Occasional Advisor

Re: mxexport.bat : export doesn't work, CLI error

cheers :)
glad your problem was solved
Change_happens
Honored Contributor

Re: mxexport.bat : export doesn't work, CLI error

Cool. good news and you have discovered one more issue this was with HP document. :)
OlivierV
Trusted Contributor

Re: mxexport.bat : export doesn't work, CLI error

erroneous parameter in the java command line, see comment above.