Skip to main content

Rundeck - winrm - job ok on local server but ko when launched via rundeck

  • March 1, 2024
  • 2 replies
  • 56 views

Hi,
I have a python script that opens Excel files to update them with the Xlsx.Workbooks.Open command. When I run the script locally on the server with the ā€œrundeckā€ account, the script works correctly.
When I run it via rundeck and pywinrm using the same user ā€œrundeckā€ the Xlsx.Workbooks.Open command is in error :
error \\data\\excel\\Suivi_sav.xlsx\\xa0". Several reasons are possible\\xa0:\\n\\n• The file name or path does not exist. \\n• This file is currently used by another program.\\n• The workbook you are trying to save has the same name as a currently open workbook.", ā€˜xlmain11.chm’, 0, -2146827284), None).

I have the impression that when I launch via rundeck - pywinrm the user ā€œrundeckā€ does not have the same rights as when I launch locally while being connected with the user ā€œrundeckā€
Do you have any idea about this problem?

THANKS.

Pat

2 replies

  • March 1, 2024

Hi Pattrick,

Could you double-check the file path in your Rundeck job? You can test it from the Rundeck ā€œCommandsā€ page (and pointing to your Windows box).

Also, make sure you’ve got the right user configured in your Windows Node Definition. Same, you can verify it via the ā€œwhoamiā€ command on the Rundeck Command page.

Regards.


  • Author
  • PagerDuty Team šŸ“Ÿ
  • March 1, 2024

Hi Reiner,

Thank you for this feedback, I rechecked the file path in the job rundeck everything is ok at this level. After several searches I found that by modifying the DCOM configuration on the server for Microsoft Excel Application at the identity level and putting the user interactive it works.

Best regards

Pat