Kibana cannot connect to the Elastic Package Registry

I am very new to ELK and after configuring x-pack security to true I am getting the message:

Kibana cannot connect to the Elastic Package Registry

When I searched this community I found the following post:

Is this still valid for 7.17? Reason being I cannot find 'elasticsearch-create-enrollment-token' either in the folder specified or any other /usr/share/elasticsearch folder.

Thanks in advance

Are you behind a firewall or proxy? That was my issue.

Also, I believe you need a paid license to use any x-pack features.