Hi,
I am working with RRM 6.1 / IRM 3.6 and I would like to create a job flow instance in batch using SAS Enterprise Guide.
Therefore I run the following code:
%include "&fa./source/sas/ucmacros/*.sas";
%irm_setup(source_path = &irm_home./, fa_id = &fa_id.);
%let irm_host=http://myserver.net;
%let irm_port=7980;
%let instance_Key=;
%irm_rest_create_jobflow_instance(
instance_name = myInstance
, description = myInstance-Description
, entityID = myEntity
, entityRoleKey = 2 /* 1=solo, 2=group */
, category = regulatory_risk_management
, jobflowFile = rrm_capital_calculation.bpmn
, baseDate = &my_month.
, configSetId = crd4
, federatedAreaID = &fa_id.
, host = &irm_host.
, port = &irm_port.
, debug = false
, outvar = instance_Key
);
%put instance_Key = &instance_Key.;
That works perfectly fine:
The instance will be created and started automatically and in the macro variable &instance_Key I get the instance ID of the new instance.
Then I would like to share the instance by running the following macro call:
%irm_rest_manage_instance (instanceKey = &instance_Key.
, host = &irm_host.
, port = &irm_port.
, outds = status_share
, action = Share
);
Unfortunately that does not work as expected.
When executing the code, an error occurs and the script aborts:
...
NOTE: PROCEDURE HTTP used (Total process time):
4 The SAS System Monday, June 8, 2020 08:32:00 AM
real time 0.42 seconds
cpu time 0.00 seconds
NOTE: restartLUA was set to Y
NOTE: _RISKEXEC_RC_ (before lua call) is -2
NOTE: TKLua terminated.
NOTE: Previous Lua state destroyed.
NOTE: Lua initialized.
1 The SAS System Monday, June 8, 2020 08:38:00 AM
ERROR: module 'entry_point_caller' not found:
no field package.preload['entry_point_caller']
no file '/opt/sas/config/Lev1/AppData/SASIRM//rrm.v201909/source/lua/entry_point_caller.lua'
no file '/opt/sas/config/Lev1/AppData/SASIRM//rrm.v201909/source/lua/entry_point_caller.luc'
no file '/usr/local/lib/lua/5.2/entry_point_caller.so'
no file '/usr/local/lib/lua/5.2/loadall.so'
no file './entry_point_caller.so'
stack traceback:
[C]: in function '_G.require'
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE LUA used (Total process time):
real time 0.00 seconds
cpu time 0.01 seconds
NOTE: _RISKEXEC_RC_ (after lua call) is -2
ERROR: Calling Lua functions "irmRestManageInstance" in module "sas.risk.irm.irm_rest_parser".
ERROR: A system fatal error has occurred. No further processing will be executed.
>>>--------------------------------------------------------------------------
>>> Abending at macro call stack.
>>> irm_rest_manage_instance-> rsk_call_riskexec-> irmfw_terminate
>>>--------------------------------------------------------------------------
ERROR: Execution canceled by an %ABORT CANCEL statement.
NOTE: The SAS System stopped processing due to receiving a CANCEL request.
What is strange - nevertheless the error message, the instance will get shared.
So the problem is actually just the error message (and the abortion of the script).
Does anybody know - what is the reason for that error message and what do I do wrong?
And how can I do to avoid the above error message?
Thanks in advance!
Best regards,
Helmut
Yep, that's for sure the reason. I also faced such issues and just then explicitely used the macros which were shipped with IRM 3.6 instead of the ones from the RRM content package.
Possible reasons for failure
If none of the above reasons are applicable, I will suggest that you wait for the instance to finish execution or at least let it run for some time before calling the manage-instance REST API call.
I have not worked much in the IRM REST API Lua code so the above are the only points that I can suggest for you to look into. Hope it helps.
Regards,
Himanshu
Dear Himanshu,
Thank you for your feedback.
The instance has some code running from personal FA. Such instances cannot be shared.
- This does not seem to be the reason since the log shows a registered FA.
You are right - that is not the case. The FA I am using is not a personal FA.
The FA path registered in SMC has some issue.
- The log shows double forward slash (//). Please verify that this does not pose problem.
I fixed the path specification so that the double quote disappears, but unfortunately still the same problem occurs:
...
ERROR: module 'entry_point_caller' not found:
no field package.preload['entry_point_caller']
no file '/opt/sas/config/Lev1/AppData/SASIRM/rrm.v201909/source/lua/entry_point_caller.lua'
no file '/opt/sas/config/Lev1/AppData/SASIRM/rrm.v201909/source/lua/entry_point_caller.luc' no file '/usr/local/lib/lua/5.2/entry_point_caller.so'
no file '/usr/local/lib/lua/5.2/loadall.so'
no file './entry_point_caller.so'
...
Some authentication issue while getting ticket.
- The complete log is not shown. Please see to it that the result of PROC HTTP does not show any problem.
Unfortunately the log of PROC HTTP does not show any problem.
Here is the complete log:
23 %irm_rest_manage_instance (instanceKey = &instance_Key.
24 , host = &irm_host.
25 , port = &irm_port.
26 , outds = status_share
27 , action = Share
28 );NOTE: The file IN is:
Filename=/opt/sas/rrm/work/SAS_work21AF0000CCB0_xlsast120/#LN00070,
Owner Name=sassrv,Group Name=sassrv,
Access Permission=-rw-r--r--,
Last Modified=09Jun2020:08:26:32
NOTE: 1 record was written to the file IN.
The minimum record length was 14.
The maximum record length was 14.
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
NOTE: PROCEDURE HTTP used (Total process time):
real time 0.33 seconds
cpu time 0.00 seconds
NOTE: restartLUA was set to Y
NOTE: _RISKEXEC_RC_ (before lua call) is -2
NOTE: TKLua terminated.
NOTE: Previous Lua state destroyed.
NOTE: Lua initialized.
1 The SAS System Tuesday, June 9, 2020 08:26:00 AM
ERROR: module 'entry_point_caller' not found:
no field package.preload['entry_point_caller']
no file '/opt/sas/config/Lev1/AppData/SASIRM/rrm.v201909/source/lua/entry_point_caller.lua'
no file '/opt/sas/config/Lev1/AppData/SASIRM/rrm.v201909/source/lua/entry_point_caller.luc'
no file '/usr/local/lib/lua/5.2/entry_point_caller.so'
no file '/usr/local/lib/lua/5.2/loadall.so'
no file './entry_point_caller.so'
stack traceback:
[C]: in function 'require'
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE LUA used (Total process time):
2 The SAS System Tuesday, June 9, 2020 08:01:00 AM
real time 0.00 seconds
cpu time 0.01 seconds
NOTE: _RISKEXEC_RC_ (after lua call) is -2
ERROR: Calling Lua functions "irmRestManageInstance" in module "sas.risk.irm.irm_rest_parser".
ERROR: A system fatal error has occurred. No further processing will be executed.
>>>--------------------------------------------------------------------------
>>> Abending at macro call stack.
>>> irm_rest_manage_instance-> rsk_call_riskexec-> irmfw_terminate
>>>--------------------------------------------------------------------------
ERROR: Execution canceled by an %ABORT CANCEL statement.
NOTE: The SAS System stopped processing due to receiving a CANCEL request.
If none of the above reasons are applicable, I will suggest that you wait for the instance to finish execution or at least let it run for some time before calling the manage-instance REST API call.
Unfortunately my problem is independent of how long the instance is/was running.
The problem occurs also for an instance that has been successfully calculated.
As I already mentioned before - the weired thing is, that the sharing works.
After running my code, the instance is shared in SAS IRM.
But nevertheless I get an error an the SAS script aborts...
And I don't know how to avoid just the error message and the abortion of the script....
Thanks & best regards,
Helmut
Thanks, Helmut.
I believe that the IRM REST API scripts delivered with RRM content package that you are using might be old or some part of it might be incompatible with IRM 3.6.
IRM 3.6 comes with latest REST API scripts. You have the option to use them or you can raise a ticket on support site if you want to dig it further.
Yep, that's for sure the reason. I also faced such issues and just then explicitely used the macros which were shipped with IRM 3.6 instead of the ones from the RRM content package.
Chartis names SAS a leader in both Model Risk Governance and Model Validation