Data Backup and Recovery

Snap Creator: ERROR: Executable name has embedded quote, split the arguments

uptimenow
8,164 Views

Hi,

With any of the following syntaxes to run a command PRE/POST a Snap Creator 4.0 backup:

PRE_NTAP_CMD01=SERVER: "C:\Program Files\NetApp\Snap_Creator_Framework\scServer4.0.0\snapcreator.exe --server opsmgr01 --port 8888 --profile SAP --config sbx03_snapdrive_protection_manager --action backup --policy daily --debug"

PRE_NTAP_CMD01=SERVER: "C:\Program Files\NetApp\Snap_Creator_Framework\scServer4.0.0\snapcreator.exe" --server opsmgr01--port 8888 --profile SAP --config sbx03_snapdrive_protection_manager --action backup --policy daily --debug

(note the use of the "SERVER:" directive and the placement of the double quotes)

I am encountering errors like this:

[2013-07-02 16:36:24,231] INFO: Executing Pre ntap command  "C:\Program Files\NetApp\Snap_Creator_Framework\scServer4.0.0\snapcreator.exe --server opsmgr01 --port 8888 --profile SAP --config sbx03_snapdrive_protection_manager --action backup --policy daily --debug" on server

38 [2013-07-02 16:36:24,231] ERROR: commands failed with following error

39 [2013-07-02 16:36:24,231] ERROR: Executable name has embedded quote, split the arguments

40 ########## Application not defined. Skipping Unquiesce task ##########

41 ########## Snap Creator Framework 4.0.0 failed ##########

The only syntax that works, is the following:

PRE_NTAP_CMD01=SERVER: C:\Progra~1\NetApp\Snap_Creator_Framework\scServer4.0.0\snapcreator.exe --server opsmgr01--port 8888 --profile SAP --config sbx03_snapdrive_protection_manager --action backup --policy daily --debug

So, it only works by removing the double quotes altogether and using Progra~1 instead of "Program Files".

I am only running into this problem when using the "SERVER:" directive to execute this command on the SC server, a command like this runs fine:

NTAP_SNAPSHOT_CREATE_CMD01="C:\Program Files\NetApp\SnapDrive\sdcli.exe" snap create -s %SNAME-%SNAP_TYPE_%SNAP_TIME -D E -u no

Am I doing something wrong here ? IS this a minor bug ? Ideally I would like to use the full pathname (ie. "Program Files" instead of "Progra~1") and quotes.

Best regards,

Filip Sneppe

1 ACCEPTED SOLUTION

charly
8,164 Views

Hi,

Mine is windows 7 and working fine with above command. I have done some more analysis and its might be because your java version is 7. I am using java 6 which is the supported version.

See the link bellow. This problem got introduced in Java 7

http://www.oracle.com/technetwork/java/javase/7u21-relnotes-1932873.html#jruntime

If possible please confirm the java version.

Command : java -version

regards

Charly

View solution in original post

9 REPLIES 9

ktenzer
8,164 Views

Hi Filip,

Can you try

NTAP_SNAPSHOT_CREATE_CMD01=\"C:\Program Files\NetApp\SnapDrive\sdcli.exe\" snap create -s %SNAME-%SNAP_TYPE_%SNAP_TIME -D E -u no

OR

NTAP_SNAPSHOT_CREATE_CMD01=cmd /c "\"C:\Program Files\NetApp\SnapDrive\sdcli.exe\" snap create -s %SNAME-%SNAP_TYPE_%SNAP_TIME -D E -u no"

Regards,

Keith

uptimenow
8,164 Views

Hi Keith,

Thanks for the fast reply.

Well, the NTAP_SNAPSHOT_CREATE_CMD01 in my question is actually working fine as I quoted it, the problem is related to the use of the " SERVER: " directive in the PRE/POST_NTAP_CMD01 commands. Based on your suggestion, I tried a couple of combinations, but none worked:

This:

PRE_NTAP_CMD01=SERVER: \"C:\Program Files\NetApp\Snap_Creator_Framework\scServer4.0.0\snapcreator.exe\" --server opsmgr01 --port 8888 --profile SAP --config sbx03_snapdrive_protection_manager --action backup --policy daily --debug

Yields:

Executing Pre ntap command  \"C:\Program Files\NetApp\Snap_Creator_Framework\scServer4.0.0\snapcreator.exe\" --server opsmgr01 --port 8888 --profile SAP --config sbx03_snapdrive_protection_manager --action backup --policy daily --debug on server

39 commands failed with following error

40 Executable name has embedded quote, split the arguments

This:

PRE_NTAP_CMD01=SERVER: "\"C:\Program Files\NetApp\Snap_Creator_Framework\scServer4.0.0\snapcreator.exe\" --server opsmgr01 --port 8888 --profile SAP --config sbx03_snapdrive_protection_manager --action backup --policy daily --debug"

Yields:

Executing Pre ntap command  "\"C:\Program Files\NetApp\Snap_Creator_Framework\scServer4.0.0\snapcreator.exe\" --server opsmgr01 --port 8888 --profile SAP --config sbx03_snapdrive_protection_manager --action backup --policy daily --debug" on server

39 commands failed with following error

40 Executable name has embedded quote, split the arguments

41 Task: preNetAppCMD with config:SAP@sbx03_SBX_protection_manager failed

This:

PRE_NTAP_CMD01="SERVER: \"C:\Program Files\NetApp\Snap_Creator_Framework\scServer4.0.0\snapcreator.exe\" --server opsmgr01 --port 8888 --profile SAP --config sbx03_snapdrive_protection_manager --action backup --policy daily --debug"

Yields:

[sbx03:9090 (4.0.0.1)] Executing Pre ntap command ["SERVER: \"C:\Program Files\NetApp\Snap_Creator_Framework\scServer4.0.0\snapcreator.exe\" --server opsmgr01 --port 8888 --profile SAP --config sbx03_snapdrive_protection_manager --action backup --policy daily --debug"] on sbx03

39 [sbx03:9090 (4.0.0.1)] Command ["SERVER: \"C:\Program Files\NetApp\Snap_Creator_Framework\scServer4.0.0\snapcreator.exe\" --server opsmgr01--port 8888 --profile SAP --config sbx03_snapdrive_protection_manager --action backup --policy daily --debug"] failed with return code [256] and message []

40 Task: preNetAppCMD with config:SAP@sbx03_SBX_protection_manager failed

41 ########## Application not defined. Skipping Unquiesce task ##########

42 ########## Snap Creator Framework 4.0.0 failed ##########

Moving on to the use of single quotes 🙂

This:

PRE_NTAP_CMD01=SERVER: 'C:\Program Files\NetApp\Snap_Creator_Framework\scServer4.0.0\snapcreator.exe' --server opsmgr01 --port 8888 --profile SAP --config sbx03_snapdrive_protection_manager --action backup --policy daily --debug

Yields:

Executing Pre ntap command  'C:\Program Files\NetApp\Snap_Creator_Framework\scServer4.0.0\snapcreator.exe' --server opsmgr01 --port 8888 --profile SAP --config sbx03_snapdrive_protection_manager --action backup --policy daily --debug on server

39 commands failed with following error

40 Cannot run program "'C:\Program": CreateProcess error=2, The system cannot find the file specified

41 Task: preNetAppCMD with config:SAP@sbx03_SBX_protection_manager failed

This:

PRE_NTAP_CMD01=SERVER: '"C:\Program Files\NetApp\Snap_Creator_Framework\scServer4.0.0\snapcreator.exe"' --server opsmgr01 --port 8888 --profile SAP --config sbx03_snapdrive_protection_manager --action backup --policy daily --debug

Yields:

Executing Pre ntap command  '"C:\Program Files\NetApp\Snap_Creator_Framework\scServer4.0.0\snapcreator.exe"' --server opsmgr01 --port 8888 --profile SAP --config sbx03_snapdrive_protection_manager --action backup --policy daily --debug on server

39 commands failed with following error

40 Executable name has embedded quote, split the arguments

41 Task: preNetAppCMD with config:SAP@sbx03_SBX_protection_manager failed

This:

PRE_NTAP_CMD01=SERVER: '"C:\Program Files\NetApp\Snap_Creator_Framework\scServer4.0.0\snapcreator.exe" --server opsmgr01 --port 8888 --profile SAP --config sbx03_snapdrive_protection_manager --action backup --policy daily --debug'

Yields:

Executing Pre ntap command  '"C:\Program Files\NetApp\Snap_Creator_Framework\scServer4.0.0\snapcreator.exe" --server opsmgr01 --port 8888 --profile SAP --config sbx03_snapdrive_protection_manager --action backup --policy daily --debug' on server

39 commands failed with following error

40 Executable name has embedded quote, split the arguments

41 Task: preNetAppCMD with config:SAP@sbx03_SBX_protection_manager failed

42 ########## Application not defined. Skipping Unquiesce task ##########

43 ########## Snap Creator Framework 4.0.0 failed ##########

etc.

So, in summary I cannot seem to get double quotes working in combination with the " SERVER: " directive to execute the command on the Snap Creator server.

Best regards,

Filip

uptimenow
8,164 Views

I did a couple of attempts with the "cmd.exe /c" syntax you suggested, but that also didn't work...

charly
8,164 Views

Please try

PRE_NTAP_CMD01=SERVER:"C:\Program Files\NetApp\Snap_Creator_Framework\scServer4.0.0\snapcreator.exe" --server opsmgr01 --port 8888 --profile SAP --config sbx03_snapdrive_protection_manager --action backup --policy daily --debug

or

If you are starting from console, try with

PRE_NTAP_CMD01=SERVER:../snapcreator.exe --server opsmgr01 --port 8888 --profile SAP --config sbx03_snapdrive_protection_manager --action backup --policy daily --debug

uptimenow
8,164 Views

Hi,

Are you saying not to use a space between the SERVER: directive and the rest of the line ?

I put a space in between the : and the command because it was mentioned multiple times here:

https://communities.netapp.com/message/87989

and with a space and the command as you suggested, I still get an error.

I'll give the second command a try, and I guess it'll work - probably with a backslash instead

since we're on Windows, but it'll only work because I want to run the snapcreator.exe command.

What if I want to run another executable via a path that contains a space ?

Best regards,

Filip

charly
8,164 Views

Hi,

For executing external commands

PRE_NTAP_CMD01=SERVER:"C:\sample config\Program Files\abc.bat"

This is working for me. Between what error you are getting newly..?

regards

Charly

uptimenow
8,164 Views

Hi,

Sorry, but it's still not working here. I am still getting an error message. Maybe it is because I am running the SC server on Windows - are you running it on Linux ? Here's a screenshot of my test-config and resulting error from the first PRE_NTAP_CMD01.

Best regards,

Filip

charly
8,165 Views

Hi,

Mine is windows 7 and working fine with above command. I have done some more analysis and its might be because your java version is 7. I am using java 6 which is the supported version.

See the link bellow. This problem got introduced in Java 7

http://www.oracle.com/technetwork/java/javase/7u21-relnotes-1932873.html#jruntime

If possible please confirm the java version.

Command : java -version

regards

Charly

uptimenow
8,164 Views

Hi Charly, yes indeed I did install jre-7u21 on this server because the installation and admin guide for SC 4.0 mentions 1.6 or higher is required, and the example in the guide shows a 1.7 release.

Thank you very much for troubleshooting this. I will - for now - keep using the C:\Progra~1\... notation as a workaround.

I'll leave it up to you guys to either update the installation and administration guide to restrict the supported Java versions to any versions that are not exposed to this change in behavior, or to work around this in future version of Snap Creator.

Again, thank you and Keith very much for the quick follow ups to my problem!

Best regards,

Filip

Public