BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
pcapazzi
Pyrite | Level 9

I'm trying to run a script file and I get java error messages:

 

The contents of the script file (one_test.sh):

mabatch.sh -u peter -p $sas_pw -x "Business Context" -d camp -v -- GBADZCKG1ND123456

mabatch.sh -u peter -p $sas_pw -x "Business Context" -d camp -v -- GBADZCKG1ND123456

 

The above lines run fine when typed/pasted directly into the command line. But fail when in a shell script. 

 

I think the two dashes are interpreted by bash to do something else and it's dropping the campaign IDs. I tried -q to specify there are no parameters with spaces or they are otherwise encapsulated in quotes. 

 

I get the following error message:

 

2018-02-27 12:13:11,870: Connected to node SASCI_1_uschsasdev02.na.odcorp.net
ERROR 2018-02-27 12:13:11,871: EXCEPTION
ERROR com.sas.analytics.crm.ma.launcher.MALauncher:launch()
ERROR
com.sas.analytics.crm.error.client.ApplicationException
at com.sas.analytics.crm.ma.launcher.wrapper.LauncherContext.logException(LauncherContext.java:93)
at com.sas.analytics.crm.ma.launcher.wrapper.LauncherContext.log(LauncherContext.java:85)
at com.sas.analytics.crm.ma.launcher.log.Log.throwing(Log.java:218)
at com.sas.analytics.crm.ma.launcher.log.Log.throwing(Log.java:200)
at com.sas.analytics.crm.ma.launcher.MALauncher.launch(MALauncher.java:605)
at com.sas.analytics.crm.ma.launcher.MALauncher.wrappedMain(MALauncher.java:186)
at com.sas.analytics.crm.ma.launcher.wrapper.WrappedLaunchCommand.run(WrappedLaunchCommand.java:42)
at com.sas.analytics.crm.task.ejb.ClearedThreadLocalRunnable.run(ClearedThreadLocalRunnable.java:17)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: com.sas.analytics.crm.ma.launcher.client.LaunchException: Invalid directive: null
at com.sas.analytics.crm.ma.launcher.MALauncher.validateDirective(MALauncher.java:810)
at com.sas.analytics.crm.ma.launcher.MALauncher.launch(MALauncher.java:256)
... 6 more
ERROR 11 Invalid command directive
ERROR Invalid directive: null
ERROR
com.sas.analytics.crm.error.client.ApplicationException
at com.sas.analytics.crm.ma.launcher.wrapper.LauncherContext.logException(LauncherContext.java:93)
at com.sas.analytics.crm.ma.launcher.wrapper.LauncherContext.log(LauncherContext.java:85)
at com.sas.analytics.crm.ma.launcher.log.Log.error(Log.java:111)
at com.sas.analytics.crm.ma.launcher.MALauncher.problem(MALauncher.java:642)
at com.sas.analytics.crm.ma.launcher.MALauncher.launch(MALauncher.java:607)
at com.sas.analytics.crm.ma.launcher.MALauncher.wrappedMain(MALauncher.java:186)
at com.sas.analytics.crm.ma.launcher.wrapper.WrappedLaunchCommand.run(WrappedLaunchCommand.java:42)
at com.sas.analytics.crm.task.ejb.ClearedThreadLocalRunnable.run(ClearedThreadLocalRunnable.java:17)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: com.sas.analytics.crm.ma.launcher.client.LaunchException: Invalid directive: null
at com.sas.analytics.crm.ma.launcher.MALauncher.validateDirective(MALauncher.java:810)
at com.sas.analytics.crm.ma.launcher.MALauncher.launch(MALauncher.java:256)
... 6 more
2018-02-27 12:13:11,871: FINISHED

1 ACCEPTED SOLUTION

Accepted Solutions
Dmitry_Alergant
Pyrite | Level 9

Obviously, that has something to do with the say your shell script is written.    Double dash command prefixes are incredibly common in Linux world, so I'd be surprised if that's an issue... Another guess is that may have to do with quotes from a business context name.

 

What I'd do for troubleshooting is to modify the mabatch.sh script to make it log every command line argument, one after another. This may help you understand what is going on.

 

 for i in $*; do 
   echo $i >> ~/mabatch_debug.log
 done

 

Good luck!

 

-------
Dmitriy Alergant, Tier One Analytics

View solution in original post

6 REPLIES 6
Dmitry_Alergant
Pyrite | Level 9

Obviously, that has something to do with the say your shell script is written.    Double dash command prefixes are incredibly common in Linux world, so I'd be surprised if that's an issue... Another guess is that may have to do with quotes from a business context name.

 

What I'd do for troubleshooting is to modify the mabatch.sh script to make it log every command line argument, one after another. This may help you understand what is going on.

 

 for i in $*; do 
   echo $i >> ~/mabatch_debug.log
 done

 

Good luck!

 

-------
Dmitriy Alergant, Tier One Analytics
pcapazzi
Pyrite | Level 9

Thanks Dmitry. I removed all parameters and started adding them in the script. It wound up being the order of the parameters. 

 

This worked:

mabatch.sh -d camp -u peter -p $sas_pw -x "Business Context" -q -v -- DBDBSE5MX3ABCEFGH

 

That's a good tip you provided as I was trying to figure out a way to see what exactly was being passed. Thanks. 

 

 

AntonGusev
Calcite | Level 5

Hello, everyone!

 

I've got similar question about mabatch.sh's parameters.

Does anybody know where I can get mabatch's documentation/specification? I want to know exact meaning of each parameter.

 

For example, when scheduled campaign fails, I get notification containing string like this:

"/PATH_TO_MaLauncher/mabatch.sh" -u "sas_scheduler_user@saspw" -g 937b989b009b98f647a79d13a8d5cd31 -x "Business Context 1" -d camp -e -v -- GCFAYOA0V3FEQ20N

 

I understand purpose of parameters -u , -x . But what is purpose of parameters -g , -d, -e, -v?

What do alphanumeric sequences 937b989b009b98f647a79d13a8d5cd31 and GCFAYOA0V3FEQ20N mean?

pcapazzi
Pyrite | Level 9

You can read about it in the Marketing Automation Administrator Guide. You can also execute the mabatch.sh with no parameters and it will give you some information about the parameters.

 

The -d tells the script what it is you want to do. I have only used it for camp(aigns).  

-d camp | campaigngroup | comm | file | imap

specifies a directive

 

The GCFAYOA0V3FEQ20N is the Campaign ID (not CAMP Code) that you see in the CIS Properties pane of a campaign diagram.

 

-the v will provide you with status messages. Normally it the script will only provide error messages. If this option is included you will see messages such as Started, Login success,  Executing campaign, Finished. I use it to track start and finished times for performance tests.

 

I do not see a -e in the guide I'm looking at nor do I see it in the help that the mabatch.sh offers (just run it with no parameters). I suppose that may be deprecated... just refer to the MA Admin Guide for you version.

 

-g This is to execute a campaign that has been scheduled. How you would get the ID before it ever executes I'm not certain. I would look at the SAS Admin Console for that I suppose. But if it has executed and you're using the LSF Scheduler you can get it from the details in the Flow Manager.

 

"–g

assigns a user ID to identify the campaign. There might be a policy at your site to require passwords to be changed frequently. When the password is changed for the user who has scheduled an execution, the campaign continues to execute as scheduled. Each time a campaign is sent to the scheduler, a new ID is generated to identify the campaign."

 

I hope that helps.

 

AntonGusev
Calcite | Level 5

pcapazzi! Thank you so much! I searched MA Administration Guide for list of parameters for mabatch.sh and didn't notice that that script calls sasmalauncher and passes parameters to it 😞 Thank you one more time!

JamesAnderson
SAS Employee

HI,

 

The -e option is very old (as far back as version 5.4 it was already being deprecated), and it was used to signify that the password being provided was encrypted. It used to be ignored by the 5.4 launcher, but as it is no longer mentioned in the documentation I would avoid including it at all.

 

Regards
James

 

How to improve email deliverability

SAS' Peter Ansbacher shows you how to use the dashboard in SAS Customer Intelligence 360 for better results.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 6 replies
  • 2072 views
  • 2 likes
  • 4 in conversation