Author Topic: Running EA from Jenkins service  (Read 6690 times)

hirbli

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Running EA from Jenkins service
« on: January 10, 2015, 03:17:08 am »
I have a .NET program that uses the EA API to export to HTML:

    var r = new Repository();
    r.OpenFile(eapPath);
    ...

Interactively this works fine
However I want to run this from a Jenkins job.
Our Jenkins runs as a service (on Windows 7) under a regular user account.

The behavior is as follows:
- The .NET program hangs in the OpenFile call.
- An ea.exe is started (with -Embedding) in the session 0 with the same user account.
- The ea.exe takes 134MB memory whereas an interactively started ea.exe -Embedding only takes 104MB.
- It does not make a visible difference, whether I provide a valid or invalid file name to the OpenFile call.

I have found many mentions of similar problems with services.
The most complete instructions were at: http://community.sparxsystems.com/tutorials/556-28running-enterprise-architect-on-a-server
I have followed the instructions as good as possible but it did not make any difference.

Also I found mention of the registry being different in session 0.  However i have verified that Jenkins sees the license entries in the registry.

I have also enabled the "Interactive Services Display" service, to make sure there are no Dialogs.

How do I resolve this problem?
Does EA create any logs, so I can determine if it even sees any COM calls?

Regards,
  Michael Bosch

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Running EA from Jenkins service
« Reply #1 on: January 10, 2015, 03:53:38 am »
I can only tell that EA's logs are near to nil. The only you could find is a log of DB access errors in your %APPDATA% EA folder (dberror.txt). I never tried to run EA as service. Instead I used a spare work station and logged in as a user and used scripts to run EA for whatever was needed to be done.

q.

Aaron B

  • EA Administrator
  • EA User
  • *****
  • Posts: 941
  • Karma: +18/-0
    • View Profile
Re: Running EA from Jenkins service
« Reply #2 on: January 12, 2015, 11:05:58 am »
Unfortunately I don't have any first-hand experience with this type of scenario, but it usually boils down to either a permissions problem, or the EA process has launched without a valid license key.

There was an updated version on the article you referred to on the Community site aimed at Server 2008 r2 or higher which may help.
http://community.sparxsystems.com/tutorials/603-75ea-as-an-unattended-windows-service-on-windows-server-2008r2-and-higher

You mentioned license entries in the registry?  Are you using floating licenses?  I notice that the above guide on the Community site explicitly mentions using "named user licenses", presumably meaning standard (fixed) licenses, not floating.  Not sure if there is a particular reason for this.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13404
  • Karma: +567/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Running EA from Jenkins service
« Reply #3 on: January 12, 2015, 06:05:14 pm »
Michael,

If you aren't able to solve it yourself you can always ask the people from LieberLieber to help you.
See http://www.lieberlieber.us/

Geert

hirbli

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: Running EA from Jenkins service
« Reply #4 on: January 16, 2015, 02:43:52 am »
Thanks for your answers.

@querty:
as you say: nothing is being logged to %appdata% when I open an EAP in EA manually, so nothing to be learned here.
 
@Aaron:
Are you suggesting that it would make a difference if I set up the licensing from within the service or from the interactive user? How so?
And yes, I am using floating licenses.  Any reason they would not work?


Michael

Aaron B

  • EA Administrator
  • EA User
  • *****
  • Posts: 941
  • Karma: +18/-0
    • View Profile
Re: Running EA from Jenkins service
« Reply #5 on: January 16, 2015, 10:48:28 am »
Quote
Are you suggesting that it would make a difference if I set up the licensing from within the service or from the interactive user? How so?
And yes, I am using floating licenses.  Any reason they would not work?
No idea, sorry.  I'm not aware of any reason why floating licenses wouldn't work, but just an observation that the document published by LieberLieber specifically mentioned using "named user licenses", which implies using the standard/fixed license type.  I don't know if there was a particular reason for this or if it was just the way they configured EA in their example.  It's not clear from the document whether or not they found any problems with using floating licenses.

I'm hoping that someone else reading this thread may have more experience with connecting to EA from a Service and might offer some advice.  As Geert suggested, if you are struggling it may be worth trying to contact LieberLieber to see if they can provide any further assistance.