GitLab Self Hosted License Page Missing

Hello, so a few hours ago I got a message saying that there was an update so I updated to GitLab 12.5.0 (1f0ab8978ef), after that the license page is gone, I even tried manually navigation to https://MYURL.COM/admin/license I get a 404

Hi @alhassanraad15 and welcome to the GitLab Community Forum.

I was able to duplicate this behavior by upgrading to 12.5.0, but found that signing out and reauthenticating got the page showing as expected again.

Can you sign out, sign back in, and verify if the /admin/license page is still showing a 404 error?

Hi @gitlab-greg, we’ve just updated today to the latest version and I’m seeing the same thing.

Even logging out and back in doesn’t bring it back, if I navigate to it manually I get a 404 too.

Which is awkward because our Trial is running out any day now, and we wanted to see how we can get a license key in there…

Hi,

does it work when you query the REST API?

https://docs.gitlab.com/ee/api/license.html

Cheers,
Michael

Hi @danield, welcome to the GitLab Community forum!

@dnsmichi is on the right track. Can you check if you can get the license info via the API?

GET <external_url>/api/v4/license

After upgrading, did you restart gitlab with gitlab-ctl restart?
If not, can you restart gitlab and let us know if the problem persists?

For insight into what is causing this error, I suggest using gitlab-ctl tail to tail the logs while reproducing the error.

Where to look for details on errors getting the license in the web UI:

For issues getting the license via API:

1 Like

Hi, I let my tech guy check what you asked in regards to gitlab-ctl restart.

I tried opening https://gitlab.[TopSecretProjectName]/api/v4/license in the browser where I am currently authenticated and received this response:

{"error":"404 Not Found"}

-> Not sure if I need to use a different auth system, if so, plz say so and we’ll figure it out from the docs.

Hi,

yep, you need personal auth token for the API.
https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html

Put the private token somewhere in your local environment, I prefer to source that in bashrc.

export GITLAB_PRIVATE_TOKEN=xxx

Then run something like this against your host.

curl -H "Private-token: $GITLAB_PRIVATE_TOKEN" <external_url>/api/v4/license

Note: The personal token needs admin permissions.

Cheers,
Michael

Hi, Im the “tech guy”. I will write from now on.
I restarted the gitlab server with gitlab-ctl restart. Did’nt do the trick.
I created and used an access token with the required permissions and the result is still the same.

export GITLAB_PRIVATE_TOKEN=tokencharacters

curl -H "Private-token: $GITLAB_PRIVATE_TOKEN" https://gitlab.example.org/api/v4/license` 

the result was still:

{ "error":"404 Not found" }

i also tried the other possible ways described on the page:

https://docs.gitlab.com/ee/api/README.html#personal-access-tokens

Maybe it is interesting … I had problems with lets-encrypt so i used this work around after upgrading from 12.4.x to 12.5.4


described from “romka”.

1 Like

Hi,

I’m not sure what exactly the problem is with that request, but you could try a different way where the calls are abstracted. For monitoring tasks with Icinga, I recommend to use check_gitlab which also allows to check the license.

So if you fetch the plugin and run it like this:

./check_gitlab.rb -m license-expire -s GITLABSERVER -t TOKEN -w 40

You’ll maybe get a better answer.

Cheers,
Michael