I am trying to get routes from vsx via API run_script and magic printf "set virtual-system 2\nshow route\nexit\n" | clish syntax mentioned in other topic.
I have several identical 80.30 VSXes and only on one of them I get failed task without any message as below.
(...)
"color" : "black",
"statusCode" : "failed",
"statusDescription" : "",
"taskNotification" : "187591fd-8e15-4710-a1ab-a19724379301",
"gatewayId" : "bc0d8a03-2f7f-469d-87b5-78f2c8b820f6",
"gatewayName" : "",
"transactionId" : 903060984,
"responseMessage" : "",
"responseError" : "",
"meta-info" : {
"validation-state" : "ok",
"last-modify-time" : {
"posix" : 1645086279249,
"iso-8601" : "2022-02-17T08:24+0000"
(...)
"set virtual-system 2\nshow route\nexit\n" | clish -d 3
I get following output:
CliDoOp(cli_db_set): buffer:
volatile:clish:admin:30173 t
CliDoOp: nothing in context->Respv
on working one I get:
CliDoOp(cli_db_set): buffer:
volatile:clish:admin:24441 t
CliDoOp: nothing in context->Respv
CliDoOp(cli_db_iterate_c): buffer:
volatile:mrma:users:user:admin:24439:role
CliDoOp: nothing in context->Respv
fw02:0> CliDoOp(cli_db_get): buffer:
xpand:auditlog
CliDoOp: context->Respv:
p
CliDoOp(cli_db_get): buffer:
xpand:auditlog
CliDoOp: context->Respv:
p
Action Handler
Context:
Name: virtual-system
Argv[] (Argc=3)
Argv[0]: set
Argv[1]: virtual-system
Argv[2]: 2
ValArr[] (ValCnt=1)
ValArr[0]: 2
TransactMode: false
CliDoOp(cli_db_get): buffer:
instance:2
CliDoOp: context->Respv:
t
CliDoOp(cli_db_iterate_c): buffer:
mrma:users:user:admin:role
CliDoOp: context->Respv:
adminRole
CliDoOp(cli_db_get): buffer:
mrma:roles:role:adminRole:vs_access:2
CliDoOp: nothing in context->Respv
CliDoOp(cli_db_get): buffer:
mrma:roles:role:adminRole:vs_access:MRMA_ALL
CliDoOp: context->Respv:
t
Context is set to vsid 2
Result:
Respv[] (Respc=0)
Nxtv[] (Nxtc=0)
CliDoOp(cli_db_iterate_c): buffer:
volatile:mrma:users:user:admin:24439:role
CliDoOp: nothing in context->Respv
fw02:2> CliDoOp(cli_db_get): buffer:
xpand:auditlog
CliDoOp: context->Respv:
p
CliDoOp(cli_db_get): buffer:
xpand:auditlog
CliDoOp: context->Respv:
p
Action Handler
Context:
Name: route
Argv[] (Argc=2)
Argv[0]: show
Argv[1]: route
ValArr[] (ValCnt=0)
TransactMode: false
(...)
from /var/log/messeges for this non-working request I get:
Feb 17 13:21:47 2022 fw01 xpand[20701]: admin localhost t +volatile:clish:admin:4304 t
Feb 17 13:21:48 2022 fw01 clish[4304]: User admin logged in with ReadWrite permission
Feb 17 13:21:48 2022 fw01 clish[4304]: failed to get the terminal settings.
Feb 17 13:21:48 2022 fw01 xpand[20701]: admin localhost t -volatile:clish:admin:4304
Feb 17 13:21:48 2022 fw01 clish[4304]: User admin logged out due to an error from CLI shell
from working one:
Feb 17 13:24:19 2022 fw02 xpand[14575]: admin localhost t +volatile:clish:admin:27639 t
Feb 17 13:24:19 2022 fw02 clish[27639]: User admin logged in with ReadWrite permission
Feb 17 13:24:19 2022 fw02 clish[27639]: cmd in VS0 by admin: Start executing : set virtual-system ... (cmd md5: eecddd39de35863cd473a8baacf2850b)
Feb 17 13:24:19 2022 fw02 clish[27639]: cmd in VS0 by admin: Processing : set virtual-system 2 (cmd md5: eecddd39de35863cd473a8baacf2850b)
Feb 17 13:24:19 2022 fw02 clish[27639]: cmd in VS2 by admin: Start executing : show route (cmd md5: 32edc6d9ebbb96f075ea7f0477b6285c)
Feb 17 13:24:19 2022 fw02 clish[27639]: cmd in VS2 by admin: Processing : show route (cmd md5: 32edc6d9ebbb96f075ea7f0477b6285c)
Feb 17 13:24:19 2022 fw02 clish[27639]: cmd in VS2 by admin: Start executing : sleep 2 (cmd md5: 618ae4070692cea86ce76b1ecfbb784b)
Feb 17 13:24:19 2022 fw02 clish[27639]: cmd in VS2 by admin: Start executing : exit (cmd md5: f24f62eeb789199b9b2e467df3b1876b)
Feb 17 13:24:19 2022 fw02 xpand[14575]: admin localhost t -volatile:clish:admin:27639