Doing automation of Enterprise Architect in an non-graphical environment (e.g. Windows Service) will cause the following error:
Retrieving the COM class factory for component with CLSID {8667FE5E-6D96-400A-AF0A-15C29F94DFCD} failed due to the following error: 80080005.
The code suggests lack of permission to use the COM interface from within the windows service.
Solution: you must configure DCom (EA.App)
1) Open COM-Components-Window and navigate to DCOM, EA.App
2) right-click EA.App and go to properties
3) go to security tab and customize Launch Permissions
4) add a user permitted to launch EA and grant full permissions
5) in EA.App Properties move on to Identity-Tab, and change user to the one entered before in Launch permissions
( see also: Documentation of software projects )
Man sollte aber bedenken das dies für den Anwendungsfall “Buildserver” gedacht ist! Dort hat man eigentlich nie mehr wie eine Instanz vom Enterprise Architect gleichzeitig in Betrieb!
Auch muss man die Lizenz für diesen User haben und auch eingeben.
I try to start EA on a Windows 2003 server within a Jenkins build job via Java API and via VB.Net API but I do not succeed:
1. The jenkins user has full permissions in EA.APP COM object.
2. The jenkins user is explicitly entered in ‘Identity’ tag.
3. The EA can be started with the jenkins user (EA license is set).
4. Running the EA locally with -Embedding parameter seems to work, but the process must be killed with the task manager.
5. Running the code with the jenkins user logged on works!
6. Running the code from the jenkins build job does not work: the EA process is started (with -Embedding parameter), but it seems to hang. The build job only continues if the EA process is killed manually. Then the build job continues with error “Der Remoteprozeduraufruf ist fehlgeschlagen. (Ausnahme von HRESULT: 0x800706BE) bei EA.IDualRepository.OpenFile(String FilePath)”.
Do you have any idea why the EA cannot open the file but freezes when running from a Jenkins build job? I checked the file path – it is valid.
Any help is appreciated 🙂
The issue is, that the context of the registry in interactive mode and in server mode is different – and so also the license key is not accessible for the server mode. In Server mode the user is typically “Network User”, but you can impersonate using DCOM Config. Here some additional material to read through: EA App x64 (DCOM) and EA on Win2008R2 Whitepaper
Thank you for the reply!
So your guess is that the license key is missing? I entered it in the popup that appeared after I ran this command the first time:
runas /noprofile /user:MYSERVER\jenkins “EA.exe -Embedding”
The Jenkins server is running with user ‘jenkins’, so the license should be set?!
The links you provided do not apply for our case because the server is running 32bit and Windows Server 2003.
Do you have another idea of what could be missing or how I can debug this case?
Hai,
I’m having similar problems.
I try to run an application on a daily basis, unattendedly on a Win2003 R2 server.
The application runs ok when the user is logged on, it does not when the user is logged off. Now I tried to create a service instead of an application, but it’s hard to have a service scheduled to run on a specified time.
Any suggestions on how to proceed?
Thanks at least for the nice tutorials and information sofar.
Hi, services are not build to run at a schedule. They run always. Of course you can habe a sleep to implement something similar. If you want to run/stop a service you can use a task. Net start… as a hint how to start/stop services.
But you can also implement a normal exe to run in unattended mode with no user logged on. Typically you just have to assign the network user to allow to run.
If you need a sample we can provide on time&material base.
BR Peter
Hai Peter,
Thanks for this quick reply.
However, I’m still confused.
I studied your pdf on running an EA service on a windows 2008 server. This explains on how to get a service running accessing EA.
In the answer above, you tell me that I might need an exe to run unattended. The pdf doesn’t explain how to get an exe to access EA unattended.
Or am I missing a link somewhere?
If you could provide me with a white paper on how to get to run an exe unattended with access to EA, I’ll be much obliged.
Best regards,
Jan
Hi Jan,
thank you for your remark – hope that you got the solution you expected.
Best Regards
Peter
Commercial Ad: a solution sample incl. docu is available incl. sources for 500 EUR excl. –> contact sales(et)lieberlieber.com – Topic: “Run EA on Windows Server [here note your Version]”
Thanks for the detailed post.
I try to find EA.App in the DCOM list, but it is missing. EA is installed.
A do get the error 80080005 when trying to access EA repository via Windows Service.
Any ideas?
Thanks in advance!
Enterprise Architect is now available as a remote desktop app. 30-day free trial at https://www.apponfly.com/en/enterprise-architect?KAI access to your app from any device and from any place
Hello,
I followed the description, but program hangs on startup.
A runas seems to give an error on key file: “Error writing key file! Please try again. If the problem persists contact SparxSystems.”
How do I configure the key manager correctly?
Thanks in advance!
You are not working with Floating Licenses, are you?
We do not recommend Floating licenses, as the usually have an expiration date.
Please run EA as LocalSystem first using Microsoft’s psexec.
Once started, enter the license information as usally.
http://blog.lieberlieber.com/2016/06/15/update-ea-as-an-unattended-windows-service-on-windows-server-2008r2-and-higher/
Pls note that this description is kind of outdated.