Skip to main content

No user name & "User name mismatch" error

Answered

Comments

14 comments

  • Matthias Miltenberger
    Gurobi Staff Gurobi Staff

    Hi,

    Your user name is not detected. What operating system are you using? It looks like a Linux/UNIX but what's uncommon is that your home directory is in another subdirectory "cl". Can you please run "whoami" and "uname -a" and post the results here?

    Thanks,
    Matthias

    0
  • Takayoshi Shibahara
    Gurobi-versary
    First Comment
    First Question

    Thank you for the fast reply.

     

    I'm running on Ubuntu 16.04.6 LTS (GNU/Linux 4.4.0-165-generic x86_64).

    Yes, my home directory is "/home/cl/takayoshi-s".

    (Subdirectories under "/home" is shared between multiple servers by NFS.)

     

    ---- Result of "whoami" and "uname -a" -----

    takayoshi-s@pine42:~$ whoami

    takayoshi-s

    takayoshi-s@pine42:~$ uname -a

    Linux pine42.naist.jp 4.4.0-165-generic #193-Ubuntu SMP Tue Sep 17 17:42:52 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

    ---------

     

    Takayoshi Shibahara

    0
  • Matthias Miltenberger
    Gurobi Staff Gurobi Staff

    Hi Takayoshi,

    This is all looking fine so far. Can you please post the output of grbprobe as well?

    Thanks,
    Matthias

    0
  • Takayoshi Shibahara
    Gurobi-versary
    First Comment
    First Question

    Hi Matthias, 

    This is the output of grbprobe.

    ----

    takayoshi-s@pine42:~/venv/GiNZA/bin$ grbprobe

    info  : grbprobe version 9.0.0, build v9.0.0rc2

    HOSTNAME=pine42.naist.jp

    HOSTID=e08e4ce7

    PLATFORM=linux64

    USERNAME=takayoshi-s

    SOCKETS=2

    CORES=36

    CPU=Intel(R) Xeon(R) CPU E5-2699 v3 @ 2.30GHz

     

    ----

    Thanks,

    Takayoshi

    0
  • Matthias Miltenberger
    Gurobi Staff Gurobi Staff

    Can you successfully run "gurobi_cl --license"?

    Cheers,
    Matthias

    0
  • Takayoshi Shibahara
    Gurobi-versary
    First Comment
    First Question

    At first, there is a problem with running "gurobi_cl --license", so I run "chmod +x" for licence file.

    Then, the problem is solved. 

    After that, I reinstalled gurobipy for a new python virtual environment.

    However, the same problem(No user name & "User name mismatch" error) occurred again.

     

    ----output of "gurobi_cl --license"---

    (tax-org) takayoshi-s@pine42:~$ gurobi_cl --license

    Failed to setup a license

    ERROR 10012: Unable to open Gurobi license file '/home/cl/takayoshi-s/.local/share/gurobi/pine42/gurobi.lic'


    (tax-org) takayoshi-s@pine42:~$ ls -l .local/share/gurobi/pine42/gurobi.lic
    -rw-r--r-- 1 takayoshi-s is-student 207 Nov 28 18:51 .local/share/gurobi/pine42/gurobi.lic
    (tax-org) takayoshi-s@pine42:~$ chmod +r .local/share/gurobi/pine42/gurobi.lic
    (tax-org) takayoshi-s@pine42:~$ gurobi_cl --license
    Using license file /home/cl/takayoshi-s/.local/share/gurobi/pine42/gurobi.lic
    Set parameter LogFile to value gurobi.log
    Academic license - for non-commercial use only

    ----

     

    Thank you for your many responses. 

    Takayoshi

    0
  • Gwyneth Butera
    Gurobi Staff Gurobi Staff

    Hi Takayoshi - 

    Can you try running whoami and uname -a from within your Jupyter notebook?

    ! whoami
    ! uname -a

    Thanks, Gwyneth

     

    0
  • Takayoshi Shibahara
    Gurobi-versary
    First Comment
    First Question

    Hi Gwyneth, thank you for your advice.

    I tried both commands on Jupyter and IPython.

    -----

    On Jupyter-Notebook
    ! uname -a
    Linux pine42.naist.jp 4.4.0-165-generic #193-Ubuntu SMP Tue Sep 17 17:42:52 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
    ! whoami
    takayoshi-s

    On IPython
    In [1]: ! whoami
    takayoshi-s

    In [2]: ! uname -a
    Linux pine42.naist.jp 4.4.0-165-generic #193-Ubuntu SMP Tue Sep 17 17:42:52 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

    ----

     

    Thanks,

    Takayoshi

    0
  • Sonja Mars
    Gurobi Staff Gurobi Staff

    Thanks for all the details, we will handle your issue inside a regular support request.

    Best regards,

      Sonja

    0
  • Martin Heistermann
    First Comment

    I had the same issue on my machine, which was solved by changing my locale setting (i.e., LANG and LC_* environment variables); in particular, `export LC_ALL=C` fixed the issue and gurobi detected my username.

    1
  • Florian Glombik
    First Comment

    Hey I might have the same issue,

    I do have an academic license and I get the following error when executing my model:

    Set parameter Username
    Error code: 10009. User name mismatch (licensed to 'florian', current user is '')

    When I execute 

    whoami

    the result is

    florian


    Running

     grbprobe 

    results in 

    info  : grbprobe version 10.0.1, build v10.0.1rc0
    PLATFORM=mac64
    USERNAME=
    CPU=Apple M1
    [...other infos]

     

    gurobi_cl --license

    returns

    Set parameter Username
    Set parameter LogFile to value "gurobi.log"

    Failed to set up a license

    Error 10009: User name mismatch (licensed to 'florian', current user is '')

    How can I set the username correctly to be recognized by grbprobe and gurobi_cl?

    0
  • Matthias Miltenberger
    Gurobi Staff Gurobi Staff

    Hi Florian!

    Did you try changing the LC_ALL environment variable?

    export LC_ALL=C

    Cheers,
    Matthias

    1
  • Florian Glombik
    First Comment

    Thanks for your quick response Matthias!

    export LC_ALL=C

    worked for me! For all IntelliJ Users: you might have to define the LC_ALL variable within the run configuration.

    I'm sorry for the circumstances, I only double-checked that the code accesses the correct username but did not double-check the LC_ALL value.

    0
  • Olalekan Omoyele
    First Comment

    I have the same problem, but I use windows. I'd be glad if any help can be provided.

    1

Please sign in to leave a comment.