Activation license not picked up in Jenkins

#1

Hi, trying to understand why the activation license is not being picked up.

We have tests that pass with on a machine when run from the command line or in a docker container.

However, when run as a Jenkins build pipeline on the same machine, they fail.

The activation licence is in the file: /var/jenkins_home/workspace/AuctionSoftware-gh02_master/config/objectdb.gh02.conf  and is correct, as confirmed by running the same tests from the command line, both inside and outside docker containers.

For some reason, Jenkins (which runs as docker-in-docker) is not recognizing the activation license.
Is there some way to debug this?

Alternatively is there some docker configuration that needs to be set such that the MAC address doesn't change inside the container?

Basically my question is about ObjectDB activation licenses and Docker.
 

Gradle Test Executor 1 STARTED

mr.controllers.spec.MrProrationSpec STARTED

mr.controllers.spec.MrProrationSpec > max_rate_target_below_first STARTED

mr.controllers.spec.MrProrationSpec > max_rate_target_below_first STANDARD_ERROR
    [2020-09-03 22:03:33 #1 enhancer.agent]
    Enhancer Agent started.

    [2020-09-03 22:03:33 #2 enhancer.agent]
    Starting Enhancer Agent

    [2020-09-03 22:03:33 #3 enhancer.agent]
    JVM: 1.8

    [2020-09-03 22:03:33 #4 store]
    Database '/var/jenkins_home/workspace/AuctionSoftware-gh02_master/db/alloc-test.odb' is opened by 2937@3d5809501517

    [2020-09-03 22:03:33 #5 store] (note: this file definitely has the correct activation license for this machine)
    Configuration path: /var/jenkins_home/workspace/AuctionSoftware-gh02_master/config/objectdb.gh02.conf

    [2020-09-03 22:03:33 #6 type.registry]
    New type groovy.lang.GroovyObject

    [2020-09-03 22:03:33 #7 type.registry]
    New type common.app.Model

    [2020-09-03 22:03:33 #8 type.registry]
    New type groovy.lang.MetaObjectProtocol

    [2020-09-03 22:03:33 #9 type.registry]
    New type groovy.lang.MetaClass

    [2020-09-03 22:03:33 #10 query.compiler]
    <finalPlans>
      <btreePlan 3.6342 18.96/1.18 e(Model) type(Model[all]) />
    </finalPlans>

    [2020-09-03 22:03:33 #11 query.manager]
    Query "DELETE FROM common.app.Model e" => 1 results in 168 milliseconds.

    [2020-09-03 22:03:34 #12 type.registry]
    New type common.model.Site

    [2020-09-03 22:03:34 #13 type.registry]
    New type common.model.UserSession

    [2020-09-03 22:03:34 #14 type.registry]
    New type common.model.Person

    [2020-09-03 22:03:34 #15 type.registry]
    New type common.model.PageView

    [2020-09-03 22:03:34 #16 query.compiler]
    <finalPlans>
      <filterPlan 3.7437 18.99/1.18 (a.deleted=false)>
        <extractPlan 3.7225 18.96/1.18 a(Site)>
          <btreePlan 3.6342 18.96/1.18 a(Site) type(Site[all]) />
        </extractPlan>
      </filterPlan>
    </finalPlans>

    [2020-09-03 22:03:34 #17 query.manager]
    Query "SELECT a FROM common.model.Site a WHERE a.deleted=false" => 0 results in 71 milliseconds.

    [2020-09-03 22:03:34 #18 type.registry]
    New type java.util.ArrayList<java.lang.Object>

    [2020-09-03 22:03:34 #19 type.registry]
    New type java.util.ArrayList<common.model.UserSession>

mr.controllers.spec.MrProrationSpec > max_rate_target_below_first STANDARD_OUT
    created site

mr.controllers.spec.MrProrationSpec > max_rate_target_below_first STANDARD_ERROR
    [2020-09-03 22:03:34 #20 query.compiler]
    <finalPlans>
      <filterPlan 3.7649 19.01/1.18 (a.deleted=false)>
        <filterPlan 3.7437 18.99/1.18 (a.username='a')>
          <extractPlan 3.7225 18.96/1.18 a(Person)>
            <btreePlan 3.6342 18.96/1.18 a(Person) type(Person[all]) />
          </extractPlan>
        </filterPlan>
      </filterPlan>
    </finalPlans>

    [2020-09-03 22:03:34 #27 query.manager]
    Query "SELECT a FROM common.model.Person a WHERE a.deleted=false AND a.username='dummy_3'" => 0 results in 5 milliseconds.

    [2020-09-03 22:03:34 #28 type.registry]
    New type mr.model.MRSettings

    [2020-09-03 22:03:34 #29 type.registry]
    New type mr.model.MRPriceRule

    [2020-09-03 22:03:34 #30 type.registry]
    New type mr.model.MRRound

    [2020-09-03 22:03:34 #31 type.registry]
    New type mr.model.MRBid

    [2020-09-03 22:03:34 #32 type.registry]
    New type common.model.Auction

    [2020-09-03 22:03:34 #33 type.registry]
    New type mr.model.MRAuction

    [2020-09-03 22:03:34 #34 type.registry]
    New type mr.model.MRTrader

    [2020-09-03 22:03:34 #35 type.registry]
    New type common.model.LogEntry

    [2020-09-03 22:03:34 #36 type.registry]
    New type common.model.Message


mr.controllers.spec.MrProrationSpec > max_rate_target_below_first STANDARD_OUT
    []

mr.controllers.spec.MrProrationSpec > max_rate_target_below_first STANDARD_ERROR
    com.objectdb.o.UserException: Too many persistable types (>10) - exceeds evaluation limit

 

#2

Don't yet have an answer, but these thoughts might help.

1) As I understand it, ObjectDB license activation uses a MAC address.
(Given that any machine might have several, it's not clear to me which one is used).

2) Docker containers are assigned MAC addresses as explained for example:

https://stackoverflow.com/questions/42946453/how-does-the-docker-assign-mac-addresses-to-containers

3) Docker containers can have their MAC addresses set manually,

- e.g:  docker run -ti --mac-address 00:00:00:00:00:11 <image name, etc>

4) We're using Jenkins "docker-in-docker" mode, as described in the official docs:
https://www.jenkins.io/doc/book/installing/

So, I'm guessing that that setup changes the MAC address of the Jenkins runner container such that it's no longer recognized by the ObjectDb license.

Does this make sense?

#3

SOLVED - work around

One solution: activate objectdb INSIDE the Jenkins docker container.

ie: copy objectdb.jar into the container, then activate the license and use that activation.

Note: this means you need your containers to be persistent, ie: you can't rm them.

 

Reply