ARTIFACTORY: INVALID_ARGUMENT: Cannot serve projects request, No Enterprise/Enterprise Plus license found Error

Janardhana JL
2022-09-29 09:55

During the Artifactory upgrade noticing the error about the license. The log says “Cannot serve projects request, No Enterprise/Enterprise Plus license found”.

Example error snippet:

2022-05-14T06:33:35.454Z [1;32m[jfrt ][0;39m [1;31m[ERROR][0;39m [df52dc7e887fbece] [o.a.l.v.log:415               ] [art-init            ] - Failed to activate license
java.lang.NullPointerException: null
2022-05-14T06:33:36.198Z [1;32m[jfrt ][0;39m [1;31m[ERROR][0;39m [b116f46f6db3780c] [o.q.c.JobRunShell:211         ] [art-exec-9          ] - Job artifactory.SyncRepositoriesWithAccessJob#2xxf-51c9-xx-x-xx threw an unhandled Exception: 
io.grpc.StatusRuntimeException: INVALID_ARGUMENT: Cannot serve projects request, No Enterprise/Enterprise Plus license found.
Caused by: io.grpc.StatusRuntimeException: INVALID_ARGUMENT: Cannot serve projects request, No Enterprise/Enterprise Plus license found.

The reason behind this issue

  • An invalid license is used.
  • Multiple server names may be mapped to the same license key in the access.config.latest.yml 
  • Server name mismatch in the access config file, the license serverName in config is "XYZ" while the actual server name is "ABC".

How to overcome this behavior:

1. Check the artifactory.lic file under /opt/jfrog/artifactory/var/etc/artifactory and make sure it does not contain any duplicates with an invalid license.
 
2. Validate the license and make sure you are using the suitable license with the right subscription(Enterprise/Enterprise Plus), you can get the license details with the help of REST API.

3. After steps 1&2 if you are still noticing the issue then in the access.latest.yaml file, it is still using the old license and which is not valid or the server name is incorrect. Kindly check the server name and update accordingly, before making any changes to access.config.latest.yaml file please take a backup of the current access.config.latest.yml file under $JFROG_HOME/artifactory/var/etc/access/ directory and then rename the access.config.latest.yml to access.config.import.yml then change the “ server-name:” accordingly and in case if it a HA verify and add the correct server name similarly to another node in the access.config.import.yml and restart the Artifactory to consider the changes. 

You can follow the instructions as mentioned on our confluence page on Applying configuration changes. After restarting Artifactory,  Please ensure to check if the access.config.latest.yml file has been updated with values from access.config.import.yml  

Example access.config.latest.yml for a reference:---
security:
  password-policy:
    length: "8"
token:
  revocation:
    revocable-expiry-threshold: -1
federation:
  inbound:
    service-id-mapping:
    - from: "jf-artifactory@*"
      to: "jf-artifactory@xxxx"
    - from: "jfrou@*"
      to: "jfrou@0xxx"
    - from: "jfevt@*"
      to: "jfevt@xxxx"
    - from: "jfmd@*"
      to: "jfmd@xxxx"
    - from: "jffe@*"
      to: "jffe@000"
    - from: "jfrou@*"
      to: "jfrou@xxxxx"
licenses:
- server-name: "nodeID(OR)servername of 1st node"
  key: "jb12tcBxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxik5XJ/9hGW\r\
 \n8zuIIxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxAOMuXtnOVy\r\
..
..
..
\nk6glENhYMTt9oUJn1YTL2rWFs/XINYgyCVyifuEq\r\n"
- server-name: "nodeID(OR)servername of 2nd node"
  key: "jb12tcBe1seX6ygwcoxxxxxxxxxxxxxxxxxxxxxxxO1FnqEjrLud+fBTik5XJ/9hGW\r\
 \nx x…………………………………………………………………………………………………………………………………………………………………………………Vy\r\
..
..
.. 
\n6cwUjwZ0vvvvvvvvvvQP05qjxvvvvvvvvvkeCs\r\n"
schema-version: 2