Docker - License "LICENSE_FETCH_ERROR"

Hi
I recently installed Retool through Docker install. The docker is running inside our company firewall. Unfortunately, when the "retoolonpremise_api" container is starting, it is trying to connect to some external IP (external to our network) to check for license. After a few retries, it fails which forces the retoolonpremise_api container to not start. The error I am getting is the following

{"message":{"type":"LICENSE_FETCH_ERROR","stack":"FetchError: request to https://licensing.tryretool.com/v1/licensing/verify_key failed, reason: connect ETIMEDOUT 13.66.159.82:443\n at ClientRequest. (/snapshot/retool_development/node_modules/node-fetch/lib/index.js:1491:11)\n at ClientRequest.emit (events.js:315:20)\n at ClientRequest.EventEmitter.emit (domain.js:482:12)\n at TLSSocket.socketErrorListener (_http_client.js:426:9)\n at TLSSocket.emit (events.js:315:20)\n at TLSSocket.EventEmitter.emit (domain.js:482:12)\n at emitErrorNT (internal/streams/destroy.js:92:8)\n at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)\n at processTicksAndRejections (internal/process/task_queues.js:84:21)"},"level":"error","timestamp":"2022-03-11T22:40:15.506Z"}
Encountered error
Error: Could not validate a license
at checkLicenseStatus (/snapshot/retool_development/backend/transpiled/server/modules/licensing.js)
at async startOnPremServer (/snapshot/retool_development/backend/transpiled/server/main.js)
at async main (/snapshot/retool_development/backend/transpiled/server/main.js)

Has anyone faced this issue, please?

Thanks

Balaji

Hi @balajikrishnan1972

Thanks for reaching out about this! Which version of Retool do you have?

Hi Tess,

I am evaluating Retools as well and I got the same error. Just download the onprem version and followed the installation instructions got the error.

Help

Hi @somedeveloper, Past reports of this error have sometimes involved a port that isn't open and Retool needs to make use of however this can be indicative of many different setup problems.

Same error here... I tried this:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/tryretool/retool-onpremise/ssop/deploy-retool)" < <(echo "SSOP_my_key")

... and I'm getting this error from the retool-onpremise-api-1 docker container:


{"message":"Rechecking license status...","level":"info","timestamp":"2023-03-08T14:53:06.726Z"}

(node:22) [DEP0111] DeprecationWarning: Access to process.binding('http_parser') is deprecated.

(Use retool_backend --trace-deprecation ... to show where the warning was created)

(node:22) [DEP0148] DeprecationWarning: Use of deprecated folder mapping "./" in the "exports" field module resolution of the package at /snapshot/retool_development/node_modules/@tryretool/common/package.json.

Update this package.json to use a subpath pattern like "./*".

(node:22) [DEP0148] DeprecationWarning: Use of deprecated folder mapping "./" in the "exports" field module resolution of the package at /node_modules/@tryretool/workflowsBackend/package.json.

Update this package.json to use a subpath pattern like "./*".

(node:22) [DEP0148] DeprecationWarning: Use of deprecated folder mapping "./" in the "exports" field module resolution of the package at /node_modules/@tryretool/common/package.json.

Update this package.json to use a subpath pattern like "./*".

(node:22) [DEP0148] DeprecationWarning: Use of deprecated folder mapping "./" in the "exports" field module resolution of the package at /packages/common/package.json imported from /packages/common/build/workflows/utils.js.

Update this package.json to use a subpath pattern like "./*".

{"message":{"type":"LICENSE_FETCH_ERROR","stack":"FetchError: request to https://licensing.tryretool.com/v1/licensing/verify_key failed, reason: connect EHOSTUNREACH 35.92.202.171:443\n at ClientRequest. (/snapshot/retool_development/node_modules/node-fetch/lib/index.js:1491:11)\n at ClientRequest.emit (node:events:526:28)\n at ClientRequest.emit (node:domain:475:12)\n at TLSSocket.socketErrorListener (node:_http_client:442:9)\n at TLSSocket.emit (node:events:526:28)\n at TLSSocket.emit (node:domain:475:12)\n at emitErrorNT (node:internal/streams/destroy:157:8)\n at emitErrorCloseNT (node:internal/streams/destroy:122:3)\n at processTicksAndRejections (node:internal/process/task_queues:83:21)"},"level":"error","timestamp":"2023-03-08T14:53:09.882Z"}

Encountered error

Error: Could not validate a license

at checkLicenseStatus (/snapshot/retool_development/backend/transpiled/server/modules/licensing.js)

at async startOnPremServer (/snapshot/retool_development/backend/transpiled/server/main.js)

at async main (/snapshot/retool_development/backend/transpiled/server/main.js)

Exiting...


I also tried the other way... with:

git clone GitHub - tryretool/retool-onpremise: Deploying Retool On Prem
cd retool-onpremise
./install.sh

But same error message as describe above!

I'm using Retool version 2.110.2... on VPS on OVH using Ubuntu 22.10.
They are no outbound firewall rules!!!

I have read these docs: Check this doc for more details.

Retool Self-hosted

cat Dockerfile
FROM tryretool/backend:2.110.2

CMD ./docker_scripts/start_api.sh

Thanks in advance for your help!

M.

Hey @ML01! Looks like another thread also ran into the same issue: http://community.retool.com/t/problem-with-license-retool-onpremise-api/17507

Pasting my questions here as well:

Just to double check, was your Retool instance working before? And how have you deployed Retool?

Usually this error means your license key is either incorrect or missing (thank you for sending those logs by the way) and this causes your license checks 8 to fail (your Retool instance pings our servers every 6 hours to ensure that your license key is valid).

This can also happen if you have a trailing whitespace at the end of your license key (most common in Kubernetes deployments).

Also, have you set your version to the hardcoded version number (e.g. 2.110) or to 'latest'? Setting the version to 'latest' often breaks things!

Hello Victoria!

Here are the answers to both of you questions:

  1. Was your Retool instance working before? This is a brand new installation on a brand new server. Like mentioned before: I'm using Retool version 2.110.2... on VPS on OVH using Ubuntu 22.10.

  2. And how have you deployed Retool? Again, like mentioned in my previous post, I used 2 methods:

method A: I created a OVH using Ubuntu 22.10. From there I ran this command: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/tryretool/retool-onpremise/ssop/deploy-retool)" < <(echo "SSOP_my_key")

method B (I created another OVH using Ubuntu 22.10. From there I ran these commands):

  1. git clone GitHub - tryretool/retool-onpremise: Deploying Retool On Prem
  2. cd retool-onpremise
  3. ./install.sh

I have read these docs: Check this doc for more details.

Retool Self-hosted

I have also tried by explicitly selecting a RETOOL version in the docker file:

cat Dockerfile
FROM tryretool/backend:2.110.2

CMD ./docker_scripts/start_api.sh

Thanks again for your help!

M.

Ah!

Thank you for sharing method A.

I believe we need to update the URL in the script we list in the local deploy option from https://raw.githubusercontent.com/tryretool/retool-onpremise/ssop/deploy-retool to https://raw.githubusercontent.com/tryretool/retool-onpremise/master/local-trial—if you make that switch (using the second URL instead), do you run into the same issue?

Hi Victoria, I tried to run the script with the provided url [https://raw.githubusercontent.com/tryretool/retool-onpremise/master/local-trial]. it ran successfully as success logs got printed as below:

But still i was not able to access the page on browser.

here are few screenshot that my help:

[ command: docker-compose ps: RETOOL-OMPREMISE-API-1 is not up]

[ **command: docker-compose log **: error while verifying license]

Got it! So it sounds like an error with the license key perhaps. Did you set up a license key or are you using the trial license key that comes with the local trial?\

Technically, this trial license key will not expire, but you will have access to a limited set of features while you use it.

\

If you plan to do more than a quick local evaluation, then I would highly recommend going to https://my.retool.com/ssop_users/sign_up to create an account and generate a free license key to use instead!

Also, if your goal is to set-up a production Retool instance, then I would not recommend using the local script. Instead, you can follow the instructions over at https://github.com/tryretool/retool-onpremise to get deployed that way.

Let me know if you have any questions at all :slight_smile: