Reputation: 31
I'm trying to run automatic test within CANoe from Jenkins. I wrote python scripts using CANoe COM interface. It can work normally with command line in the local computer(configured as the Jenkins slave). But when I tried to call the python scripts from Jenkins, I got the error as below.
Traceback (most recent call last):
File "automatic_test.py", line 165, in <module>
app = CanoeSync()
File "automatic_test.py", line 23, in __init__
app = win32com.client.gencache.EnsureDispatch("CANoe.Application")
File "C:\Python27\lib\site-packages\win32com\client\gencache.py", line 527, in EnsureDispatch
disp = win32com.client.Dispatch(prog_id)
File "C:\Python27\lib\site-packages\win32com\client\__init__.py", line 95, in Dispatch
dispatch, userName = dynamic._GetGoodDispatchAndUserName(dispatch,userName,clsctx)
File "C:\Python27\lib\site-packages\win32com\client\dynamic.py", line 114, in _GetGoodDispatchAndUserName
return (_GetGoodDispatch(IDispatch, clsctx), userName)
File "C:\Python27\lib\site-packages\win32com\client\dynamic.py", line 91, in _GetGoodDispatch
IDispatch = pythoncom.CoCreateInstance(IDispatch, None, clsctx, pythoncom.IID_IDispatch)
pywintypes.com_error: (-2147024891, 'Access is denied.', None, None)
Other information: CANoe version: 11.0SP2; Python version: 2.7;. Jenkins account is also the admin account for the slave computer. The python scripts work normally with the Jenkins account locally.
Thanks a lot for any help.
Upvotes: 1
Views: 2528
Reputation: 1
For me, the issue was not with respect to access but the following error :
"The server process could not be started because the configured identity is incorrect. Check the username and password.', None, None"
This was resolved by changing the identity from interactive user to launching user of the Vector Canoe application. i.e. In Windows search, go to Component Services Then navigate to Component Services -> Computers -> My Computer -> DCOM Config -> Vector CANoe Application Go to its properties and under Identity tab, change "Which user account do you want to use to run this application" from The interactive user to The launching user. Hope this helps the people who are stuck with the error mentioned above. Cheers.
Upvotes: 0
Reputation: 459
Am facing the same problem when am trying to launch CANoe application from Jenkins even after following the steps mentioned in Win32com codes not working on IIS. If I execute script from CMD it works fine but problem is observed on launching from jenkins with my user ID Are there any specific settings to be done in CANoe as well
File "C:\Program Files (x86)\Python279\lib\site-packages\win32com\client\dynamic.py", line 91, in _GetGoodDispatch
IDispatch = pythoncom.CoCreateInstance(IDispatch, None, clsctx, pythoncom.IID_IDispatch)
pywintypes.com_error: (-2147467238, 'The server process could not be started because the configured identity is incorrect. Check the username and password.', None, None)
Upvotes: 1
Reputation: 31
Finally, the issue was resolved! It's a permission issue. Please try the solution from Win32com codes not working on IIS and remember to add your Jenkins user name and set full permission.
Upvotes: 2