Skip to main content

Error code 10024: Web license service only available for container environments

Awaiting user input

Comments

7 comments

  • Jaromił Najman
    Gurobi Staff Gurobi Staff

    Hi Emil,

    Do you use Docker Desktop? Could you tell which software version you use?

    Best regards,
    Jaromił

    0
  • Giovanni Montanari
    Gurobi-versary
    First Comment
    First Question

    Hi Jaromił,

    I'm running into the same problem. I'm loading the license file when running the container:

    docker run -it --rm -p 8888:8888 -v /Users/giovanni/Desktop/gurobi-wls-license/gurobi.lic:/opt/gurobi/gurobi.lic:ro container_name

    but I'm getting the same error message: "Web license service only available for container environments".

    I noticed that in the web license manager it seems like there are no active containers, whereas in the Docker Desktop app the container is clearly running.

    I'm using Docker Desktop 4.3.2 (72729).

    Thanks in advance for your help, much appreciated.

    Best regards, Giovanni

     

     

    0
  • Armin Buckhorst
    Gurobi-versary
    First Comment
    First Question

    Hi Everyone,

    i found a solution for my case. Maybe i was actually facing the very same problem. What was additionally confusing was, that when i use it docker on one of my linux machines, everything is fine. The docker and the license is working. When executing it on a different machine i get this mistake.

     

    ```

    ***********   START: lmas_heuristic_first_step   ***********
    Traceback (most recent call last):
      File "compare.py", line 259, in <module>
        heuristic_output, r_dec_counts, heuristic_gurobi_model = lmas_heuristic_optimize(G_LMAS_OPTIONS, G_LMAS_DATA, heuristic_output_path, text_output=True)
      File "/models/lmas_simple_heuristic/scripts/lmas_simple_heuristics/model_caller.py", line 95, in lmas_heuristic_optimize
        l_res_station_set, l_all_operations, l_unpossible_operations, r_lmas_stationcount_considered, r_station_count_used, r_operations_count_considered, r_operations_count_used  = lmas_heuristic_first_step(G_LMAS_DATA, G_LMAS_OPTIONS)
      File "/models/lmas_simple_heuristic/scripts/lmas_simple_heuristics/heuristic_model.py", line 326, in lmas_heuristic_first_step
        m = Model('Matching_Heuristic')
      File "src/gurobipy/env.pxi", line 67, in gurobipy.Env.__init__
      File "src/gurobipy/gurobi.pxi", line 32, in gurobipy.gurobi._getdefaultenv
      File "src/gurobipy/env.pxi", line 67, in gurobipy.Env.__init__
    gurobipy.GurobiError: Web license service only available for container environments

    ```

    The difference in my case was: on the one machine I had Gurobi 9.1.2 on the other 9.5.1.

    In the Dockerfile i needed to make sure the verison locally installed and used in the docker where the same. It doesn't make any particular sense for me.-

    ```

    FROM gurobi/python-example:9.5.1

    ARG GRB_VERSION=9.5.1

    LABEL vendor="Gurobi"
    LABEL version=${GRB_VERSION}

    ```

    or

    ```

    FROM gurobi/python-example:9.1.2

    ARG GRB_VERSION=9.1.2

    LABEL vendor="Gurobi"
    LABEL version=${GRB_VERSION}

    ```

    Maybe that helps someone else, too.

    Best regards

    Armin

     

    0
  • Efthymia Kostopoulou
    Gurobi-versary
    Conversationalist
    First Question

    Hi all,

    Which would be the script to set the WLSAccessID, WLSSecret and LicenseID in Anaconda?

    Thank you,

    Fay

    0
  • Jaromił Najman
    Gurobi Staff Gurobi Staff

    Hi Fay,

    You should set the 3 parameters via the Env constructor in Python.

    Best regards, 
    Jaromił

    0
  • Efthymia Kostopoulou
    Gurobi-versary
    Conversationalist
    First Question

    Hello Jaromil,

    I am running the following on Anaconda (Jupyter) but it still asks for parameters.

    import gurobipy as gp
    with gp.Env(empty=True) as env:
        env.setParam("WLSAccessID", "xxx........")
        env.setParam("WLSSecret", "xxxx........")
        env.setParam("LicenseID", "999999")
        env.start()
        with gp.Model(env=env) as model:
            model.optimize()

    Thank you,

    Fay

    0
  • Jaromił Najman
    Gurobi Staff Gurobi Staff

    Hi Fay,

    What is the exact error message you get?

    A WLS license is meant to be used in a containerized environment such as a docker. Are you running your code inside a containerized environment?

    Best regards, 
    Jaromił

    0

Please sign in to leave a comment.